迁移并重构项目,优化了执行流程
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 (
 | 
			
		||||
	"SafeLine-Acme/internal/class/Acme"
 | 
			
		||||
	"SafeLine-Acme/internal/class/DNSProvider"
 | 
			
		||||
	"SafeLine-Acme/internal/class/SafeLine"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func (config *Object) Default() {
 | 
			
		||||
	a := Object{
 | 
			
		||||
		Concurrency: 3,
 | 
			
		||||
		Days:        15,
 | 
			
		||||
		Server: SafeLine.Object{
 | 
			
		||||
			Host:     "192.168.1.4:1443",
 | 
			
		||||
			ApiToken: "xxx",
 | 
			
		||||
		},
 | 
			
		||||
		Acme: Acme.Object{
 | 
			
		||||
			Email: "xxx",
 | 
			
		||||
			DNSProvider: DNSProvider.Object{
 | 
			
		||||
				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