4599 lines
140 KiB
Go
4599 lines
140 KiB
Go
// Package manager GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
|
// This file was generated by swaggo/swag
|
|
package manager
|
|
|
|
import (
|
|
"bytes"
|
|
"encoding/json"
|
|
"strings"
|
|
"text/template"
|
|
|
|
"github.com/swaggo/swag"
|
|
)
|
|
|
|
var doc = `{
|
|
"schemes": {{ marshal .Schemes }},
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "{{escape .Description}}",
|
|
"title": "{{.Title}}",
|
|
"contact": {
|
|
"url": "https://d7y.io"
|
|
},
|
|
"license": {
|
|
"name": "Apache 2.0"
|
|
},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/applications": {
|
|
"get": {
|
|
"description": "Get Applications",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Application"
|
|
],
|
|
"summary": "Get Applications",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"default": 0,
|
|
"description": "current page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"maximum": 50,
|
|
"minimum": 2,
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "return max item count, default 10, max 50",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Application"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Application"
|
|
],
|
|
"summary": "Create Application",
|
|
"parameters": [
|
|
{
|
|
"description": "Application",
|
|
"name": "Application",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.CreateApplicationRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Application"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/applications/{id}": {
|
|
"get": {
|
|
"description": "Get Application by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Application"
|
|
],
|
|
"summary": "Get Application",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Application"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Destroy by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Application"
|
|
],
|
|
"summary": "Destroy Application",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Update by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Application"
|
|
],
|
|
"summary": "Update Application",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Application",
|
|
"name": "Application",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.UpdateApplicationRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Application"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/applications/{id}/cdn-clusters/{cdn_cluster_id}": {
|
|
"put": {
|
|
"description": "Add CDN to Application",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Application"
|
|
],
|
|
"summary": "Add CDN to Application",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "cdn cluster id",
|
|
"name": "cdn_cluster_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete CDN to Application",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Application"
|
|
],
|
|
"summary": "Delete CDN to Application",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "cdn cluster id",
|
|
"name": "cdn_cluster_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/applications/{id}/scheduler-clusters/{scheduler_cluster_id}": {
|
|
"put": {
|
|
"description": "Add Scheduler to Application",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Application"
|
|
],
|
|
"summary": "Add Scheduler to Application",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "scheduler cluster id",
|
|
"name": "scheduler_cluster_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete Scheduler to Application",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Application"
|
|
],
|
|
"summary": "Delete Scheduler to Application",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "scheduler cluster id",
|
|
"name": "scheduler_cluster_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/cdn-clusters": {
|
|
"get": {
|
|
"description": "Get CDNClusters",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"CDNCluster"
|
|
],
|
|
"summary": "Get CDNClusters",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"default": 0,
|
|
"description": "current page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"maximum": 50,
|
|
"minimum": 2,
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "return max item count, default 10, max 50",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.CDNCluster"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"CDNCluster"
|
|
],
|
|
"summary": "Create CDNCluster",
|
|
"parameters": [
|
|
{
|
|
"description": "DNCluster",
|
|
"name": "CDNCluster",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.CreateCDNClusterRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.CDNCluster"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/cdn-clusters/{id}": {
|
|
"get": {
|
|
"description": "Get CDNCluster by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"CDNCluster"
|
|
],
|
|
"summary": "Get CDNCluster",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.CDNCluster"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Destroy by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"CDNCluster"
|
|
],
|
|
"summary": "Destroy CDNCluster",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Update by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"CDNCluster"
|
|
],
|
|
"summary": "Update CDNCluster",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "CDNCluster",
|
|
"name": "CDNCluster",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.UpdateCDNClusterRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.CDNCluster"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/cdn-clusters/{id}/cdns/{cdn_id}": {
|
|
"put": {
|
|
"description": "Add CDN to CDNCluster",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"CDNCluster"
|
|
],
|
|
"summary": "Add Instance to CDNCluster",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "cdn id",
|
|
"name": "cdn_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/cdn-clusters/{id}/scheduler-clusters/{scheduler_cluster_id}": {
|
|
"put": {
|
|
"description": "Add SchedulerCluster to CDNCluster",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"CDNCluster"
|
|
],
|
|
"summary": "Add SchedulerCluster to CDNCluster",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "scheduler cluster id",
|
|
"name": "scheduler_cluster_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/cdns": {
|
|
"get": {
|
|
"description": "Get CDNs",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"CDN"
|
|
],
|
|
"summary": "Get CDNs",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"default": 0,
|
|
"description": "current page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"maximum": 50,
|
|
"minimum": 2,
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "return max item count, default 10, max 50",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.CDN"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"CDN"
|
|
],
|
|
"summary": "Create CDN",
|
|
"parameters": [
|
|
{
|
|
"description": "CDN",
|
|
"name": "CDN",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.CreateCDNRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.CDN"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/cdns/{id}": {
|
|
"get": {
|
|
"description": "Get CDN by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"CDN"
|
|
],
|
|
"summary": "Get CDN",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.CDN"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Destroy by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"CDN"
|
|
],
|
|
"summary": "Destroy CDN",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Update by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"CDN"
|
|
],
|
|
"summary": "Update CDN",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "CDN",
|
|
"name": "CDN",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.UpdateCDNRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.CDN"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/configs": {
|
|
"get": {
|
|
"description": "Get Configs",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Config"
|
|
],
|
|
"summary": "Get Configs",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"default": 0,
|
|
"description": "current page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"maximum": 50,
|
|
"minimum": 2,
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "return max item count, default 10, max 50",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Config"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Config"
|
|
],
|
|
"summary": "Create Config",
|
|
"parameters": [
|
|
{
|
|
"description": "Config",
|
|
"name": "Config",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.CreateConfigRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Config"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/configs/{id}": {
|
|
"get": {
|
|
"description": "Get Config by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Config"
|
|
],
|
|
"summary": "Get Config",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Config"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Destroy by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Config"
|
|
],
|
|
"summary": "Destroy Config",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Update by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Config"
|
|
],
|
|
"summary": "Update Config",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Config",
|
|
"name": "Config",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.UpdateConfigRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Config"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/healthy": {
|
|
"get": {
|
|
"description": "Get app health",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Health"
|
|
],
|
|
"summary": "Get Health",
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/jobs": {
|
|
"get": {
|
|
"description": "Get Jobs",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Job"
|
|
],
|
|
"summary": "Get Jobs",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"default": 0,
|
|
"description": "current page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"maximum": 50,
|
|
"minimum": 2,
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "return max item count, default 10, max 50",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Job"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Job"
|
|
],
|
|
"summary": "Create Job",
|
|
"parameters": [
|
|
{
|
|
"description": "Job",
|
|
"name": "Job",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.CreateJobRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Job"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/jobs/{id}": {
|
|
"get": {
|
|
"description": "Get Job by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Job"
|
|
],
|
|
"summary": "Get Job",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Job"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Destroy by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Job"
|
|
],
|
|
"summary": "Destroy Job",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Update by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Job"
|
|
],
|
|
"summary": "Update Job",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Job",
|
|
"name": "Job",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.UpdateJobRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Job"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/oauth": {
|
|
"get": {
|
|
"description": "Get Oauths",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Oauth"
|
|
],
|
|
"summary": "Get Oauths",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"default": 0,
|
|
"description": "current page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"maximum": 50,
|
|
"minimum": 2,
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "return max item count, default 10, max 50",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Oauth"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Oauth"
|
|
],
|
|
"summary": "Create Oauth",
|
|
"parameters": [
|
|
{
|
|
"description": "Oauth",
|
|
"name": "Oauth",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.CreateOauthRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Oauth"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/oauth/{id}": {
|
|
"get": {
|
|
"description": "Get Oauth by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Oauth"
|
|
],
|
|
"summary": "Get Oauth",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Oauth"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Destroy by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Oauth"
|
|
],
|
|
"summary": "Destroy Oauth",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Update by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Oauth"
|
|
],
|
|
"summary": "Update Oauth",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Oauth",
|
|
"name": "Oauth",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.UpdateOauthRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Oauth"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/permissions": {
|
|
"get": {
|
|
"description": "Get Permissions",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Permission"
|
|
],
|
|
"summary": "Get Permissions",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/rbac.Permission"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/preheats": {
|
|
"post": {
|
|
"description": "create by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Preheat"
|
|
],
|
|
"summary": "Create V1 Preheat",
|
|
"parameters": [
|
|
{
|
|
"description": "Preheat",
|
|
"name": "CDN",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.CreateV1PreheatRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/types.CreateV1PreheatResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/preheats/{id}": {
|
|
"get": {
|
|
"description": "Get Preheat by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Preheat"
|
|
],
|
|
"summary": "Get V1 Preheat",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/types.GetV1PreheatResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/roles": {
|
|
"get": {
|
|
"description": "Get roles",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Role"
|
|
],
|
|
"summary": "Get Roles",
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Create Role by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Role"
|
|
],
|
|
"summary": "Create Role",
|
|
"parameters": [
|
|
{
|
|
"description": "Role",
|
|
"name": "Role",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.CreateRoleRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/roles/:role": {
|
|
"get": {
|
|
"description": "Get Role",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Role"
|
|
],
|
|
"summary": "Get Role",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "role",
|
|
"name": "role",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Destroy role by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Role"
|
|
],
|
|
"summary": "Destroy Role",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "role",
|
|
"name": "role",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/roles/:role/permissions": {
|
|
"post": {
|
|
"description": "Add Permission by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Role"
|
|
],
|
|
"summary": "Add Permission For Role",
|
|
"parameters": [
|
|
{
|
|
"description": "Permission",
|
|
"name": "Permission",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.AddPermissionForRoleRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "role",
|
|
"name": "role",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Remove Role Permission by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Role"
|
|
],
|
|
"summary": "Update Role",
|
|
"parameters": [
|
|
{
|
|
"description": "Permission",
|
|
"name": "Permission",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.DeletePermissionForRoleRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "role",
|
|
"name": "role",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/scheduler-clusters": {
|
|
"get": {
|
|
"description": "Get SchedulerClusters",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SchedulerCluster"
|
|
],
|
|
"summary": "Get SchedulerClusters",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"default": 0,
|
|
"description": "current page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"maximum": 50,
|
|
"minimum": 2,
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "return max item count, default 10, max 50",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.SchedulerCluster"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SchedulerCluster"
|
|
],
|
|
"summary": "Create SchedulerCluster",
|
|
"parameters": [
|
|
{
|
|
"description": "SchedulerCluster",
|
|
"name": "SchedulerCluster",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.CreateSchedulerClusterRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.SchedulerCluster"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/scheduler-clusters/{id}": {
|
|
"get": {
|
|
"description": "Get SchedulerCluster by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SchedulerCluster"
|
|
],
|
|
"summary": "Get SchedulerCluster",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.SchedulerCluster"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Destroy by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SchedulerCluster"
|
|
],
|
|
"summary": "Destroy SchedulerCluster",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Update by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SchedulerCluster"
|
|
],
|
|
"summary": "Update SchedulerCluster",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "SchedulerCluster",
|
|
"name": "SchedulerCluster",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.UpdateSchedulerClusterRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.SchedulerCluster"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/scheduler-clusters/{id}/schedulers/{scheduler_id}": {
|
|
"put": {
|
|
"description": "Add Scheduler to schedulerCluster",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SchedulerCluster"
|
|
],
|
|
"summary": "Add Scheduler to schedulerCluster",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "scheduler id",
|
|
"name": "scheduler_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/schedulers": {
|
|
"get": {
|
|
"description": "Get Schedulers",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Scheduler"
|
|
],
|
|
"summary": "Get Schedulers",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"default": 0,
|
|
"description": "current page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"maximum": 50,
|
|
"minimum": 2,
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "return max item count, default 10, max 50",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Scheduler"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Scheduler"
|
|
],
|
|
"summary": "Create Scheduler",
|
|
"parameters": [
|
|
{
|
|
"description": "Scheduler",
|
|
"name": "Scheduler",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.CreateSchedulerRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Scheduler"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/schedulers/{id}": {
|
|
"get": {
|
|
"description": "Get Scheduler by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Scheduler"
|
|
],
|
|
"summary": "Get Scheduler",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Scheduler"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Destroy by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Scheduler"
|
|
],
|
|
"summary": "Destroy Scheduler",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Update by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Scheduler"
|
|
],
|
|
"summary": "Update Scheduler",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Scheduler",
|
|
"name": "Scheduler",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.UpdateSchedulerRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Scheduler"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/security-groups": {
|
|
"get": {
|
|
"description": "Get SecurityGroups",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityGroup"
|
|
],
|
|
"summary": "Get SecurityGroups",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"default": 0,
|
|
"description": "current page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"maximum": 50,
|
|
"minimum": 2,
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "return max item count, default 10, max 50",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.SecurityGroup"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityGroup"
|
|
],
|
|
"summary": "Create SecurityGroup",
|
|
"parameters": [
|
|
{
|
|
"description": "SecurityGroup",
|
|
"name": "SecurityGroup",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.CreateSecurityGroupRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.SecurityGroup"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/security-groups/{id}": {
|
|
"get": {
|
|
"description": "Get SecurityGroup by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityGroup"
|
|
],
|
|
"summary": "Get SecurityGroup",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.SecurityGroup"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Update by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityGroup"
|
|
],
|
|
"summary": "Update SecurityGroup",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "SecurityGroup",
|
|
"name": "SecurityGroup",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.UpdateSecurityGroupRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.SecurityGroup"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/security-groups/{id}/cdn-clusters/{cdn_cluster_id}": {
|
|
"put": {
|
|
"description": "Add CDN to SecurityGroup",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityGroup"
|
|
],
|
|
"summary": "Add CDN to SecurityGroup",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "cdn cluster id",
|
|
"name": "cdn_cluster_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/security-groups/{id}/scheduler-clusters/{scheduler_cluster_id}": {
|
|
"put": {
|
|
"description": "Add Scheduler to SecurityGroup",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityGroup"
|
|
],
|
|
"summary": "Add Scheduler to SecurityGroup",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "scheduler cluster id",
|
|
"name": "scheduler_cluster_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/security-groups/{id}/security-rules/{security_rule_id}": {
|
|
"put": {
|
|
"description": "Add SecurityRule to SecurityGroup",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityGroup"
|
|
],
|
|
"summary": "Add SecurityRule to SecurityGroup",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "security rule id",
|
|
"name": "security_rule_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Destroy SecurityRule to SecurityGroup",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityGroup"
|
|
],
|
|
"summary": "Destroy SecurityRule to SecurityGroup",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "security rule id",
|
|
"name": "security_rule_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/security-rules": {
|
|
"get": {
|
|
"description": "Get SecurityRules",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityRule"
|
|
],
|
|
"summary": "Get SecurityRules",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"default": 0,
|
|
"description": "current page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"maximum": 50,
|
|
"minimum": 2,
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "return max item count, default 10, max 50",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.SecurityRule"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityRule"
|
|
],
|
|
"summary": "Create SecurityRule",
|
|
"parameters": [
|
|
{
|
|
"description": "SecurityRule",
|
|
"name": "SecurityRule",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.CreateSecurityRuleRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.SecurityRule"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/security-rules/{id}": {
|
|
"get": {
|
|
"description": "Get SecurityRule by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityRule"
|
|
],
|
|
"summary": "Get SecurityRule",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.SecurityRule"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Update by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityRule"
|
|
],
|
|
"summary": "Update SecurityRule",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "SecurityRule",
|
|
"name": "SecurityRule",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.UpdateSecurityRuleRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.SecurityRule"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/securityGroups/{id}": {
|
|
"delete": {
|
|
"description": "Destroy by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityGroup"
|
|
],
|
|
"summary": "Destroy SecurityGroup",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/securityRules/{id}": {
|
|
"delete": {
|
|
"description": "Destroy by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"SecurityRule"
|
|
],
|
|
"summary": "Destroy SecurityRule",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/signin/{name}": {
|
|
"get": {
|
|
"description": "oauth signin by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "Oauth Signin",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/signin/{name}/callback": {
|
|
"get": {
|
|
"description": "oauth signin callback by json config",
|
|
"tags": [
|
|
"Oauth"
|
|
],
|
|
"summary": "Oauth Signin Callback",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "code",
|
|
"name": "code",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/signup": {
|
|
"post": {
|
|
"description": "signup by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "SignUp user",
|
|
"parameters": [
|
|
{
|
|
"description": "User",
|
|
"name": "User",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.SignUpRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.User"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users": {
|
|
"get": {
|
|
"description": "Get Users",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"CDN"
|
|
],
|
|
"summary": "Get Users",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"default": 0,
|
|
"description": "current page",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"maximum": 50,
|
|
"minimum": 2,
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "return max item count, default 10, max 50",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.CDN"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/{id}": {
|
|
"get": {
|
|
"description": "Get User by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "Get User",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.User"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"404": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/{id}/reset_password": {
|
|
"post": {
|
|
"description": "reset password by json config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "Reset Password For User",
|
|
"parameters": [
|
|
{
|
|
"description": "User",
|
|
"name": "User",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.ResetPasswordRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/{id}/roles": {
|
|
"get": {
|
|
"description": "get roles by json config",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "Get User Roles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/{id}/roles/{role}": {
|
|
"put": {
|
|
"description": "add role to user by uri config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Add Role For User",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "role",
|
|
"name": "role",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "delete role by uri config",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Delete Role For User",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "role",
|
|
"name": "role",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": ""
|
|
},
|
|
"500": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"model.Application": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"cdn_clusters": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.CDNCluster"
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"download_rate_limit": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"scheduler_clusters": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.SchedulerCluster"
|
|
}
|
|
},
|
|
"state": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"$ref": "#/definitions/model.User"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.CDN": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cdnclusterID": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"download_port": {
|
|
"type": "integer"
|
|
},
|
|
"host_name": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"idc": {
|
|
"type": "string"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"location": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "integer"
|
|
},
|
|
"state": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.CDNCluster": {
|
|
"type": "object",
|
|
"properties": {
|
|
"application_id": {
|
|
"type": "integer"
|
|
},
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"config": {
|
|
"$ref": "#/definitions/model.JSONMap"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"is_default": {
|
|
"type": "boolean"
|
|
},
|
|
"jobs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Job"
|
|
}
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"scheduler_clusters": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.SchedulerCluster"
|
|
}
|
|
},
|
|
"security_group_id": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.Config": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.JSONMap": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"model.Job": {
|
|
"type": "object",
|
|
"properties": {
|
|
"args": {
|
|
"$ref": "#/definitions/model.JSONMap"
|
|
},
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"cdn_clusters": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.CDNCluster"
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"result": {
|
|
"$ref": "#/definitions/model.JSONMap"
|
|
},
|
|
"scheduler_clusters": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.SchedulerCluster"
|
|
}
|
|
},
|
|
"state": {
|
|
"type": "string"
|
|
},
|
|
"task_id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.Oauth": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"client_id": {
|
|
"type": "string"
|
|
},
|
|
"client_secret": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"redirect_url": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.Scheduler": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"host_name": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"idc": {
|
|
"type": "string"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"location": {
|
|
"type": "string"
|
|
},
|
|
"net_config": {
|
|
"$ref": "#/definitions/model.JSONMap"
|
|
},
|
|
"port": {
|
|
"type": "integer"
|
|
},
|
|
"schedulerClusterID": {
|
|
"type": "integer"
|
|
},
|
|
"state": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"vips": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.SchedulerCluster": {
|
|
"type": "object",
|
|
"properties": {
|
|
"application_id": {
|
|
"type": "integer"
|
|
},
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"cdn_clusters": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.CDNCluster"
|
|
}
|
|
},
|
|
"client_config": {
|
|
"$ref": "#/definitions/model.JSONMap"
|
|
},
|
|
"config": {
|
|
"$ref": "#/definitions/model.JSONMap"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"is_default": {
|
|
"type": "boolean"
|
|
},
|
|
"jobs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Job"
|
|
}
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"scopes": {
|
|
"$ref": "#/definitions/model.JSONMap"
|
|
},
|
|
"security_group_id": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.SecurityGroup": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"security_rules": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.SecurityRule"
|
|
}
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.SecurityRule": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"proxy_domain": {
|
|
"type": "string"
|
|
},
|
|
"security_groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.SecurityGroup"
|
|
}
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.User": {
|
|
"type": "object",
|
|
"properties": {
|
|
"avatar": {
|
|
"type": "string"
|
|
},
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"location": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"state": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"rbac.Permission": {
|
|
"type": "object",
|
|
"required": [
|
|
"action",
|
|
"object"
|
|
],
|
|
"properties": {
|
|
"action": {
|
|
"type": "string"
|
|
},
|
|
"object": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.AddPermissionForRoleRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"action",
|
|
"object"
|
|
],
|
|
"properties": {
|
|
"action": {
|
|
"type": "string"
|
|
},
|
|
"object": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.CDNClusterConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"load_limit": {
|
|
"type": "integer"
|
|
},
|
|
"net_topology": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.CreateApplicationRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"user_id"
|
|
],
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"download_rate_limit": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"state": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"types.CreateCDNClusterRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"config",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"config": {
|
|
"$ref": "#/definitions/types.CDNClusterConfig"
|
|
},
|
|
"is_default": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.CreateCDNRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"cdn_cluster_id",
|
|
"download_port",
|
|
"host_name",
|
|
"idc",
|
|
"ip",
|
|
"port"
|
|
],
|
|
"properties": {
|
|
"cdn_cluster_id": {
|
|
"type": "integer"
|
|
},
|
|
"download_port": {
|
|
"type": "integer"
|
|
},
|
|
"host_name": {
|
|
"type": "string"
|
|
},
|
|
"idc": {
|
|
"type": "string"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"location": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"types.CreateConfigRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"user_id",
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.CreateJobRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"args": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"cdn_cluster_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"result": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"scheduler_cluster_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"types.CreateOauthRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"client_id",
|
|
"client_secret",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"client_id": {
|
|
"type": "string"
|
|
},
|
|
"client_secret": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"redirect_url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.CreateRoleRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"permissions",
|
|
"role"
|
|
],
|
|
"properties": {
|
|
"permissions": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/rbac.Permission"
|
|
}
|
|
},
|
|
"role": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.CreateSchedulerClusterRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"client_config",
|
|
"config",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"cdn_cluster_id": {
|
|
"type": "integer"
|
|
},
|
|
"client_config": {
|
|
"$ref": "#/definitions/types.SchedulerClusterClientConfig"
|
|
},
|
|
"config": {
|
|
"$ref": "#/definitions/types.SchedulerClusterConfig"
|
|
},
|
|
"is_default": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"scopes": {
|
|
"$ref": "#/definitions/types.SchedulerClusterScopes"
|
|
}
|
|
}
|
|
},
|
|
"types.CreateSchedulerRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"host_name",
|
|
"idc",
|
|
"ip",
|
|
"port",
|
|
"scheduler_cluster_id"
|
|
],
|
|
"properties": {
|
|
"host_name": {
|
|
"type": "string"
|
|
},
|
|
"idc": {
|
|
"type": "string"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"location": {
|
|
"type": "string"
|
|
},
|
|
"net_config": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"port": {
|
|
"type": "integer"
|
|
},
|
|
"scheduler_cluster_id": {
|
|
"type": "integer"
|
|
},
|
|
"vips": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.CreateSecurityGroupRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.CreateSecurityRuleRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"domain",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"proxy_domain": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.CreateV1PreheatRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"type",
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"filter": {
|
|
"type": "string"
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.CreateV1PreheatResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.DeletePermissionForRoleRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"action",
|
|
"object"
|
|
],
|
|
"properties": {
|
|
"action": {
|
|
"type": "string"
|
|
},
|
|
"object": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.GetV1PreheatResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"finishTime": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"startTime": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.ResetPasswordRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"new_password",
|
|
"old_password"
|
|
],
|
|
"properties": {
|
|
"new_password": {
|
|
"type": "string"
|
|
},
|
|
"old_password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.SchedulerClusterClientConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"load_limit": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"types.SchedulerClusterConfig": {
|
|
"type": "object"
|
|
},
|
|
"types.SchedulerClusterScopes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"idc": {
|
|
"type": "string"
|
|
},
|
|
"location": {
|
|
"type": "string"
|
|
},
|
|
"net_topology": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.SignUpRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"name",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"avatar": {
|
|
"type": "string"
|
|
},
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"location": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.UpdateApplicationRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"user_id"
|
|
],
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"download_rate_limit": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"state": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"types.UpdateCDNClusterRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"config": {
|
|
"$ref": "#/definitions/types.CDNClusterConfig"
|
|
},
|
|
"is_default": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.UpdateCDNRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cdn_cluster_id": {
|
|
"type": "integer"
|
|
},
|
|
"download_port": {
|
|
"type": "integer"
|
|
},
|
|
"idc": {
|
|
"type": "string"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"location": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"types.UpdateConfigRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.UpdateJobRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"types.UpdateOauthRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"client_id": {
|
|
"type": "string"
|
|
},
|
|
"client_secret": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"redirect_url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.UpdateSchedulerClusterRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"cdn_cluster_id": {
|
|
"type": "integer"
|
|
},
|
|
"client_config": {
|
|
"$ref": "#/definitions/types.SchedulerClusterClientConfig"
|
|
},
|
|
"config": {
|
|
"$ref": "#/definitions/types.SchedulerClusterConfig"
|
|
},
|
|
"is_default": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"scopes": {
|
|
"$ref": "#/definitions/types.SchedulerClusterScopes"
|
|
}
|
|
}
|
|
},
|
|
"types.UpdateSchedulerRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"idc": {
|
|
"type": "string"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"location": {
|
|
"type": "string"
|
|
},
|
|
"net_config": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"port": {
|
|
"type": "integer"
|
|
},
|
|
"scheduler_cluster_id": {
|
|
"type": "integer"
|
|
},
|
|
"scheduler_id": {
|
|
"type": "integer"
|
|
},
|
|
"vips": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.UpdateSecurityGroupRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.UpdateSecurityRuleRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"proxy_domain": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}`
|
|
|
|
type swaggerInfo struct {
|
|
Version string
|
|
Host string
|
|
BasePath string
|
|
Schemes []string
|
|
Title string
|
|
Description string
|
|
}
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = swaggerInfo{
|
|
Version: "1.0.0",
|
|
Host: "localhost:8080",
|
|
BasePath: "/api/v1",
|
|
Schemes: []string{},
|
|
Title: "Dragonfly Manager",
|
|
Description: "Dragonfly Manager Server",
|
|
}
|
|
|
|
type s struct{}
|
|
|
|
func (s *s) ReadDoc() string {
|
|
sInfo := SwaggerInfo
|
|
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
|
|
|
|
t, err := template.New("swagger_info").Funcs(template.FuncMap{
|
|
"marshal": func(v interface{}) string {
|
|
a, _ := json.Marshal(v)
|
|
return string(a)
|
|
},
|
|
"escape": func(v interface{}) string {
|
|
// escape tabs
|
|
str := strings.Replace(v.(string), "\t", "\\t", -1)
|
|
// replace " with \", and if that results in \\", replace that with \\\"
|
|
str = strings.Replace(str, "\"", "\\\"", -1)
|
|
return strings.Replace(str, "\\\\\"", "\\\\\\\"", -1)
|
|
},
|
|
}).Parse(doc)
|
|
if err != nil {
|
|
return doc
|
|
}
|
|
|
|
var tpl bytes.Buffer
|
|
if err := t.Execute(&tpl, sInfo); err != nil {
|
|
return doc
|
|
}
|
|
|
|
return tpl.String()
|
|
}
|
|
|
|
func init() {
|
|
swag.Register("swagger", &s{})
|
|
}
|