mirror of
https://git.fightbot.fun/hxuanyu/BingPaper.git
synced 2026-02-15 14:49:34 +08:00
新增WebConfig配置支持,完善日志相关配置选项,移除对WebP格式的支持
This commit is contained in:
58
docs/docs.go
58
docs/docs.go
@@ -399,8 +399,7 @@ const docTemplate = `{
|
|||||||
"get": {
|
"get": {
|
||||||
"description": "根据日期返回图片流或重定向 (yyyy-mm-dd)",
|
"description": "根据日期返回图片流或重定向 (yyyy-mm-dd)",
|
||||||
"produces": [
|
"produces": [
|
||||||
"image/jpeg",
|
"image/jpeg"
|
||||||
"image/webp"
|
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"image"
|
"image"
|
||||||
@@ -473,8 +472,7 @@ const docTemplate = `{
|
|||||||
"get": {
|
"get": {
|
||||||
"description": "随机返回一张已抓取的图片流或重定向",
|
"description": "随机返回一张已抓取的图片流或重定向",
|
||||||
"produces": [
|
"produces": [
|
||||||
"image/jpeg",
|
"image/jpeg"
|
||||||
"image/webp"
|
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"image"
|
"image"
|
||||||
@@ -531,8 +529,7 @@ const docTemplate = `{
|
|||||||
"get": {
|
"get": {
|
||||||
"description": "根据参数返回今日必应图片流或重定向",
|
"description": "根据参数返回今日必应图片流或重定向",
|
||||||
"produces": [
|
"produces": [
|
||||||
"image/jpeg",
|
"image/jpeg"
|
||||||
"image/webp"
|
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"image"
|
"image"
|
||||||
@@ -549,7 +546,7 @@ const docTemplate = `{
|
|||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "jpg",
|
"default": "jpg",
|
||||||
"description": "格式 (jpg, webp)",
|
"description": "格式 (jpg)",
|
||||||
"name": "format",
|
"name": "format",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
}
|
}
|
||||||
@@ -669,6 +666,9 @@ const docTemplate = `{
|
|||||||
},
|
},
|
||||||
"token": {
|
"token": {
|
||||||
"$ref": "#/definitions/config.TokenConfig"
|
"$ref": "#/definitions/config.TokenConfig"
|
||||||
|
},
|
||||||
|
"web": {
|
||||||
|
"$ref": "#/definitions/config.WebConfig"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -714,8 +714,44 @@ const docTemplate = `{
|
|||||||
"config.LogConfig": {
|
"config.LogConfig": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"compress": {
|
||||||
|
"description": "是否压缩旧日志文件",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"dbfilename": {
|
||||||
|
"description": "数据库日志文件名",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"dblogLevel": {
|
||||||
|
"description": "数据库日志级别: debug, info, warn, error",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"filename": {
|
||||||
|
"description": "业务日志文件名",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"level": {
|
"level": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"logConsole": {
|
||||||
|
"description": "是否同时输出到控制台",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"maxAge": {
|
||||||
|
"description": "保留旧日志文件最大天数",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"maxBackups": {
|
||||||
|
"description": "保留旧日志文件最大个数",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"maxSize": {
|
||||||
|
"description": "每个日志文件最大大小 (MB)",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"showDBLog": {
|
||||||
|
"description": "是否在控制台显示数据库日志",
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -790,6 +826,14 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"config.WebConfig": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"path": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"config.WebDAVConfig": {
|
"config.WebDAVConfig": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -393,8 +393,7 @@
|
|||||||
"get": {
|
"get": {
|
||||||
"description": "根据日期返回图片流或重定向 (yyyy-mm-dd)",
|
"description": "根据日期返回图片流或重定向 (yyyy-mm-dd)",
|
||||||
"produces": [
|
"produces": [
|
||||||
"image/jpeg",
|
"image/jpeg"
|
||||||
"image/webp"
|
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"image"
|
"image"
|
||||||
@@ -467,8 +466,7 @@
|
|||||||
"get": {
|
"get": {
|
||||||
"description": "随机返回一张已抓取的图片流或重定向",
|
"description": "随机返回一张已抓取的图片流或重定向",
|
||||||
"produces": [
|
"produces": [
|
||||||
"image/jpeg",
|
"image/jpeg"
|
||||||
"image/webp"
|
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"image"
|
"image"
|
||||||
@@ -525,8 +523,7 @@
|
|||||||
"get": {
|
"get": {
|
||||||
"description": "根据参数返回今日必应图片流或重定向",
|
"description": "根据参数返回今日必应图片流或重定向",
|
||||||
"produces": [
|
"produces": [
|
||||||
"image/jpeg",
|
"image/jpeg"
|
||||||
"image/webp"
|
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"image"
|
"image"
|
||||||
@@ -543,7 +540,7 @@
|
|||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "jpg",
|
"default": "jpg",
|
||||||
"description": "格式 (jpg, webp)",
|
"description": "格式 (jpg)",
|
||||||
"name": "format",
|
"name": "format",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
}
|
}
|
||||||
@@ -663,6 +660,9 @@
|
|||||||
},
|
},
|
||||||
"token": {
|
"token": {
|
||||||
"$ref": "#/definitions/config.TokenConfig"
|
"$ref": "#/definitions/config.TokenConfig"
|
||||||
|
},
|
||||||
|
"web": {
|
||||||
|
"$ref": "#/definitions/config.WebConfig"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -708,8 +708,44 @@
|
|||||||
"config.LogConfig": {
|
"config.LogConfig": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"compress": {
|
||||||
|
"description": "是否压缩旧日志文件",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"dbfilename": {
|
||||||
|
"description": "数据库日志文件名",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"dblogLevel": {
|
||||||
|
"description": "数据库日志级别: debug, info, warn, error",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"filename": {
|
||||||
|
"description": "业务日志文件名",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"level": {
|
"level": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"logConsole": {
|
||||||
|
"description": "是否同时输出到控制台",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"maxAge": {
|
||||||
|
"description": "保留旧日志文件最大天数",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"maxBackups": {
|
||||||
|
"description": "保留旧日志文件最大个数",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"maxSize": {
|
||||||
|
"description": "每个日志文件最大大小 (MB)",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"showDBLog": {
|
||||||
|
"description": "是否在控制台显示数据库日志",
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -784,6 +820,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"config.WebConfig": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"path": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"config.WebDAVConfig": {
|
"config.WebDAVConfig": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ definitions:
|
|||||||
$ref: '#/definitions/config.StorageConfig'
|
$ref: '#/definitions/config.StorageConfig'
|
||||||
token:
|
token:
|
||||||
$ref: '#/definitions/config.TokenConfig'
|
$ref: '#/definitions/config.TokenConfig'
|
||||||
|
web:
|
||||||
|
$ref: '#/definitions/config.WebConfig'
|
||||||
type: object
|
type: object
|
||||||
config.CronConfig:
|
config.CronConfig:
|
||||||
properties:
|
properties:
|
||||||
@@ -61,8 +63,35 @@ definitions:
|
|||||||
type: object
|
type: object
|
||||||
config.LogConfig:
|
config.LogConfig:
|
||||||
properties:
|
properties:
|
||||||
|
compress:
|
||||||
|
description: 是否压缩旧日志文件
|
||||||
|
type: boolean
|
||||||
|
dbfilename:
|
||||||
|
description: 数据库日志文件名
|
||||||
|
type: string
|
||||||
|
dblogLevel:
|
||||||
|
description: '数据库日志级别: debug, info, warn, error'
|
||||||
|
type: string
|
||||||
|
filename:
|
||||||
|
description: 业务日志文件名
|
||||||
|
type: string
|
||||||
level:
|
level:
|
||||||
type: string
|
type: string
|
||||||
|
logConsole:
|
||||||
|
description: 是否同时输出到控制台
|
||||||
|
type: boolean
|
||||||
|
maxAge:
|
||||||
|
description: 保留旧日志文件最大天数
|
||||||
|
type: integer
|
||||||
|
maxBackups:
|
||||||
|
description: 保留旧日志文件最大个数
|
||||||
|
type: integer
|
||||||
|
maxSize:
|
||||||
|
description: 每个日志文件最大大小 (MB)
|
||||||
|
type: integer
|
||||||
|
showDBLog:
|
||||||
|
description: 是否在控制台显示数据库日志
|
||||||
|
type: boolean
|
||||||
type: object
|
type: object
|
||||||
config.RetentionConfig:
|
config.RetentionConfig:
|
||||||
properties:
|
properties:
|
||||||
@@ -110,6 +139,11 @@ definitions:
|
|||||||
defaultTTL:
|
defaultTTL:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
config.WebConfig:
|
||||||
|
properties:
|
||||||
|
path:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
config.WebDAVConfig:
|
config.WebDAVConfig:
|
||||||
properties:
|
properties:
|
||||||
password:
|
password:
|
||||||
@@ -443,7 +477,6 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
produces:
|
produces:
|
||||||
- image/jpeg
|
- image/jpeg
|
||||||
- image/webp
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
@@ -488,7 +521,6 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
produces:
|
produces:
|
||||||
- image/jpeg
|
- image/jpeg
|
||||||
- image/webp
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
@@ -521,13 +553,12 @@ paths:
|
|||||||
name: variant
|
name: variant
|
||||||
type: string
|
type: string
|
||||||
- default: jpg
|
- default: jpg
|
||||||
description: 格式 (jpg, webp)
|
description: 格式 (jpg)
|
||||||
in: query
|
in: query
|
||||||
name: format
|
name: format
|
||||||
type: string
|
type: string
|
||||||
produces:
|
produces:
|
||||||
- image/jpeg
|
- image/jpeg
|
||||||
- image/webp
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
|
|||||||
Reference in New Issue
Block a user