修复无法读取CONF

This commit is contained in:
ZhuoQinghui 2025-02-17 11:30:57 +08:00
parent 77f7aec1c8
commit ca2a3a8c24
2 changed files with 11 additions and 8 deletions

View File

@ -9,7 +9,7 @@ type AppConfig struct {
Web *WebConf `json:"web" yaml:"web"`
// 任务配置
Task *TaskConf `json:"task" yaml:"task"`
// 认证配置
// 提供商配置
Providers *[]ProviderConf `json:"provider" yaml:"provider"`
// 证书配置
Certs *[]CertConf `json:"cert" yaml:"cert"`
@ -17,6 +17,8 @@ type AppConfig struct {
// ServerConf 服务端配置
type ServerConf struct {
// 是否启用
Enable bool `json:"enable" yaml:"enable"`
// 监听地址
Host string `json:"host" yaml:"host"`
// 监听端口
@ -43,13 +45,13 @@ type TaskConf struct {
Interval int `json:"interval" yaml:"interval"`
}
// ProviderConf 三方认证配置
// ProviderConf 提供商配置
type ProviderConf struct {
// 认证名称
// 提供商名称
Name string `json:"name" yaml:"name"`
// 认证类型
// 提供商类型
Type string `json:"type" yaml:"type"`
// 认证配置
// 提供商配置
Conf map[string]string `json:"conf" yaml:"conf"`
}

View File

@ -56,6 +56,7 @@ func defaultAppConfig() *AppConfig {
return &AppConfig{
Server: &ServerConf{
Enable: false,
Host: "0.0.0.0",
Port: 36851,
Key: serverKey,