Files
core/cluster/docs/ClusterAPI_docs.go

2529 lines
86 KiB
Go

// Code generated by swaggo/swag. DO NOT EDIT.
package docs
import "github.com/swaggo/swag"
const docTemplateClusterAPI = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {
"name": "datarhei Core Support",
"url": "https://www.datarhei.com",
"email": "hello@datarhei.com"
},
"license": {
"name": "Apache 2.0",
"url": "https://github.com/datarhei/core/v16/blob/main/LICENSE"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/": {
"get": {
"description": "The cluster version",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "The cluster version",
"operationId": "cluster-1-version",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/barrier/{name}": {
"get": {
"description": "Has the barrier already has been passed",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Has the barrier already has been passed",
"operationId": "cluster-1-barrier",
"parameters": [
{
"type": "string",
"description": "Barrier name",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/core": {
"get": {
"description": "Core API address and login of this node",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Core API address and login",
"operationId": "cluster-1-core-api-address",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
}
}
}
},
"/v1/core/config": {
"get": {
"description": "Core config of this node",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Core config",
"operationId": "cluster-1-core-config",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/config.Config"
}
}
}
}
},
"/v1/core/skills": {
"get": {
"description": "Core skills of this node",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Core skills",
"operationId": "cluster-1-core-skills",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/skills.Skills"
}
}
}
}
},
"/v1/iam/user": {
"post": {
"description": "Add an identity to the cluster DB",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Add an identity",
"operationId": "cluster-1-add-identity",
"parameters": [
{
"description": "Identity config",
"name": "config",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/client.AddIdentityRequest"
}
},
{
"type": "string",
"description": "Origin ID of request",
"name": "X-Cluster-Origin",
"in": "header"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/iam/user/{name}": {
"put": {
"description": "Replace an existing identity in the cluster DB",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Replace an existing identity",
"operationId": "cluster-1-update-identity",
"parameters": [
{
"type": "string",
"description": "Process ID",
"name": "name",
"in": "path",
"required": true
},
{
"description": "Identity config",
"name": "config",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/client.UpdateIdentityRequest"
}
}
],
"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"
}
}
}
},
"delete": {
"description": "Remove an identity from the cluster DB",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Remove an identity",
"operationId": "cluster-1-remove-identity",
"parameters": [
{
"type": "string",
"description": "Identity 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"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/iam/user/{name}/policies": {
"put": {
"description": "Set policies for an identity in the cluster DB. Any existing policies will be replaced.",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Set identity policies",
"operationId": "cluster-3-set-identity-policies",
"parameters": [
{
"type": "string",
"description": "Process ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Policies for that user",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/client.SetPoliciesRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/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}": {
"get": {
"description": "Fetch a key",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Fetch a key",
"operationId": "cluster-1-kv-get",
"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"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
},
"delete": {
"description": "Remove a key",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Remove 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"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/lock": {
"post": {
"description": "Acquire a named lock",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Acquire a named lock",
"operationId": "cluster-1-lock",
"parameters": [
{
"description": "Lock request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/client.LockRequest"
}
},
{
"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/lock/{name}": {
"delete": {
"description": "Remove a lock",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Remove a lock",
"operationId": "cluster-1-unlock",
"parameters": [
{
"type": "string",
"description": "Lock 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"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/node/{id}/state": {
"get": {
"description": "Set a state for a node",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Set a state for a node",
"operationId": "cluster-1-node-set-state",
"parameters": [
{
"description": "Set node state request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/client.SetNodeStateRequest"
}
},
{
"type": "string",
"description": "Origin ID of request",
"name": "X-Cluster-Origin",
"in": "header"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/process": {
"post": {
"description": "Add a process to the cluster DB",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Add a process",
"operationId": "cluster-1-add-process",
"parameters": [
{
"description": "Process config",
"name": "config",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/client.AddProcessRequest"
}
},
{
"type": "string",
"description": "Origin ID of request",
"name": "X-Cluster-Origin",
"in": "header"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/process/{id}": {
"put": {
"description": "Replace an existing process in the cluster DB",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Replace an existing process",
"operationId": "cluster-1-update-process",
"parameters": [
{
"type": "string",
"description": "Process ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Domain to act on",
"name": "domain",
"in": "query"
},
{
"description": "Process config",
"name": "config",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/client.UpdateProcessRequest"
}
}
],
"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"
}
}
}
},
"delete": {
"description": "Remove a process from the cluster DB",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Remove a process",
"operationId": "cluster-1-remove-process",
"parameters": [
{
"type": "string",
"description": "Process ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Domain to act on",
"name": "domain",
"in": "query"
},
{
"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/process/{id}/command": {
"put": {
"description": "Set the order for a process.",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Set the order for a process",
"operationId": "cluster-3-set-process-order",
"parameters": [
{
"type": "string",
"description": "Process ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Domain to act on",
"name": "domain",
"in": "query"
},
{
"description": "Process order",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/client.SetProcessCommandRequest"
}
}
],
"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/process/{id}/metadata/{key}": {
"put": {
"description": "Add arbitrary JSON metadata under the given key. If the key exists, all already stored metadata with this key will be overwritten. If the key doesn't exist, it will be created.",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Add JSON metadata with a process under the given key",
"operationId": "cluster-3-set-process-metadata",
"parameters": [
{
"type": "string",
"description": "Process ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Key for data store",
"name": "key",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Domain to act on",
"name": "domain",
"in": "query"
},
{
"description": "Arbitrary JSON data. The null value will remove the key and its contents",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/client.SetProcessMetadataRequest"
}
}
],
"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/relocate": {
"put": {
"description": "Relocate processes to another node.",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Relocate processes to another node",
"operationId": "cluster-3-relocate-processes",
"parameters": [
{
"description": "List of processes to relocate",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/client.RelocateProcessesRequest"
}
}
],
"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/server": {
"post": {
"description": "Add a new server to the cluster",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Add a new server",
"operationId": "cluster-1-add-server",
"parameters": [
{
"description": "Server ID and address",
"name": "config",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/client.JoinRequest"
}
},
{
"type": "string",
"description": "Origin ID of request",
"name": "X-Cluster-Origin",
"in": "header"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/server/{id}": {
"delete": {
"description": "Remove a server from the cluster",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Remove a server",
"operationId": "cluster-1-remove-server",
"parameters": [
{
"type": "string",
"description": "Server ID",
"name": "id",
"in": "path",
"required": true
},
{
"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/snapshot": {
"get": {
"description": "Current snapshot of the clusterDB",
"produces": [
"application/octet-stream"
],
"tags": [
"v1.0.0"
],
"summary": "Cluster DB snapshot",
"operationId": "cluster-1-snapshot",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "file"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/transfer/{id}": {
"put": {
"description": "Transfer leadership",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Transfer leadership",
"operationId": "cluster-1-transfer-leadership",
"parameters": [
{
"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"
}
}
}
}
}
},
"definitions": {
"access.Policy": {
"type": "object",
"properties": {
"actions": {
"type": "array",
"items": {
"type": "string"
}
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"resource": {
"type": "string"
},
"types": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"app.Config": {
"type": "object",
"properties": {
"autostart": {
"type": "boolean"
},
"domain": {
"type": "string"
},
"ffversion": {
"type": "string"
},
"id": {
"type": "string"
},
"input": {
"type": "array",
"items": {
"$ref": "#/definitions/app.ConfigIO"
}
},
"limitCPU": {
"description": "percent",
"type": "number"
},
"limitMemory": {
"description": "bytes",
"type": "integer"
},
"limitWaitFor": {
"description": "seconds",
"type": "integer"
},
"logPatterns": {
"description": "will we interpreted as regular expressions",
"type": "array",
"items": {
"type": "string"
}
},
"options": {
"type": "array",
"items": {
"type": "string"
}
},
"output": {
"type": "array",
"items": {
"$ref": "#/definitions/app.ConfigIO"
}
},
"owner": {
"type": "string"
},
"reconnect": {
"type": "boolean"
},
"reconnectDelay": {
"description": "seconds",
"type": "integer"
},
"reference": {
"type": "string"
},
"scheduler": {
"description": "crontab pattern or RFC3339 timestamp",
"type": "string"
},
"staleTimeout": {
"description": "seconds",
"type": "integer"
},
"timeout": {
"description": "seconds",
"type": "integer"
}
}
},
"app.ConfigIO": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"cleanup": {
"type": "array",
"items": {
"$ref": "#/definitions/app.ConfigIOCleanup"
}
},
"id": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"app.ConfigIOCleanup": {
"type": "object",
"properties": {
"maxFileAge": {
"type": "integer"
},
"maxFiles": {
"type": "integer"
},
"pattern": {
"type": "string"
},
"purgeOnDelete": {
"type": "boolean"
}
}
},
"client.AddIdentityRequest": {
"type": "object",
"properties": {
"identity": {
"$ref": "#/definitions/identity.User"
}
}
},
"client.AddProcessRequest": {
"type": "object",
"properties": {
"config": {
"$ref": "#/definitions/app.Config"
}
}
},
"client.JoinRequest": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"raft_address": {
"type": "string"
}
}
},
"client.LockRequest": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"valid_until": {
"type": "string"
}
}
},
"client.RelocateProcessesRequest": {
"type": "object",
"properties": {
"map": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"client.SetKVRequest": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"client.SetNodeStateRequest": {
"type": "object",
"properties": {
"state": {
"type": "string"
}
}
},
"client.SetPoliciesRequest": {
"type": "object",
"properties": {
"policies": {
"type": "array",
"items": {
"$ref": "#/definitions/access.Policy"
}
}
}
},
"client.SetProcessCommandRequest": {
"type": "object",
"properties": {
"order": {
"type": "string"
}
}
},
"client.SetProcessMetadataRequest": {
"type": "object",
"properties": {
"metadata": {}
}
},
"client.UpdateIdentityRequest": {
"type": "object",
"properties": {
"identity": {
"$ref": "#/definitions/identity.User"
}
}
},
"client.UpdateProcessRequest": {
"type": "object",
"properties": {
"config": {
"$ref": "#/definitions/app.Config"
}
}
},
"cluster.Error": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int"
},
"details": {
"type": "array",
"items": {
"type": "string"
}
},
"message": {
"type": "string"
}
}
},
"config.Config": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"api": {
"type": "object",
"properties": {
"access": {
"type": "object",
"properties": {
"http": {
"type": "object",
"properties": {
"allow": {
"type": "array",
"items": {
"type": "string"
}
},
"block": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"https": {
"type": "object",
"properties": {
"allow": {
"type": "array",
"items": {
"type": "string"
}
},
"block": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"auth": {
"type": "object",
"properties": {
"auth0": {
"type": "object",
"properties": {
"enable": {
"type": "boolean"
},
"tenants": {
"type": "array",
"items": {
"$ref": "#/definitions/value.Auth0Tenant"
}
}
}
},
"disable_localhost": {
"type": "boolean"
},
"enable": {
"type": "boolean"
},
"jwt": {
"type": "object",
"properties": {
"secret": {
"type": "string"
}
}
},
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"read_only": {
"type": "boolean"
}
}
},
"cluster": {
"type": "object",
"properties": {
"address": {
"description": "ip:port",
"type": "string"
},
"debug": {
"type": "object",
"properties": {
"disable_ffmpeg_check": {
"type": "boolean"
}
}
},
"emergency_leader_timeout_sec": {
"description": "seconds",
"type": "integer",
"format": "int64"
},
"enable": {
"type": "boolean"
},
"id": {
"type": "string"
},
"node_recover_timeout_sec": {
"description": "seconds",
"type": "integer",
"format": "int64"
},
"peers": {
"type": "array",
"items": {
"type": "string"
}
},
"startup_timeout_sec": {
"description": "seconds",
"type": "integer",
"format": "int64"
},
"sync_interval_sec": {
"description": "seconds",
"type": "integer",
"format": "int64"
}
}
},
"created_at": {
"description": "When this config has been persisted",
"type": "string"
},
"db": {
"type": "object",
"properties": {
"dir": {
"type": "string"
}
}
},
"debug": {
"type": "object",
"properties": {
"agent_address": {
"type": "string"
},
"auto_max_procs": {
"type": "boolean"
},
"force_gc": {
"description": "deprecated, use MemoryLimit instead",
"type": "integer",
"format": "int"
},
"memory_limit_mbytes": {
"type": "integer",
"format": "int64"
},
"profiling": {
"type": "boolean"
}
}
},
"ffmpeg": {
"type": "object",
"properties": {
"access": {
"type": "object",
"properties": {
"input": {
"type": "object",
"properties": {
"allow": {
"type": "array",
"items": {
"type": "string"
}
},
"block": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"output": {
"type": "object",
"properties": {
"allow": {
"type": "array",
"items": {
"type": "string"
}
},
"block": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"binary": {
"type": "string"
},
"log": {
"type": "object",
"properties": {
"max_history": {
"type": "integer",
"format": "int"
},
"max_lines": {
"type": "integer",
"format": "int"
},
"max_minimal_history": {
"type": "integer",
"format": "int"
}
}
},
"max_processes": {
"type": "integer",
"format": "int64"
}
}
},
"host": {
"type": "object",
"properties": {
"auto": {
"type": "boolean"
},
"name": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"id": {
"type": "string"
},
"log": {
"type": "object",
"properties": {
"level": {
"type": "string",
"enum": [
"debug",
"info",
"warn",
"error",
"silent"
]
},
"max_lines": {
"type": "integer",
"format": "int"
},
"topics": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"metrics": {
"type": "object",
"properties": {
"enable": {
"type": "boolean"
},
"enable_prometheus": {
"type": "boolean"
},
"interval_sec": {
"description": "seconds",
"type": "integer",
"format": "int64"
},
"range_sec": {
"description": "seconds",
"type": "integer",
"format": "int64"
}
}
},
"name": {
"type": "string"
},
"playout": {
"type": "object",
"properties": {
"enable": {
"type": "boolean"
},
"max_port": {
"type": "integer",
"format": "int"
},
"min_port": {
"type": "integer",
"format": "int"
}
}
},
"resources": {
"type": "object",
"properties": {
"max_cpu_usage": {
"description": "percent 0-100",
"type": "number"
},
"max_memory_usage": {
"description": "percent 0-100",
"type": "number"
}
}
},
"router": {
"type": "object",
"properties": {
"blocked_prefixes": {
"type": "array",
"items": {
"type": "string"
}
},
"routes": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"ui_path": {
"type": "string"
}
}
},
"rtmp": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"address_tls": {
"type": "string"
},
"app": {
"type": "string"
},
"enable": {
"type": "boolean"
},
"enable_tls": {
"type": "boolean"
},
"token": {
"description": "Deprecated, use IAM",
"type": "string"
}
}
},
"service": {
"type": "object",
"properties": {
"enable": {
"type": "boolean"
},
"token": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"sessions": {
"type": "object",
"properties": {
"enable": {
"type": "boolean"
},
"ip_ignorelist": {
"type": "array",
"items": {
"type": "string"
}
},
"max_bitrate_mbit": {
"type": "integer",
"format": "uint64"
},
"max_sessions": {
"type": "integer",
"format": "uint64"
},
"persist": {
"type": "boolean"
},
"persist_interval_sec": {
"type": "integer",
"format": "int"
},
"session_log_buffer_sec": {
"type": "integer",
"format": "int"
},
"session_log_path_pattern": {
"type": "string"
},
"session_timeout_sec": {
"type": "integer",
"format": "int"
}
}
},
"srt": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"enable": {
"type": "boolean"
},
"log": {
"type": "object",
"properties": {
"enable": {
"type": "boolean"
},
"topics": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"passphrase": {
"type": "string"
},
"token": {
"description": "Deprecated, use IAM",
"type": "string"
}
}
},
"storage": {
"type": "object",
"properties": {
"cors": {
"type": "object",
"properties": {
"origins": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"disk": {
"type": "object",
"properties": {
"cache": {
"type": "object",
"properties": {
"enable": {
"type": "boolean"
},
"max_file_size_mbytes": {
"type": "integer",
"format": "uint64"
},
"max_size_mbytes": {
"type": "integer",
"format": "uint64"
},
"ttl_seconds": {
"type": "integer",
"format": "int64"
},
"types": {
"type": "object",
"properties": {
"allow": {
"type": "array",
"items": {
"type": "string"
}
},
"block": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"dir": {
"type": "string"
},
"max_size_mbytes": {
"type": "integer",
"format": "int64"
}
}
},
"memory": {
"type": "object",
"properties": {
"auth": {
"description": "Deprecated, use IAM",
"type": "object",
"properties": {
"enable": {
"description": "Deprecated, use IAM",
"type": "boolean"
},
"password": {
"description": "Deprecated, use IAM",
"type": "string"
},
"username": {
"description": "Deprecated, use IAM",
"type": "string"
}
}
},
"backup": {
"type": "object",
"properties": {
"dir": {
"type": "string"
},
"patterns": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"max_size_mbytes": {
"type": "integer",
"format": "int64"
},
"purge": {
"type": "boolean"
}
}
},
"mimetypes_file": {
"type": "string"
},
"s3": {
"type": "array",
"items": {
"$ref": "#/definitions/value.S3Storage"
}
}
}
},
"tls": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"auto": {
"type": "boolean"
},
"cert_file": {
"type": "string"
},
"email": {
"type": "string"
},
"enable": {
"type": "boolean"
},
"key_file": {
"type": "string"
},
"secret": {
"type": "string"
},
"staging": {
"type": "boolean"
}
}
},
"update_check": {
"type": "boolean"
},
"version": {
"type": "integer",
"format": "int64"
}
}
},
"identity.Auth0Tenant": {
"type": "object",
"properties": {
"audience": {
"type": "string"
},
"client_id": {
"type": "string"
},
"domain": {
"type": "string"
}
}
},
"identity.User": {
"type": "object",
"properties": {
"alias": {
"type": "string"
},
"auth": {
"$ref": "#/definitions/identity.UserAuth"
},
"created_at": {
"type": "string"
},
"name": {
"type": "string"
},
"superuser": {
"type": "boolean"
},
"updated_at": {
"type": "string"
}
}
},
"identity.UserAuth": {
"type": "object",
"properties": {
"api": {
"$ref": "#/definitions/identity.UserAuthAPI"
},
"services": {
"$ref": "#/definitions/identity.UserAuthServices"
}
}
},
"identity.UserAuthAPI": {
"type": "object",
"properties": {
"auth0": {
"$ref": "#/definitions/identity.UserAuthAPIAuth0"
},
"password": {
"type": "string"
}
}
},
"identity.UserAuthAPIAuth0": {
"type": "object",
"properties": {
"tenant": {
"$ref": "#/definitions/identity.Auth0Tenant"
},
"user": {
"type": "string"
}
}
},
"identity.UserAuthServices": {
"type": "object",
"properties": {
"basic": {
"description": "Passwords for BasicAuth",
"type": "array",
"items": {
"type": "string"
}
},
"session": {
"description": "Secrets for session JWT",
"type": "array",
"items": {
"type": "string"
}
},
"token": {
"description": "Tokens/Streamkey for RTMP and SRT",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"skills.Codec": {
"type": "object",
"properties": {
"decoders": {
"type": "array",
"items": {
"type": "string"
}
},
"encoders": {
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"skills.Device": {
"type": "object",
"properties": {
"devices": {
"type": "array",
"items": {
"$ref": "#/definitions/skills.HWDevice"
}
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"skills.Filter": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"skills.Format": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"skills.HWAccel": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"skills.HWDevice": {
"type": "object",
"properties": {
"extra": {
"type": "string"
},
"id": {
"type": "string"
},
"media": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"skills.Library": {
"type": "object",
"properties": {
"compiled": {
"type": "string"
},
"linked": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"skills.Protocol": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"skills.Skills": {
"type": "object",
"properties": {
"codecs": {
"$ref": "#/definitions/skills.ffCodecs"
},
"devices": {
"$ref": "#/definitions/skills.ffDevices"
},
"ffmpeg": {
"$ref": "#/definitions/skills.ffmpeg"
},
"filters": {
"type": "array",
"items": {
"$ref": "#/definitions/skills.Filter"
}
},
"formats": {
"$ref": "#/definitions/skills.ffFormats"
},
"hwaccels": {
"type": "array",
"items": {
"$ref": "#/definitions/skills.HWAccel"
}
},
"protocols": {
"$ref": "#/definitions/skills.ffProtocols"
}
}
},
"skills.ffCodecs": {
"type": "object",
"properties": {
"audio": {
"type": "array",
"items": {
"$ref": "#/definitions/skills.Codec"
}
},
"subtitle": {
"type": "array",
"items": {
"$ref": "#/definitions/skills.Codec"
}
},
"video": {
"type": "array",
"items": {
"$ref": "#/definitions/skills.Codec"
}
}
}
},
"skills.ffDevices": {
"type": "object",
"properties": {
"demuxers": {
"type": "array",
"items": {
"$ref": "#/definitions/skills.Device"
}
},
"muxers": {
"type": "array",
"items": {
"$ref": "#/definitions/skills.Device"
}
}
}
},
"skills.ffFormats": {
"type": "object",
"properties": {
"demuxers": {
"type": "array",
"items": {
"$ref": "#/definitions/skills.Format"
}
},
"muxers": {
"type": "array",
"items": {
"$ref": "#/definitions/skills.Format"
}
}
}
},
"skills.ffProtocols": {
"type": "object",
"properties": {
"input": {
"type": "array",
"items": {
"$ref": "#/definitions/skills.Protocol"
}
},
"output": {
"type": "array",
"items": {
"$ref": "#/definitions/skills.Protocol"
}
}
}
},
"skills.ffmpeg": {
"type": "object",
"properties": {
"compiler": {
"type": "string"
},
"configuration": {
"type": "string"
},
"libraries": {
"type": "array",
"items": {
"$ref": "#/definitions/skills.Library"
}
},
"version": {
"type": "string"
}
}
},
"value.Auth0Tenant": {
"type": "object",
"properties": {
"audience": {
"type": "string"
},
"clientid": {
"type": "string"
},
"domain": {
"type": "string"
},
"users": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"value.S3Storage": {
"type": "object",
"properties": {
"access_key_id": {
"type": "string"
},
"auth": {
"description": "Deprecated, use IAM",
"allOf": [
{
"$ref": "#/definitions/value.S3StorageAuth"
}
]
},
"bucket": {
"type": "string"
},
"endpoint": {
"type": "string"
},
"mountpoint": {
"type": "string"
},
"name": {
"type": "string"
},
"region": {
"type": "string"
},
"secret_access_key": {
"type": "string"
},
"use_ssl": {
"type": "boolean"
}
}
},
"value.S3StorageAuth": {
"type": "object",
"properties": {
"enable": {
"description": "Deprecated, use IAM",
"type": "boolean"
},
"password": {
"description": "Deprecated, use IAM",
"type": "string"
},
"username": {
"description": "Deprecated, use IAM",
"type": "string"
}
}
}
}
}`
// SwaggerInfoClusterAPI holds exported Swagger Info so clients can modify it
var SwaggerInfoClusterAPI = &swag.Spec{
Version: "1.0",
Host: "",
BasePath: "/",
Schemes: []string{},
Title: "datarhei Core Cluster API",
Description: "Internal REST API for the datarhei Core cluster",
InfoInstanceName: "ClusterAPI",
SwaggerTemplate: docTemplateClusterAPI,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfoClusterAPI.InstanceName(), SwaggerInfoClusterAPI)
}