// Package docs GENERATED BY SWAG; DO NOT EDIT // This file was generated by swaggo/swag package docs import "github.com/swaggo/swag" const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", "termsOfService": "http://kubeoperator.io", "contact": { "name": "Fit2cloud Support", "url": "https://www.fit2cloud.com", "email": "support@fit2cloud.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/imagerepos": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create repo", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repos" ], "summary": "Create repo", "parameters": [ { "description": "request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/imagerepo.RepoConfig" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/imagerepo.RepoConfig" } } } } }, "/imagerepos/cluster/{cluster}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get repo for cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repos" ], "summary": "List repo for cluster", "parameters": [ { "type": "string", "description": "集群名称", "name": "cluster", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/imagerepo.ImageRepo" } } } } } }, "/imagerepos/repositories/search": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "List Internal repos", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repos" ], "summary": "List Internal repos", "parameters": [ { "description": "request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/imagerepo.RepoConfig" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "type": "string" } } } } } }, "/imagerepos/{cluster}/{repo}": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get images for cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repos" ], "summary": "List images for cluster", "parameters": [ { "type": "string", "description": "集群名称", "name": "cluster", "in": "path", "required": true }, { "type": "string", "description": "镜像仓库名称", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "type": "string" } } } } } }, "/imagerepos/{name}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get repo by name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repos" ], "summary": "Get repo by name", "parameters": [ { "type": "string", "description": "镜像仓库名称", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/imagerepo.ImageRepo" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update repo by name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repos" ], "summary": "Update repo by name", "parameters": [ { "description": "request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/imagerepo.RepoConfig" } }, { "type": "string", "description": "镜像仓库名称", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/imagerepo.ImageRepo" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete repo by name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repos" ], "summary": "Delete repo by name", "parameters": [ { "type": "string", "description": "镜像仓库名称", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/imagerepo.ImageRepo" } } } } }, "/imagerepos/{repo}/search": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get images by repo", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repos" ], "summary": "List images by repo", "parameters": [ { "type": "string", "description": "镜像仓库名称", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/imagerepo.RepoResponse" } } } } }, "/roles": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List all roles", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "roles" ], "summary": "List all roles", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/role.Role" } } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create role", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "roles" ], "summary": "Create role", "parameters": [ { "description": "request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/role.Role" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/role.Role" } } } } }, "/roles/{name}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get role by name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "roles" ], "summary": "Get role by name", "parameters": [ { "type": "string", "description": "权限名称", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/role.Role" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update role by name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "roles" ], "summary": "Update role by name", "parameters": [ { "type": "string", "description": "角色名称", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/role.Role" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete role by name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "roles" ], "summary": "Delete role by name", "parameters": [ { "type": "string", "description": "角色名称", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/role.Role" } } } } }, "/users": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List all users", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "List all users", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/user.User" } } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Create user", "parameters": [ { "description": "request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/docs.UserCreate" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/user.User" } } } } }, "/users/search": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Search users by Condition", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Search users", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.Page" } } } } }, "/users/{name}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get user by name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Get user by name", "parameters": [ { "type": "string", "description": "用户名称", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/user.User" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update user by name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Update user by name", "parameters": [ { "type": "string", "description": "用户名称", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/user.User" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete user by name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Delete user by name", "parameters": [ { "type": "string", "description": "用户名称", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/user.User" } } } } } }, "definitions": { "api.Page": { "type": "object", "properties": { "items": {}, "total": { "type": "integer" } } }, "docs.Authenticate": { "type": "object", "properties": { "password": { "type": "string" } } }, "docs.Mfa": { "type": "object", "properties": { "enable": { "type": "boolean" } } }, "docs.UserCreate": { "type": "object", "properties": { "authenticate": { "$ref": "#/definitions/docs.Authenticate" }, "email": { "type": "string" }, "isAdmin": { "type": "boolean" }, "mfa": { "$ref": "#/definitions/docs.Mfa" }, "name": { "type": "string" }, "nickName": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } } } }, "imagerepo.Credential": { "type": "object", "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "imagerepo.ImageRepo": { "type": "object", "properties": { "allowAnonymous": { "type": "boolean" }, "apiVersion": { "type": "string" }, "auth": { "type": "boolean" }, "builtIn": { "type": "boolean" }, "createAt": { "type": "string" }, "createdBy": { "type": "string" }, "credential": { "$ref": "#/definitions/imagerepo.Credential" }, "description": { "type": "string" }, "downloadUrl": { "type": "string" }, "endPoint": { "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" }, "repoName": { "type": "string" }, "type": { "type": "string" }, "updateAt": { "type": "string" }, "uuid": { "type": "string" }, "version": { "type": "string" } } }, "imagerepo.RepoConfig": { "type": "object", "required": [ "limit", "page" ], "properties": { "allowAnonymous": { "type": "boolean" }, "apiVersion": { "type": "string" }, "auth": { "type": "boolean" }, "builtIn": { "type": "boolean" }, "continueToken": { "type": "string" }, "createAt": { "type": "string" }, "createdBy": { "type": "string" }, "credential": { "$ref": "#/definitions/imagerepo.Credential" }, "description": { "type": "string" }, "downloadUrl": { "type": "string" }, "endPoint": { "type": "string" }, "kind": { "type": "string" }, "limit": { "type": "integer" }, "name": { "type": "string" }, "page": { "type": "integer" }, "repoName": { "type": "string" }, "search": { "type": "string" }, "type": { "type": "string" }, "updateAt": { "type": "string" }, "uuid": { "type": "string" }, "version": { "type": "string" } } }, "imagerepo.RepoResponse": { "type": "object", "properties": { "continueToken": { "type": "string" }, "items": { "type": "array", "items": { "type": "string" } } } }, "role.PolicyRule": { "type": "object", "properties": { "resource": { "type": "array", "items": { "type": "string" } }, "resourceNames": { "type": "array", "items": { "type": "string" } }, "verbs": { "type": "array", "items": { "type": "string" } } } }, "role.Role": { "type": "object", "properties": { "apiVersion": { "type": "string" }, "builtIn": { "type": "boolean" }, "createAt": { "type": "string" }, "createdBy": { "type": "string" }, "description": { "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" }, "rules": { "type": "array", "items": { "$ref": "#/definitions/role.PolicyRule" } }, "updateAt": { "type": "string" }, "uuid": { "type": "string" } } }, "user.Authenticate": { "type": "object", "properties": { "password": { "type": "string" }, "token": { "type": "string" } } }, "user.Mfa": { "type": "object", "properties": { "enable": { "type": "boolean" }, "secret": { "type": "string" } } }, "user.User": { "type": "object", "properties": { "apiVersion": { "type": "string" }, "authenticate": { "$ref": "#/definitions/user.Authenticate" }, "builtIn": { "type": "boolean" }, "createAt": { "type": "string" }, "createdBy": { "type": "string" }, "description": { "type": "string" }, "email": { "type": "string" }, "isAdmin": { "type": "boolean" }, "kind": { "type": "string" }, "language": { "type": "string" }, "mfa": { "$ref": "#/definitions/user.Mfa" }, "name": { "type": "string" }, "nickName": { "type": "string" }, "type": { "type": "string" }, "updateAt": { "type": "string" }, "uuid": { "type": "string" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "", Host: "", BasePath: "/kubepi/api/v1", Schemes: []string{}, Title: "KubePi Restful API", Description: "", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }