重构项目
This commit is contained in:
		
							
								
								
									
										49
									
								
								internal/class/config/default.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								internal/class/config/default.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,49 @@ | ||||
| package config | ||||
|  | ||||
| import ( | ||||
| 	"SafelineAPI/internal/class/Acme" | ||||
| 	"SafelineAPI/internal/class/DNSProvider" | ||||
| 	"SafelineAPI/internal/class/Safeline" | ||||
| ) | ||||
|  | ||||
| func (config *Config) Default() { | ||||
| 	a := Config{ | ||||
| 		Concurrency: 3, | ||||
| 		Days:        15, | ||||
| 		Server: Safeline.SafeLine{ | ||||
| 			Host:     "192.168.1.4:1443", | ||||
| 			ApiToken: "xxx", | ||||
| 		}, | ||||
| 		Acme: Acme.Acme{ | ||||
| 			Email: "xxx", | ||||
| 			DNSProvider: DNSProvider.DNSProvider{ | ||||
| 				TencentCloud: DNSProvider.TencentCloud{ | ||||
| 					SecretID:  "xxx", | ||||
| 					SecretKey: "xxx", | ||||
| 				}, | ||||
| 				AliCloud: DNSProvider.AliCloud{ | ||||
| 					AccessKeyId:     "xxx", | ||||
| 					AccessKeySecret: "xxx", | ||||
| 					RAMRole:         "xxx(可选)", | ||||
| 					STSToken:        "xxx(可选)", | ||||
| 				}, | ||||
| 				HuaweiCloud: DNSProvider.HuaweiCloud{ | ||||
| 					AccessKeyId:     "xxx", | ||||
| 					Region:          "xxx", | ||||
| 					SecretAccessKey: "xxx", | ||||
| 				}, | ||||
| 				WestCN: DNSProvider.WestCN{ | ||||
| 					Username: "xxx", | ||||
| 					Password: "xxx", | ||||
| 				}, | ||||
| 				RainYun: DNSProvider.RainYun{ | ||||
| 					ApiKey: "xxx", | ||||
| 				}, | ||||
| 				Dode: DNSProvider.Dode{ | ||||
| 					Token: "xxx", | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| 	} | ||||
| 	a.Write("./config.json") | ||||
| } | ||||
		Reference in New Issue
	
	Block a user