feat: administrator (#271)

* feat: get views and failed events

* feat: get views and failed events

* feat: get views and failed events

* Update internal/view/repository/sequence.go

Co-authored-by: Livio Amstutz <[email protected]>

* Update internal/view/repository/general_query.go

Co-authored-by: Livio Amstutz <[email protected]>

Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
Fabi
2020-06-25 08:01:13 +02:00
committed by GitHub
co-authored by Livio Amstutz
parent b88f200434
commit 8bfa1a083c
90 changed files with 3555 additions and 1661 deletions
+217 -1
View File
@@ -19,6 +19,59 @@
"application/grpc"
],
"paths": {
"/failedevents": {
"get": {
"operationId": "GetFailedEvents",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1FailedEvents"
}
}
},
"tags": [
"AdminService"
]
}
},
"/failedevents/{database}/{view_name}/{failed_sequence}": {
"delete": {
"operationId": "RemoveFailedEvent",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"properties": {}
}
}
},
"parameters": [
{
"name": "database",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "view_name",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "failed_sequence",
"in": "path",
"required": true,
"type": "string",
"format": "uint64"
}
],
"tags": [
"AdminService"
]
}
},
"/healthz": {
"get": {
"summary": "Healthz returns status OK as soon as the service started",
@@ -274,7 +327,7 @@
"200": {
"description": "A successful response.",
"schema": {
"type": "object"
"$ref": "#/definitions/protobufStruct"
}
}
},
@@ -282,9 +335,68 @@
"AdminService"
]
}
},
"/views": {
"get": {
"operationId": "GetViews",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1Views"
}
}
},
"tags": [
"AdminService"
]
}
},
"/views/{database}/{view_name}": {
"post": {
"operationId": "ClearView",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"properties": {}
}
}
},
"parameters": [
{
"name": "database",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "view_name",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"AdminService"
]
}
}
},
"definitions": {
"protobufListValue": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufValue"
},
"description": "Repeated field of dynamically typed values."
}
},
"description": "`ListValue` is a wrapper around a repeated field of values.\n\nThe JSON representation for `ListValue` is JSON array."
},
"protobufNullValue": {
"type": "string",
"enum": [
@@ -293,6 +405,51 @@
"default": "NULL_VALUE",
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
},
"protobufStruct": {
"type": "object",
"properties": {
"fields": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/protobufValue"
},
"description": "Unordered map of dynamically typed values."
}
},
"description": "`Struct` represents a structured data value, consisting of fields\nwhich map to dynamically typed values. In some languages, `Struct`\nmight be supported by a native representation. For example, in\nscripting languages like JS a struct is represented as an\nobject. The details of that representation are described together\nwith the proto support for the language.\n\nThe JSON representation for `Struct` is JSON object."
},
"protobufValue": {
"type": "object",
"properties": {
"null_value": {
"$ref": "#/definitions/protobufNullValue",
"description": "Represents a null value."
},
"number_value": {
"type": "number",
"format": "double",
"description": "Represents a double value."
},
"string_value": {
"type": "string",
"description": "Represents a string value."
},
"bool_value": {
"type": "boolean",
"format": "boolean",
"description": "Represents a boolean value."
},
"struct_value": {
"$ref": "#/definitions/protobufStruct",
"description": "Represents a structured value."
},
"list_value": {
"$ref": "#/definitions/protobufListValue",
"description": "Represents a repeated `Value`."
}
},
"description": "`Value` represents a dynamically typed value which can be either\nnull, a number, a string, a boolean, a recursive struct value, or a\nlist of values. A producer of value is expected to set one of that\nvariants, absence of any variant indicates an error.\n\nThe JSON representation for `Value` is JSON value."
},
"v1CreateOrgRequest": {
"type": "object",
"properties": {
@@ -359,6 +516,39 @@
}
}
},
"v1FailedEvent": {
"type": "object",
"properties": {
"database": {
"type": "string"
},
"view_name": {
"type": "string"
},
"failed_sequence": {
"type": "string",
"format": "uint64"
},
"failure_count": {
"type": "string",
"format": "uint64"
},
"error_message": {
"type": "string"
}
}
},
"v1FailedEvents": {
"type": "object",
"properties": {
"failed_events": {
"type": "array",
"items": {
"$ref": "#/definitions/v1FailedEvent"
}
}
}
},
"v1Gender": {
"type": "string",
"enum": [
@@ -647,6 +837,32 @@
"USERSTATE_INITIAL"
],
"default": "USERSTATE_UNSPECIFIED"
},
"v1View": {
"type": "object",
"properties": {
"database": {
"type": "string"
},
"view_name": {
"type": "string"
},
"sequence": {
"type": "string",
"format": "uint64"
}
}
},
"v1Views": {
"type": "object",
"properties": {
"views": {
"type": "array",
"items": {
"$ref": "#/definitions/v1View"
}
}
}
}
}
}