qnc-server-tob/app/main/api/internal/config/config.go

118 lines
2.6 KiB
Go
Raw Normal View History

2025-01-10 00:09:25 +08:00
package config
import (
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/rest"
)
type Config struct {
rest.RestConf
2025-06-09 12:34:52 +08:00
DataSource string
CacheRedis cache.CacheConf
JwtAuth JwtAuth // JWT 鉴权相关配置
VerifyCode VerifyCode
Encrypt Encrypt
Alipay AlipayConfig
Wxpay WxpayConfig
Applepay ApplepayConfig
Ali AliConfig
WestConfig WestConfig
YushanConfig YushanConfig
SystemConfig SystemConfig
WechatH5 WechatH5Config
CloudAuth CloudAuthConfig
Query QueryConfig
AdminConfig AdminConfig
AdminPromotion AdminPromotion
2025-01-10 00:09:25 +08:00
}
// 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 {
2025-03-07 03:48:59 +08:00
AppID string
PrivateKey string
AlipayPublicKey string
AppCertPath string // 应用公钥证书路径
AlipayCertPath string // 支付宝公钥证书路径
AlipayRootCertPath string // 根证书路径
IsProduction bool
NotifyUrl string
ReturnURL string
2025-01-10 00:09:25 +08:00
}
type WxpayConfig struct {
AppID string
MchID string
MchCertificateSerialNumber string
MchApiv3Key string
MchPrivateKeyPath string
2025-05-11 01:00:40 +08:00
MchPublicKeyID string
MchPublicKeyPath string
2025-01-10 00:09:25 +08:00
NotifyUrl string
RefundNotifyUrl string
}
type AliConfig struct {
Code string
}
type ApplepayConfig struct {
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 SystemConfig struct {
ThreeVerify bool
}
type WechatH5Config struct {
AppID string
AppSecret string
}
2025-05-24 14:26:20 +08:00
type CloudAuthConfig struct {
AccessKeyId string
AccessKeySecret string
Endpoint string
SceneId int64
ReturnUrl string
}
2025-06-02 18:21:08 +08:00
type QueryConfig struct {
ShareLinkExpire int64
}
2025-06-09 12:34:52 +08:00
type AdminConfig struct {
AccessSecret string
AccessExpire int64
RefreshAfter int64
}
type AdminPromotion struct {
URLDomain string
}