basho-labs / riak_explorer

Riak dev-mode and admin GUI
Apache License 2.0
61 stars 15 forks source link

Implement server-side 'list bucket types' API endpoint #5

Closed dmitrizagidulin closed 9 years ago

dmitrizagidulin commented 9 years ago

This can interface with clique, or Riak directly. Essentially addresses the lack of an HTTP API 'list types' capability.

drewkerrigan commented 9 years ago

Done, example payload:

{
   "data":[
      {
         "name":"default",
         "props":{
            "active":true,
            "allow_mult":false,
            "basic_quorum":false,
            "big_vclock":50,
            "chash_keyfun":"{riak_core_util,chash_std_keyfun}",
            "dvv_enabled":false,
            "dw":"quorum",
            "last_write_wins":false,
            "linkfun":"{modfun,riak_kv_wm_link_walker,mapreduce_linkfun}",
            "n_val":3,
            "notfound_ok":true,
            "old_vclock":86400,
            "postcommit":[

            ],
            "pr":0,
            "precommit":[

            ],
            "pw":0,
            "r":"quorum",
            "rw":"quorum",
            "small_vclock":50,
            "w":"quorum",
            "write_once":false,
            "young_vclock":20
         }
      },
      {
         "name":"my_type",
         "props":{
            "young_vclock":20,
            "w":"quorum",
            "small_vclock":50,
            "search_index":"my_index",
            "rw":"quorum",
            "r":"quorum",
            "pw":0,
            "precommit":[

            ],
            "pr":0,
            "postcommit":[

            ],
            "old_vclock":86400,
            "notfound_ok":true,
            "n_val":3,
            "linkfun":"{modfun,riak_kv_wm_link_walker,mapreduce_linkfun}",
            "last_write_wins":false,
            "dw":"quorum",
            "dvv_enabled":true,
            "chash_keyfun":"{riak_core_util,chash_std_keyfun}",
            "big_vclock":50,
            "basic_quorum":false,
            "allow_mult":true,
            "datatype":"map",
            "active":true,
            "claimant":"'riak@127.0.0.1'"
         }
      },
      {
         "name":"my_type1",
         "props":{
            "young_vclock":20,
            "w":"quorum",
            "small_vclock":50,
            "search_index":"my_index1",
            "rw":"quorum",
            "r":"quorum",
            "pw":0,
            "precommit":[

            ],
            "pr":0,
            "postcommit":[

            ],
            "old_vclock":86400,
            "notfound_ok":true,
            "n_val":3,
            "linkfun":"{modfun,riak_kv_wm_link_walker,mapreduce_linkfun}",
            "last_write_wins":false,
            "dw":"quorum",
            "dvv_enabled":true,
            "chash_keyfun":"{riak_core_util,chash_std_keyfun}",
            "big_vclock":50,
            "basic_quorum":false,
            "allow_mult":true,
            "datatype":"map",
            "active":true,
            "claimant":"'riak@127.0.0.1'"
         }
      }
   ]
}