修复无法读取CONF
This commit is contained in:
		
							parent
							
								
									77f7aec1c8
								
							
						
					
					
						commit
						ca2a3a8c24
					
				|  | @ -9,7 +9,7 @@ type AppConfig struct { | ||||||
| 	Web *WebConf `json:"web" yaml:"web"` | 	Web *WebConf `json:"web" yaml:"web"` | ||||||
| 	// 任务配置
 | 	// 任务配置
 | ||||||
| 	Task *TaskConf `json:"task" yaml:"task"` | 	Task *TaskConf `json:"task" yaml:"task"` | ||||||
| 	// 认证配置
 | 	// 提供商配置
 | ||||||
| 	Providers *[]ProviderConf `json:"provider" yaml:"provider"` | 	Providers *[]ProviderConf `json:"provider" yaml:"provider"` | ||||||
| 	// 证书配置
 | 	// 证书配置
 | ||||||
| 	Certs *[]CertConf `json:"cert" yaml:"cert"` | 	Certs *[]CertConf `json:"cert" yaml:"cert"` | ||||||
|  | @ -17,6 +17,8 @@ type AppConfig struct { | ||||||
| 
 | 
 | ||||||
| // ServerConf 服务端配置
 | // ServerConf 服务端配置
 | ||||||
| type ServerConf struct { | type ServerConf struct { | ||||||
|  | 	// 是否启用
 | ||||||
|  | 	Enable bool `json:"enable" yaml:"enable"` | ||||||
| 	// 监听地址
 | 	// 监听地址
 | ||||||
| 	Host string `json:"host" yaml:"host"` | 	Host string `json:"host" yaml:"host"` | ||||||
| 	// 监听端口
 | 	// 监听端口
 | ||||||
|  | @ -43,13 +45,13 @@ type TaskConf struct { | ||||||
| 	Interval int `json:"interval" yaml:"interval"` | 	Interval int `json:"interval" yaml:"interval"` | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // ProviderConf 三方认证配置
 | // ProviderConf 提供商配置
 | ||||||
| type ProviderConf struct { | type ProviderConf struct { | ||||||
| 	// 认证名称
 | 	// 提供商名称
 | ||||||
| 	Name string `json:"name" yaml:"name"` | 	Name string `json:"name" yaml:"name"` | ||||||
| 	// 认证类型
 | 	// 提供商类型
 | ||||||
| 	Type string `json:"type" yaml:"type"` | 	Type string `json:"type" yaml:"type"` | ||||||
| 	// 认证配置
 | 	// 提供商配置
 | ||||||
| 	Conf map[string]string `json:"conf" yaml:"conf"` | 	Conf map[string]string `json:"conf" yaml:"conf"` | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -56,9 +56,10 @@ func defaultAppConfig() *AppConfig { | ||||||
| 
 | 
 | ||||||
| 	return &AppConfig{ | 	return &AppConfig{ | ||||||
| 		Server: &ServerConf{ | 		Server: &ServerConf{ | ||||||
| 			Host: "0.0.0.0", | 			Enable: false, | ||||||
| 			Port: 36851, | 			Host:   "0.0.0.0", | ||||||
| 			Key:  serverKey, | 			Port:   36851, | ||||||
|  | 			Key:    serverKey, | ||||||
| 		}, | 		}, | ||||||
| 		Web: &WebConf{ | 		Web: &WebConf{ | ||||||
| 			Enable: false, | 			Enable: false, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user