From ca2a3a8c242dd4985524821127c8be2c36c17882 Mon Sep 17 00:00:00 2001 From: ZhuoQinghui <1302344380@qq.com> Date: Mon, 17 Feb 2025 11:30:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95=E8=AF=BB?= =?UTF-8?q?=E5=8F=96CONF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/conf/conf.go | 12 +++++++----- src/conf/mana.go | 7 ++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/conf/conf.go b/src/conf/conf.go index fdfea0c..72a7d2c 100644 --- a/src/conf/conf.go +++ b/src/conf/conf.go @@ -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"` } diff --git a/src/conf/mana.go b/src/conf/mana.go index f97e8c3..dc2a8c0 100644 --- a/src/conf/mana.go +++ b/src/conf/mana.go @@ -56,9 +56,10 @@ func defaultAppConfig() *AppConfig { return &AppConfig{ Server: &ServerConf{ - Host: "0.0.0.0", - Port: 36851, - Key: serverKey, + Enable: false, + Host: "0.0.0.0", + Port: 36851, + Key: serverKey, }, Web: &WebConf{ Enable: false,