diff --git a/cluster/docs/ClusterAPI_docs.go b/cluster/docs/ClusterAPI_docs.go index ca183597..62336957 100644 --- a/cluster/docs/ClusterAPI_docs.go +++ b/cluster/docs/ClusterAPI_docs.go @@ -267,6 +267,104 @@ const docTemplateClusterAPI = `{ } } }, + "/v1/kv": { + "post": { + "description": "Store value under key", + "produces": [ + "application/json" + ], + "tags": [ + "v1.0.0" + ], + "summary": "Store value under key", + "operationId": "cluster-1-kv-set", + "parameters": [ + { + "description": "Set KV request", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/client.SetKVRequest" + } + }, + { + "type": "string", + "description": "Origin ID of request", + "name": "X-Cluster-Origin", + "in": "header" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/cluster.Error" + } + }, + "508": { + "description": "Loop Detected", + "schema": { + "$ref": "#/definitions/cluster.Error" + } + } + } + } + }, + "/v1/kv/{key}": { + "delete": { + "description": "Removes a key", + "produces": [ + "application/json" + ], + "tags": [ + "v1.0.0" + ], + "summary": "Removes a key", + "operationId": "cluster-1-kv-unset", + "parameters": [ + { + "type": "string", + "description": "Key name", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Origin ID of request", + "name": "X-Cluster-Origin", + "in": "header" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/cluster.Error" + } + }, + "508": { + "description": "Loop Detected", + "schema": { + "$ref": "#/definitions/cluster.Error" + } + } + } + } + }, "/v1/lock": { "post": { "description": "Acquire a named lock", @@ -916,6 +1014,17 @@ const docTemplateClusterAPI = `{ } } }, + "client.SetKVRequest": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, "client.SetPoliciesRequest": { "type": "object", "properties": { diff --git a/cluster/docs/ClusterAPI_swagger.json b/cluster/docs/ClusterAPI_swagger.json index 3de73f8a..0b559dbf 100644 --- a/cluster/docs/ClusterAPI_swagger.json +++ b/cluster/docs/ClusterAPI_swagger.json @@ -259,6 +259,104 @@ } } }, + "/v1/kv": { + "post": { + "description": "Store value under key", + "produces": [ + "application/json" + ], + "tags": [ + "v1.0.0" + ], + "summary": "Store value under key", + "operationId": "cluster-1-kv-set", + "parameters": [ + { + "description": "Set KV request", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/client.SetKVRequest" + } + }, + { + "type": "string", + "description": "Origin ID of request", + "name": "X-Cluster-Origin", + "in": "header" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/cluster.Error" + } + }, + "508": { + "description": "Loop Detected", + "schema": { + "$ref": "#/definitions/cluster.Error" + } + } + } + } + }, + "/v1/kv/{key}": { + "delete": { + "description": "Removes a key", + "produces": [ + "application/json" + ], + "tags": [ + "v1.0.0" + ], + "summary": "Removes a key", + "operationId": "cluster-1-kv-unset", + "parameters": [ + { + "type": "string", + "description": "Key name", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Origin ID of request", + "name": "X-Cluster-Origin", + "in": "header" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/cluster.Error" + } + }, + "508": { + "description": "Loop Detected", + "schema": { + "$ref": "#/definitions/cluster.Error" + } + } + } + } + }, "/v1/lock": { "post": { "description": "Acquire a named lock", @@ -908,6 +1006,17 @@ } } }, + "client.SetKVRequest": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, "client.SetPoliciesRequest": { "type": "object", "properties": { diff --git a/cluster/docs/ClusterAPI_swagger.yaml b/cluster/docs/ClusterAPI_swagger.yaml index 44f1b76b..5449f4a7 100644 --- a/cluster/docs/ClusterAPI_swagger.yaml +++ b/cluster/docs/ClusterAPI_swagger.yaml @@ -118,6 +118,13 @@ definitions: valid_until: type: string type: object + client.SetKVRequest: + properties: + key: + type: string + value: + type: string + type: object client.SetPoliciesRequest: properties: policies: @@ -383,6 +390,71 @@ paths: summary: Set identity policies tags: - v1.0.0 + /v1/kv: + post: + description: Store value under key + operationId: cluster-1-kv-set + parameters: + - description: Set KV request + in: body + name: data + required: true + schema: + $ref: '#/definitions/client.SetKVRequest' + - description: Origin ID of request + in: header + name: X-Cluster-Origin + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + type: string + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/cluster.Error' + "508": + description: Loop Detected + schema: + $ref: '#/definitions/cluster.Error' + summary: Store value under key + tags: + - v1.0.0 + /v1/kv/{key}: + delete: + description: Removes a key + operationId: cluster-1-kv-unset + parameters: + - description: Key name + in: path + name: name + required: true + type: string + - description: Origin ID of request + in: header + name: X-Cluster-Origin + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + type: string + "404": + description: Not Found + schema: + $ref: '#/definitions/cluster.Error' + "508": + description: Loop Detected + schema: + $ref: '#/definitions/cluster.Error' + summary: Removes a key + tags: + - v1.0.0 /v1/lock: post: description: Acquire a named lock