🎨 优化迎新逻辑,引入资源概念

This commit is contained in:
李寻欢
2023-12-07 15:58:55 +08:00
parent 63d50b815c
commit 37bf8de132
11 changed files with 156 additions and 15 deletions

View File

@@ -5,8 +5,9 @@ var Conf Config
// Config
// @description: 配置
type Config struct {
Task task `json:"task" yaml:"task"` // 定时任务配置
MySQL mysql `json:"mysql" yaml:"mysql"` // MySQL 配置
Wechat wechat `json:"wechat" yaml:"wechat"` // 微信助手
Ai ai `json:"ai" yaml:"ai"` // AI配置
Task task `json:"task" yaml:"task"` // 定时任务配置
MySQL mysql `json:"mysql" yaml:"mysql"` // MySQL 配置
Wechat wechat `json:"wechat" yaml:"wechat"` // 微信助手
Ai ai `json:"ai" yaml:"ai"` // AI配置
Resource map[string]resourceItem `json:"resource" yaml:"resource"` // 资源配置
}

8
config/resource.go Normal file
View File

@@ -0,0 +1,8 @@
package config
// resourceItem
// @description: 资源项
type resourceItem struct {
Type string `json:"type" yaml:"type"` // 类型
Path string `json:"path" yaml:"path"` // 路径
}