package config import ( "github.com/zeromicro/go-zero/core/stores/cache" "github.com/zeromicro/go-zero/rest" ) type Config struct { rest.RestConf DataSource string CacheRedis cache.CacheConf JwtAuth JwtAuth // JWT 鉴权相关配置 VerifyCode VerifyCode Encrypt Encrypt Alipay AlipayConfig Wxpay WxpayConfig Applepay ApplepayConfig Ali AliConfig WestConfig WestConfig YushanConfig YushanConfig TianjuConfig TianjuConfig AdminConfig AdminConfig AdminPromotion AdminPromotion CleanTask CleanTask Tianyuanapi TianyuanapiConfig VerifyConfig VerifyConfig Security SecurityConfig // 安全配置 Logging LoggingConfig // 日志配置 } // JwtAuth 用于 JWT 鉴权配置 type JwtAuth struct { AccessSecret string // JWT 密钥,用于签发 Token AccessExpire int64 // Token 过期时间,单位为秒 RefreshAfter int64 } type VerifyCode struct { AccessKeyID string AccessKeySecret string EndpointURL string SignName string TemplateCode string ValidTime int } type Encrypt struct { SecretKey string } type AlipayConfig struct { Enabled bool AppID string PrivateKey string AlipayPublicKey string IsProduction bool NotifyUrl string ReturnURL string } type WxpayConfig struct { Enabled bool AppID string AppSecret string MchID string MchCertificateSerialNumber string MchApiv3Key string MchPrivateKeyPath string NotifyUrl string RefundNotifyUrl string } type AliConfig struct { Code string } type ApplepayConfig struct { Enabled bool ProductionVerifyURL string SandboxVerifyURL string // 沙盒环境的验证 URL Sandbox bool BundleID string IssuerID string KeyID string LoadPrivateKeyPath string } type WestConfig struct { Url string Key string SecretId string SecretSecondId string } type YushanConfig struct { ApiKey string AcctID string Url string } type TianjuConfig struct { ApiKey string BaseURL string } type AdminConfig struct { AccessSecret string AccessExpire int64 RefreshAfter int64 } type AdminPromotion struct { URLDomain string } type CleanTask struct { Enabled bool Time string Days int } type TianyuanapiConfig struct { AccessID string Key string BaseURL string Timeout int64 } type VerifyConfig struct { TwoFactor bool }