// Package docs Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", "contact": {}, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/api/v1/admin/system-configs": { "get": { "description": "返回所有系统配置列表,支持按配置类型(system/business)过滤,需要管理员权限", "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "获取系统配置列表", "parameters": [ { "type": "string", "description": "配置类型(system/business)", "name": "type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } }, "post": { "description": "创建一条新的系统配置项,配置键不可重复,同时将新配置同步到 Redis,需要管理员权限", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "创建系统配置", "parameters": [ { "description": "创建请求参数", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/system_config.CreateSystemConfigRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } } }, "/api/v1/admin/system-configs/{key}": { "get": { "description": "根据配置键获取对应的系统配置详情,需要管理员权限", "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "获取单个系统配置", "parameters": [ { "type": "string", "description": "配置键", "name": "key", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } }, "put": { "description": "根据配置键更新对应的配置内容,同时将更新同步到 Redis,需要管理员权限", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "更新系统配置", "parameters": [ { "type": "string", "description": "配置键", "name": "key", "in": "path", "required": true }, { "description": "更新请求参数", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/system_config.UpdateSystemConfigRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } }, "delete": { "description": "根据配置键删除对应配置,同时从 Redis 中移除对应缓存,需要管理员权限", "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "删除系统配置", "parameters": [ { "type": "string", "description": "配置键", "name": "key", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } } }, "/api/v1/admin/tasks/dispatch": { "post": { "description": "手动触发指定类型的异步任务,支持指定时间范围和用户,需要管理员权限", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "下发异步任务", "parameters": [ { "description": "任务请求参数", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/task.DispatchTaskRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } } }, "/api/v1/admin/tasks/types": { "get": { "description": "返回系统支持的所有可调度任务类型列表,需要管理员权限", "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "获取支持的任务类型", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } } }, "/api/v1/admin/users": { "get": { "description": "分页返回用户列表,支持按用户 ID 和用户名筛选,需要管理员权限", "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "获取用户列表", "parameters": [ { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" }, { "type": "integer", "name": "user_id", "in": "query" }, { "type": "string", "name": "username", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } } }, "/api/v1/admin/users/{id}/status": { "put": { "description": "启用或禁用指定用户,管理员账号无法被禁用,需要管理员权限", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "更新用户状态", "parameters": [ { "type": "integer", "description": "用户ID", "name": "id", "in": "path", "required": true }, { "description": "状态参数", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.updateUserStatusRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } } }, "/api/v1/config/public": { "get": { "description": "返回对前端公开的系统配置信息,如允许上传的文件类型、站点名称、是否开放注册等", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "config" ], "summary": "获取公共配置", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } } }, "/api/v1/health": { "get": { "description": "检查服务是否正常运行", "produces": [ "application/json" ], "tags": [ "health" ], "summary": "健康检查", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } } }, "/api/v1/oauth/callback": { "post": { "description": "接收前端传回的 state 和 code,完成 OAuth/OIDC 认证并建立用户会话", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "oauth" ], "summary": "OAuth 回调", "parameters": [ { "description": "回调请求参数", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/oauth.CallbackRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } } }, "/api/v1/oauth/login": { "get": { "description": "生成 OAuth 登录 URL,前端跳转至该地址完成授权", "produces": [ "application/json" ], "tags": [ "oauth" ], "summary": "获取登录地址", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } } }, "/api/v1/oauth/logout": { "get": { "description": "清除当前用户的登录会话,完成退出", "produces": [ "application/json" ], "tags": [ "oauth" ], "summary": "退出登录", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } } }, "/api/v1/oauth/user-info": { "get": { "description": "返回当前登录用户的基本信息及余额数据,需要登录", "produces": [ "application/json" ], "tags": [ "oauth" ], "summary": "获取当前登录用户信息", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/util.ResponseAny" } } } } }, "/f/{id}": { "get": { "produces": [ "application/octet-stream" ], "tags": [ "upload" ], "parameters": [ { "type": "string", "description": "Upload ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } } } }, "definitions": { "oauth.CallbackRequest": { "type": "object", "properties": { "code": { "type": "string" }, "state": { "type": "string" } } }, "system_config.CreateSystemConfigRequest": { "type": "object", "required": [ "key", "type", "value" ], "properties": { "description": { "type": "string", "maxLength": 255 }, "key": { "type": "string", "maxLength": 64 }, "type": { "type": "string", "enum": [ "system", "business" ] }, "value": { "type": "string", "maxLength": 255 } } }, "system_config.UpdateSystemConfigRequest": { "type": "object", "required": [ "value" ], "properties": { "description": { "type": "string", "maxLength": 255 }, "value": { "type": "string", "maxLength": 255 } } }, "task.DispatchTaskRequest": { "type": "object", "required": [ "task_type" ], "properties": { "end_time": { "type": "string" }, "start_time": { "type": "string" }, "task_type": { "type": "string" }, "user_id": { "type": "integer" } } }, "user.updateUserStatusRequest": { "type": "object", "properties": { "is_active": { "type": "boolean" } } }, "util.ResponseAny": { "type": "object", "properties": { "data": {}, "error_msg": { "type": "string", "example": "" } } } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0.0", Host: "", BasePath: "", Schemes: []string{}, Title: "LINUX DO Credit", Description: "", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }