tyc-server/app/user/cmd/api/internal/config/config.go

64 lines
1.3 KiB
Go
Raw Normal View History

2024-11-03 15:28:10 +08:00
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
2024-11-21 12:14:34 +08:00
Encrypt Encrypt
Alipay AlipayConfig
Wxpay WxpayConfig
Ali AliConfig
WestConfig WestConfig
2024-11-03 15:28:10 +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
}
2024-11-21 12:14:34 +08:00
type Encrypt struct {
SecretKey string
}
type AlipayConfig struct {
AppID string
PrivateKey string
AlipayPublicKey string
IsProduction bool
NotifyUrl string
}
type WxpayConfig struct {
AppID string
MchID string
MchCertificateSerialNumber string
MchApiv3Key string
MchPrivateKeyPath string
NotifyUrl string
RefundNotifyUrl string
}
type AliConfig struct {
Code string
}
type WestConfig struct {
Url string
Key string
SecretId string
SecretSecondId string
}