feat(api): share

This commit is contained in:
ttk
2024-09-19 18:51:33 +08:00
parent 5a213b1686
commit 7ee8b58f5f
17 changed files with 638 additions and 164 deletions

View File

@@ -1,4 +1,4 @@
// Package docs Code generated by swaggo/swag at 2024-09-11 13:36:52.1950431 +0800 CST m=+7.950178801. DO NOT EDIT
// Package docs Code generated by swaggo/swag at 2024-09-19 17:52:48.7357174 +0800 CST m=+7.810953701. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
@@ -367,6 +367,87 @@ const docTemplate = `{
}
}
},
"/authorization": {
"post": {
"tags": [
"authorization"
],
"parameters": [
{
"description": "authorization",
"name": "authorization",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.Authorization"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.HttpResponse"
}
}
}
}
},
"/authorization/:id": {
"put": {
"tags": [
"authorization"
],
"parameters": [
{
"type": "integer",
"description": "authorization id",
"name": "id",
"in": "path",
"required": true
},
{
"description": "authorization",
"name": "authorization",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.Authorization"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.HttpResponse"
}
}
}
},
"delete": {
"tags": [
"authorization"
],
"parameters": [
{
"type": "integer",
"description": "authorization id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.HttpResponse"
}
}
}
}
},
"/command": {
"get": {
"tags": [
@@ -1995,7 +2076,10 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.Share"
"type": "array",
"items": {
"$ref": "#/definitions/model.Share"
}
}
}
],
@@ -2063,7 +2147,7 @@ const docTemplate = `{
"/share/connect/:uuid": {
"get": {
"tags": [
"connect"
"share"
],
"parameters": [
{
@@ -2497,14 +2581,49 @@ const docTemplate = `{
}
}
},
"model.Authorization": {
"type": "object",
"properties": {
"account_id": {
"type": "integer"
},
"asset_id": {
"type": "integer"
},
"created_at": {
"type": "string"
},
"creator_id": {
"type": "integer"
},
"id": {
"type": "integer"
},
"node_id": {
"type": "integer"
},
"resource_id": {
"type": "integer"
},
"rids": {
"type": "array",
"items": {
"type": "integer"
}
},
"updated_at": {
"type": "string"
},
"updater_id": {
"type": "integer"
}
}
},
"model.Command": {
"type": "object",
"properties": {
"cmds": {
"type": "array",
"items": {
"type": "string"
}
"cmd": {
"type": "string"
},
"created_at": {
"type": "string"
@@ -2518,6 +2637,9 @@ const docTemplate = `{
"id": {
"type": "integer"
},
"is_re": {
"type": "boolean"
},
"name": {
"type": "string"
},