Preliminary Commit with fixes
- Sorted imports - Fixed nested if block - Added special nolint (goerr113) argument for error initialization - Edited port in main.go - Deleted swagger.json
This commit is contained in:
1 parent
9092acc8bf
commit
abd54bf180
8 files changed
+32
-274
No files matched your search
@@ -1,244 +0,0 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "{описание сервиса}",
|
||||
"title": "isp-script-service",
|
||||
"contact": {},
|
||||
"license": {
|
||||
"name": "GNU GPL v3.0"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"host": "localhost:9024",
|
||||
"basePath": "/api/script",
|
||||
"paths": {
|
||||
"/script/batch_execute": {
|
||||
"post": {
|
||||
"description": "Возвращает результат выполнения скриптов и ошибок (если есть)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"script"
|
||||
],
|
||||
"summary": "Выполнить набор скриптов под конкретными ID",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Набор идентфикаторов и аргументов",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.ExecuteByIdRequest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.ScriptResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/script/batch_execute_by_ids": {
|
||||
"post": {
|
||||
"description": "Возвращает результат выполнения скриптов и ошибок (если есть)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"script"
|
||||
],
|
||||
"summary": "Выполнить набор скриптов под конкретными ID с идентичным аргументом для всех",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Набор идентфикаторов и единый аргумент",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.BatchExecuteByIdsRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.ScriptResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/script/execute": {
|
||||
"post": {
|
||||
"description": "Возвращает результат выполнения скрипта и ошибку (если есть)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"script"
|
||||
],
|
||||
"summary": "Выполнить скрипт без учёта идентификатора",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Скрипт необходимый к выполнению",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ExecuteRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ScriptResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/script/execute_by_id": {
|
||||
"post": {
|
||||
"description": "Возвращает результат выполнения скрипта и ошибку (если есть)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"script"
|
||||
],
|
||||
"summary": "Выполнить скрипт под конкректным ID",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Идентифиактор скрипта",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ExecuteByIdRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ScriptResp"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/structure.GrpcError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"domain.BatchExecuteByIdsRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"arg": {
|
||||
"type": "object"
|
||||
},
|
||||
"ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.Error": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.ExecuteByIdRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"arg": {
|
||||
"type": "object"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.ExecuteRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"arg": {
|
||||
"type": "object"
|
||||
},
|
||||
"script": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.ScriptResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"$ref": "#/definitions/domain.Error"
|
||||
},
|
||||
"result": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"structure.GrpcError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"errorCode": {
|
||||
"type": "string"
|
||||
},
|
||||
"errorMessage": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user