更新 license .github

This commit is contained in:
ryan
2026-06-08 17:25:12 +08:00
parent e3ef6c9d27
commit 85f91b1ed7
122 changed files with 881 additions and 215 deletions
+106
View File
@@ -452,6 +452,81 @@ const docTemplate = `{
}
}
},
"/api/v1/admin/logs": {
"get": {
"security": [
{
"SessionCookie": []
}
],
"description": "分页获取系统历史日志,cursor=0 获取最新日志,cursor\u003e0 获取更早日志",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "获取系统日志",
"parameters": [
{
"type": "integer",
"default": 0,
"description": "日志游标,0=获取最新",
"name": "cursor",
"in": "query"
},
{
"type": "integer",
"default": 200,
"description": "每页条数",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "日志列表",
"schema": {
"allOf": [
{
"$ref": "#/definitions/util.ResponseAny"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/logs.logsResponse"
}
}
}
]
}
},
"401": {
"description": "未登录",
"schema": {
"$ref": "#/definitions/util.ResponseAny"
}
},
"403": {
"description": "无管理员权限",
"schema": {
"$ref": "#/definitions/util.ResponseAny"
}
}
}
}
},
"/api/v1/admin/logs/ws": {
"get": {
"description": "通过 WebSocket 实时推送系统日志,需要管理员权限",
"tags": [
"admin"
],
"summary": "系统日志实时推送",
"responses": {}
}
},
"/api/v1/admin/status": {
"get": {
"security": [
@@ -2905,6 +2980,37 @@ const docTemplate = `{
}
}
},
"logger.LogEntry": {
"type": "object",
"properties": {
"data": {
"description": "一行日志原文(含换行符)",
"type": "string"
},
"index": {
"description": "全局递增序号",
"type": "integer"
}
}
},
"logs.logsResponse": {
"type": "object",
"properties": {
"has_more": {
"type": "boolean"
},
"lines": {
"type": "array",
"items": {
"$ref": "#/definitions/logger.LogEntry"
}
},
"next_cursor": {
"description": "用于加载更早日志的 cursor",
"type": "integer"
}
}
},
"model.AccessToken": {
"type": "object",
"properties": {
+106
View File
@@ -445,6 +445,81 @@
}
}
},
"/api/v1/admin/logs": {
"get": {
"security": [
{
"SessionCookie": []
}
],
"description": "分页获取系统历史日志,cursor=0 获取最新日志,cursor\u003e0 获取更早日志",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "获取系统日志",
"parameters": [
{
"type": "integer",
"default": 0,
"description": "日志游标,0=获取最新",
"name": "cursor",
"in": "query"
},
{
"type": "integer",
"default": 200,
"description": "每页条数",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "日志列表",
"schema": {
"allOf": [
{
"$ref": "#/definitions/util.ResponseAny"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/logs.logsResponse"
}
}
}
]
}
},
"401": {
"description": "未登录",
"schema": {
"$ref": "#/definitions/util.ResponseAny"
}
},
"403": {
"description": "无管理员权限",
"schema": {
"$ref": "#/definitions/util.ResponseAny"
}
}
}
}
},
"/api/v1/admin/logs/ws": {
"get": {
"description": "通过 WebSocket 实时推送系统日志,需要管理员权限",
"tags": [
"admin"
],
"summary": "系统日志实时推送",
"responses": {}
}
},
"/api/v1/admin/status": {
"get": {
"security": [
@@ -2898,6 +2973,37 @@
}
}
},
"logger.LogEntry": {
"type": "object",
"properties": {
"data": {
"description": "一行日志原文(含换行符)",
"type": "string"
},
"index": {
"description": "全局递增序号",
"type": "integer"
}
}
},
"logs.logsResponse": {
"type": "object",
"properties": {
"has_more": {
"type": "boolean"
},
"lines": {
"type": "array",
"items": {
"$ref": "#/definitions/logger.LogEntry"
}
},
"next_cursor": {
"description": "用于加载更早日志的 cursor",
"type": "integer"
}
}
},
"model.AccessToken": {
"type": "object",
"properties": {
+67
View File
@@ -73,6 +73,27 @@ definitions:
- solutions
- token
type: object
logger.LogEntry:
properties:
data:
description: 一行日志原文(含换行符)
type: string
index:
description: 全局递增序号
type: integer
type: object
logs.logsResponse:
properties:
has_more:
type: boolean
lines:
items:
$ref: '#/definitions/logger.LogEntry'
type: array
next_cursor:
description: 用于加载更早日志的 cursor
type: integer
type: object
model.AccessToken:
properties:
created_at:
@@ -938,6 +959,52 @@ paths:
summary: 切换认证源启用状态
tags:
- admin
/api/v1/admin/logs:
get:
description: 分页获取系统历史日志,cursor=0 获取最新日志,cursor>0 获取更早日志
parameters:
- default: 0
description: 日志游标,0=获取最新
in: query
name: cursor
type: integer
- default: 200
description: 每页条数
in: query
name: limit
type: integer
produces:
- application/json
responses:
"200":
description: 日志列表
schema:
allOf:
- $ref: '#/definitions/util.ResponseAny'
- properties:
data:
$ref: '#/definitions/logs.logsResponse'
type: object
"401":
description: 未登录
schema:
$ref: '#/definitions/util.ResponseAny'
"403":
description: 无管理员权限
schema:
$ref: '#/definitions/util.ResponseAny'
security:
- SessionCookie: []
summary: 获取系统日志
tags:
- admin
/api/v1/admin/logs/ws:
get:
description: 通过 WebSocket 实时推送系统日志,需要管理员权限
responses: {}
summary: 系统日志实时推送
tags:
- admin
/api/v1/admin/status:
get:
description: 获取后端服务运行状态、Goroutine、内存指标等详细统计数据,需要管理员权限