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

30 lines
631 B
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
}
// 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
}