...
|
...
|
@@ -2,36 +2,21 @@ package config |
|
|
|
|
|
import (
|
|
|
"github.com/zeromicro/go-zero/core/stores/cache"
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
|
type JWT struct {
|
|
|
Secret string `json:",optional"`
|
|
|
Expires time.Duration `json:",optional"`
|
|
|
}
|
|
|
type JwtAuth struct {
|
|
|
type Auth struct {
|
|
|
AccessSecret string
|
|
|
Expire int64
|
|
|
AccessExpire int64
|
|
|
}
|
|
|
type Config struct {
|
|
|
JwtAuth JwtAuth `json:",optional"`
|
|
|
UserRpc zrpc.RpcClientConf `json:",optional"`
|
|
|
AuthRpc zrpc.RpcClientConf `json:",optional"`
|
|
|
PostRpc zrpc.RpcClientConf `json:",optional"`
|
|
|
CommentRpc zrpc.RpcClientConf `json:",optional"`
|
|
|
JWT JWT `json:",optional"`
|
|
|
DB struct {
|
|
|
DB struct {
|
|
|
DataSource string
|
|
|
} `json:",optional"`
|
|
|
Cache cache.CacheConf `json:",optional"`
|
|
|
DTM DTM `json:",optional"`
|
|
|
Sms Sms `json:",optional"`
|
|
|
Oss Oss `json:",optional"`
|
|
|
Wechat Wechat `json:",optional"` // 学员端微信
|
|
|
CoachClient Wechat `json:",optional"` // 教练端微信
|
|
|
OfficialAccount Wechat `json:",optional"`
|
|
|
ThirdWechatApps []Wechat `json:",optional"`
|
|
|
Cache cache.CacheConf `json:",optional"`
|
|
|
DTM DTM `json:",optional"`
|
|
|
Sms Sms `json:",optional"`
|
|
|
Oss Oss `json:",optional"`
|
|
|
Wechat Wechat `json:",optional"`
|
|
|
}
|
|
|
|
|
|
type DTM struct {
|
...
|
...
|
|