summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb/files/designs/identities.json
diff options
context:
space:
mode:
authorMicah Anderson <micah@leap.se>2013-11-26 14:49:53 -0500
committerMicah Anderson <micah@leap.se>2013-11-27 14:48:00 -0500
commitdc6c48cbc25216417a02304ec2c23663688cd99d (patch)
tree46b86e9354246e95fb0c894387a5496b15af6069 /puppet/modules/site_couchdb/files/designs/identities.json
parentab278941346cc868aad7a3900a2cd5a1007986ea (diff)
enable uploading a document to couch from a file (#4256)
deploy design documents during couch deploy (#3771) Change-Id: I4679e066303ac9b02582214c48e2e7dcfe5bd651
Diffstat (limited to 'puppet/modules/site_couchdb/files/designs/identities.json')
-rw-r--r--puppet/modules/site_couchdb/files/designs/identities.json28
1 files changed, 28 insertions, 0 deletions
diff --git a/puppet/modules/site_couchdb/files/designs/identities.json b/puppet/modules/site_couchdb/files/designs/identities.json
new file mode 100644
index 00000000..8cf8c39b
--- /dev/null
+++ b/puppet/modules/site_couchdb/files/designs/identities.json
@@ -0,0 +1,28 @@
+{
+ "_id": "_design/Identity",
+ "language": "javascript",
+ "views": {
+ "by_user_id": {
+ "map": " function(doc) {\n if ((doc['type'] == 'Identity') && (doc['user_id'] != null)) {\n emit(doc['user_id'], 1);\n }\n }\n",
+ "reduce": "_sum"
+ },
+ "by_address_and_destination": {
+ "map": " function(doc) {\n if ((doc['type'] == 'Identity') && (doc['address'] != null) && (doc['destination'] != null)) {\n emit([doc['address'], doc['destination']], 1);\n }\n }\n",
+ "reduce": "_sum"
+ },
+ "by_address": {
+ "map": " function(doc) {\n if ((doc['type'] == 'Identity') && (doc['address'] != null)) {\n emit(doc['address'], 1);\n }\n }\n",
+ "reduce": "_sum"
+ },
+ "pgp_key_by_email": {
+ "map": " function(doc) {\n if (doc.type != 'Identity') {\n return;\n }\n emit(doc.address, doc.keys[\"pgp\"]);\n }\n"
+ },
+ "disabled": {
+ "map": " function(doc) {\n if (doc.type != 'Identity') {\n return;\n }\n if (typeof doc.user_id === \"undefined\") {\n emit(doc._id, 1);\n }\n }\n"
+ },
+ "all": {
+ "map": " function(doc) {\n if (doc['type'] == 'Identity') {\n emit(doc._id, null);\n }\n }\n"
+ }
+ },
+ "couchrest-hash": "5b0ece9d28b3025d18ea71fddf3a532f"
+} \ No newline at end of file