1564 lines
54 KiB
Go
1564 lines
54 KiB
Go
// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
|
// This file was generated by swaggo/swag
|
|
package docs
|
|
|
|
import "github.com/integration-system/isp-lib/v2/docs"
|
|
|
|
var doc = `{
|
|
"schemes": {{ marshal .Schemes }},
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "{{.Description}}",
|
|
"title": "{{.Title}}",
|
|
"contact": {},
|
|
"license": {
|
|
"name": "GNU GPL v3.0"
|
|
},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/access_list/get_by_id": {
|
|
"post": {
|
|
"description": "Возвращает список методов для приложения, для которых заданы настройки доступа",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"accessList"
|
|
],
|
|
"summary": "Получить список доступности методов для приложения",
|
|
"parameters": [
|
|
{
|
|
"description": "идентификатор приложения",
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Identity"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "список доступности методов",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.MethodInfo"
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/access_list/set_list": {
|
|
"post": {
|
|
"description": "Возвращает список методов для приложения, для которых заданы настройки доступа",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"accessList"
|
|
],
|
|
"summary": "Настроить доступность списка методов для приложения",
|
|
"parameters": [
|
|
{
|
|
"description": "объект настройки доступа",
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.AccessListSetListRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "список доступности методов",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.MethodInfo"
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/access_list/set_one": {
|
|
"post": {
|
|
"description": "Возвращает количество измененных строк",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"accessList"
|
|
],
|
|
"summary": "Настроить доступность метода для приложения",
|
|
"parameters": [
|
|
{
|
|
"description": "объект для настройки доступа",
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.AccessListSetOneRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "количество измененных строк",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.AccessListSetOneResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/application/create_update_application": {
|
|
"post": {
|
|
"description": "Если приложение с такими идентификатором существует, то обновляет данные, если нет, то добавляет данные в базу",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"application"
|
|
],
|
|
"summary": "Создать/обновить приложение",
|
|
"parameters": [
|
|
{
|
|
"description": "Объект приложения",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ApplicationCreateUpdateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ApplicationWithTokens"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"409": {
|
|
"description": "Conflict",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/application/delete_applications": {
|
|
"post": {
|
|
"description": "Удаляет приложения по списку их идентификаторов, возвращает количество удаленных приложений",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"application"
|
|
],
|
|
"summary": "Удалить приложения",
|
|
"parameters": [
|
|
{
|
|
"description": "Массив идентификаторов приложений",
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.DeleteResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/application/get_application_by_id": {
|
|
"post": {
|
|
"description": "Возвращает описание приложения по его идентификатору",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"application"
|
|
],
|
|
"summary": "Получить приложение по идентификатору",
|
|
"parameters": [
|
|
{
|
|
"description": "Идентификатор приложения",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Identity"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ApplicationWithTokens"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/application/get_applications": {
|
|
"post": {
|
|
"description": "Возвращает массив приложений с токенами по их идентификаторам",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"application"
|
|
],
|
|
"summary": "Получить список приложений",
|
|
"parameters": [
|
|
{
|
|
"description": "Массив идентификаторов приложений",
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ApplicationWithTokens"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/application/get_applications_by_service_id": {
|
|
"post": {
|
|
"description": "Возвращает список приложений по запрошенному идентификатору сервиса",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"application"
|
|
],
|
|
"summary": "Получить список приложений по идентификатору сервиса",
|
|
"parameters": [
|
|
{
|
|
"description": "Идентификатор сервиса",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Identity"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ApplicationWithTokens"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/application/get_system_tree": {
|
|
"post": {
|
|
"description": "Возвращает описание взаимосвязей сервисов и приложений",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"application"
|
|
],
|
|
"summary": "Метод получения системного дерева",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.DomainWithService"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/domain/create_update_domain": {
|
|
"post": {
|
|
"description": "Если домен с такими идентификатором существует, то обновляет данные, если нет, то добавляет данные в базу",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"domain"
|
|
],
|
|
"summary": "Создать/обновить домен",
|
|
"parameters": [
|
|
{
|
|
"description": "Объект домена",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.DomainCreateUpdateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Domain"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/domain/delete_domains": {
|
|
"post": {
|
|
"description": "Удаляет домены по списку их идентификаторов, возвращает количество удаленных доменов",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"domain"
|
|
],
|
|
"summary": "Удаление доменов",
|
|
"parameters": [
|
|
{
|
|
"description": "Массив идентификаторов доменов",
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.DeleteResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/domain/get_domain_by_id": {
|
|
"post": {
|
|
"description": "Возвращает описание домена по его идентификатору",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"domain"
|
|
],
|
|
"summary": "Получить домен по идентификатору",
|
|
"parameters": [
|
|
{
|
|
"description": "Идентификатор домена",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Identity"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Domain"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/domain/get_domains_by_system_id": {
|
|
"post": {
|
|
"description": "Возвращает список доменов по системному идентификатору",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"domain"
|
|
],
|
|
"summary": "Получить домены по идентификатору системы",
|
|
"parameters": [
|
|
{
|
|
"description": "Идентификатор системы",
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Domain"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/secure/authenticate": {
|
|
"post": {
|
|
"description": "Проверяет наличие токена в системе,",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"secure"
|
|
],
|
|
"summary": "Метод аутентификации токена",
|
|
"parameters": [
|
|
{
|
|
"description": "Тело запроса",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.AuthenticateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.AuthenticateResponse"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/secure/authorize": {
|
|
"post": {
|
|
"description": "Проверяет доступ приложения к запрашиваемому ендпоинту",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"secure"
|
|
],
|
|
"summary": "Метод авторизации приложения",
|
|
"parameters": [
|
|
{
|
|
"description": "Тело запрос",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.AuthorizeRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.AuthorizeResponse"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/service/create_update_service": {
|
|
"post": {
|
|
"description": "Если сервис с такими идентификатором существует, то обновляет данные, если нет, то добавляет данные в базу",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"service"
|
|
],
|
|
"summary": "Создать/обновить сервис",
|
|
"parameters": [
|
|
{
|
|
"description": "Объект сервиса",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ServiceCreateUpdateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Service"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"409": {
|
|
"description": "Conflict",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/service/delete_service": {
|
|
"post": {
|
|
"description": "Удаляет сервисов по списку их идентификаторов, возвращает количество удаленных сервисов",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"service"
|
|
],
|
|
"summary": "Удалить сервисы",
|
|
"parameters": [
|
|
{
|
|
"description": "Массив идентификаторов сервисов",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.DeleteResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/service/get_service": {
|
|
"post": {
|
|
"description": "Возвращает список сервисов по их идентификаторам",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"service"
|
|
],
|
|
"summary": "Получить список сервисов",
|
|
"parameters": [
|
|
{
|
|
"description": "Массив идентификаторов сервисов",
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Service"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/service/get_service_by_id": {
|
|
"post": {
|
|
"description": "Возвращает описание сервиса по его идентификатору",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"service"
|
|
],
|
|
"summary": "Получить сервис по идентификатору",
|
|
"parameters": [
|
|
{
|
|
"description": "Идентификатор сервиса",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Identity"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Service"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/service/get_services_by_domain_id": {
|
|
"post": {
|
|
"description": "Возвращает список сервисов по идентификатору домена",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"service"
|
|
],
|
|
"summary": "Получить список сервисов по идентификатору домена",
|
|
"parameters": [
|
|
{
|
|
"description": "Идентификатор домена",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Identity"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Service"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/token/create_token": {
|
|
"post": {
|
|
"description": "Создает токен и привязывает его к приложению",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"token"
|
|
],
|
|
"summary": "Создать токен",
|
|
"parameters": [
|
|
{
|
|
"description": "Объект создания токена",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.TokenCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ApplicationWithTokens"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/token/get_tokens_by_app_id": {
|
|
"post": {
|
|
"description": "Возвращает список токенов, привязанных к приложению",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"token"
|
|
],
|
|
"summary": "Получить токены по идентификатору приложения",
|
|
"parameters": [
|
|
{
|
|
"description": "Идентификатор приложения",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Identity"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/entity.Token"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/token/revoke_tokens": {
|
|
"post": {
|
|
"description": "Отвязывает токены от приложений и удаляет их",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"token"
|
|
],
|
|
"summary": "Отозвать токены",
|
|
"parameters": [
|
|
{
|
|
"description": "Объект отзыва токенов",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.TokenRevokeRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ApplicationWithTokens"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/token/revoke_tokens_for_app": {
|
|
"post": {
|
|
"description": "Отвязывает токены от приложений и удаляет их по идентификатору приложения",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"token"
|
|
],
|
|
"summary": "Отозвать токены для приложения",
|
|
"parameters": [
|
|
{
|
|
"description": "Идентификатор приложения",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Identity"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.DeleteResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GrpcError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"domain.AccessListSetListRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"appId"
|
|
],
|
|
"properties": {
|
|
"appId": {
|
|
"type": "integer"
|
|
},
|
|
"methods": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.MethodInfo"
|
|
}
|
|
},
|
|
"removeOld": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"domain.AccessListSetOneRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"appId",
|
|
"method"
|
|
],
|
|
"properties": {
|
|
"appId": {
|
|
"type": "integer"
|
|
},
|
|
"method": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"domain.AccessListSetOneResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.Application": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"serviceId": {
|
|
"type": "integer"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ApplicationCreateUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"serviceId",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"serviceId": {
|
|
"type": "integer"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"SYSTEM",
|
|
"MOBILE"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"domain.ApplicationSimple": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"tokens": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Token"
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ApplicationWithTokens": {
|
|
"type": "object",
|
|
"properties": {
|
|
"app": {
|
|
"$ref": "#/definitions/domain.Application"
|
|
},
|
|
"tokens": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Token"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.AuthData": {
|
|
"type": "object",
|
|
"properties": {
|
|
"applicationId": {
|
|
"type": "integer"
|
|
},
|
|
"domainId": {
|
|
"type": "integer"
|
|
},
|
|
"serviceId": {
|
|
"type": "integer"
|
|
},
|
|
"systemId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.AuthenticateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"token"
|
|
],
|
|
"properties": {
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.AuthenticateResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"authData": {
|
|
"$ref": "#/definitions/domain.AuthData"
|
|
},
|
|
"authenticated": {
|
|
"type": "boolean"
|
|
},
|
|
"errorReason": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.AuthorizeRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"applicationId",
|
|
"endpoint"
|
|
],
|
|
"properties": {
|
|
"applicationId": {
|
|
"type": "integer"
|
|
},
|
|
"endpoint": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.AuthorizeResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"authorized": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"domain.DeleteResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"deleted": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.Domain": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"systemId": {
|
|
"type": "integer"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.DomainCreateUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.DomainWithService": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"services": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ServiceWithApps"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.GrpcError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"details": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"errorCode": {
|
|
"type": "string"
|
|
},
|
|
"errorMessage": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.Identity": {
|
|
"type": "object",
|
|
"required": [
|
|
"id"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.MethodInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"method": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"domain.Service": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"domainId": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ServiceCreateUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"domainId",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"domainId": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ServiceWithApps": {
|
|
"type": "object",
|
|
"properties": {
|
|
"apps": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ApplicationSimple"
|
|
}
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.Token": {
|
|
"type": "object",
|
|
"properties": {
|
|
"appId": {
|
|
"type": "integer"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"expireTime": {
|
|
"type": "integer"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.TokenCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"appId"
|
|
],
|
|
"properties": {
|
|
"appId": {
|
|
"type": "integer"
|
|
},
|
|
"expireTimeMs": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.TokenRevokeRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"appId"
|
|
],
|
|
"properties": {
|
|
"appId": {
|
|
"type": "integer"
|
|
},
|
|
"tokens": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"entity.Token": {
|
|
"type": "object",
|
|
"properties": {
|
|
"appId": {
|
|
"type": "integer"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"expireTime": {
|
|
"type": "integer"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = docs.SwaggerInfo{
|
|
Version: "1.0.0",
|
|
Host: "localhost:9000",
|
|
BasePath: "/api/system",
|
|
Schemes: []string{},
|
|
Title: "isp-system-service",
|
|
Description: "Сервис управления реестром внешних приложений и токенами аутентификации",
|
|
}
|
|
|
|
func init() {
|
|
docs.InitSwagger(SwaggerInfo, doc)
|
|
}
|