Refactor: migrate discordbot
All checks were successful
Go test / run-go-vet (push) Successful in 20s
Go test / check-swagger-up-to-date (push) Successful in 9s
Go test / run-go-test (push) Successful in 47s
Go test / cleanup-go-test (push) Successful in 4s
Go test / release-image (push) Successful in 3m35s

This commit is contained in:
2025-12-13 02:03:01 +08:00
parent 0fc8f1f08c
commit 47f09b733a
23 changed files with 613 additions and 66 deletions

View File

@@ -55,7 +55,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/api.getAliasesOutputAlias"
"$ref": "#/definitions/api.GetAliasesOutputAlias"
}
}
},
@@ -186,7 +186,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/api.getImagesOutputImage"
"$ref": "#/definitions/api.GetImagesOutputImage"
}
}
},
@@ -208,7 +208,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.postGenLoginUrlInput"
"$ref": "#/definitions/auth.PostGenLoginUrlInput"
}
}
],
@@ -216,7 +216,7 @@ const docTemplate = `{
"200": {
"description": "Payload",
"schema": {
"$ref": "#/definitions/auth.postGenLoginUrlOutput"
"$ref": "#/definitions/auth.PostGenLoginUrlOutput"
}
},
"400": {
@@ -247,7 +247,7 @@ const docTemplate = `{
}
},
"definitions": {
"api.getAliasesOutputAlias": {
"api.GetAliasesOutputAlias": {
"type": "object",
"properties": {
"id": {
@@ -258,7 +258,7 @@ const docTemplate = `{
}
}
},
"api.getImagesOutputImage": {
"api.GetImagesOutputImage": {
"type": "object",
"properties": {
"aliasesIds": {
@@ -309,7 +309,7 @@ const docTemplate = `{
}
}
},
"auth.postGenLoginUrlInput": {
"auth.PostGenLoginUrlInput": {
"type": "object",
"properties": {
"userId": {
@@ -317,7 +317,7 @@ const docTemplate = `{
}
}
},
"auth.postGenLoginUrlOutput": {
"auth.PostGenLoginUrlOutput": {
"type": "object",
"properties": {
"loginUrl": {

View File

@@ -47,7 +47,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/api.getAliasesOutputAlias"
"$ref": "#/definitions/api.GetAliasesOutputAlias"
}
}
},
@@ -178,7 +178,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/api.getImagesOutputImage"
"$ref": "#/definitions/api.GetImagesOutputImage"
}
}
},
@@ -200,7 +200,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.postGenLoginUrlInput"
"$ref": "#/definitions/auth.PostGenLoginUrlInput"
}
}
],
@@ -208,7 +208,7 @@
"200": {
"description": "Payload",
"schema": {
"$ref": "#/definitions/auth.postGenLoginUrlOutput"
"$ref": "#/definitions/auth.PostGenLoginUrlOutput"
}
},
"400": {
@@ -239,7 +239,7 @@
}
},
"definitions": {
"api.getAliasesOutputAlias": {
"api.GetAliasesOutputAlias": {
"type": "object",
"properties": {
"id": {
@@ -250,7 +250,7 @@
}
}
},
"api.getImagesOutputImage": {
"api.GetImagesOutputImage": {
"type": "object",
"properties": {
"aliasesIds": {
@@ -301,7 +301,7 @@
}
}
},
"auth.postGenLoginUrlInput": {
"auth.PostGenLoginUrlInput": {
"type": "object",
"properties": {
"userId": {
@@ -309,7 +309,7 @@
}
}
},
"auth.postGenLoginUrlOutput": {
"auth.PostGenLoginUrlOutput": {
"type": "object",
"properties": {
"loginUrl": {

View File

@@ -1,13 +1,13 @@
basePath: /
definitions:
api.getAliasesOutputAlias:
api.GetAliasesOutputAlias:
properties:
id:
type: integer
name:
type: string
type: object
api.getImagesOutputImage:
api.GetImagesOutputImage:
properties:
aliasesIds:
items:
@@ -40,12 +40,12 @@ definitions:
type: string
type: array
type: object
auth.postGenLoginUrlInput:
auth.PostGenLoginUrlInput:
properties:
userId:
type: string
type: object
auth.postGenLoginUrlOutput:
auth.PostGenLoginUrlOutput:
properties:
loginUrl:
type: string
@@ -88,7 +88,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/api.getAliasesOutputAlias'
$ref: '#/definitions/api.GetAliasesOutputAlias'
type: array
"400":
description: Bad Request
@@ -174,7 +174,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/api.getImagesOutputImage'
$ref: '#/definitions/api.GetImagesOutputImage'
type: array
"400":
description: Bad Request
@@ -188,12 +188,12 @@ paths:
name: payload
required: true
schema:
$ref: '#/definitions/auth.postGenLoginUrlInput'
$ref: '#/definitions/auth.PostGenLoginUrlInput'
responses:
"200":
description: Payload
schema:
$ref: '#/definitions/auth.postGenLoginUrlOutput'
$ref: '#/definitions/auth.PostGenLoginUrlOutput'
"400":
description: Bad Request
/auth/login: