51 lines
1.2 KiB
Go
Executable File
51 lines
1.2 KiB
Go
Executable File
package config
|
|
|
|
import (
|
|
"github.com/zeromicro/go-zero/core/stores/cache"
|
|
"github.com/zeromicro/go-zero/core/stores/redis"
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"time"
|
|
)
|
|
|
|
type Config struct {
|
|
zrpc.RpcServerConf
|
|
redis.RedisConf
|
|
// Redis Cluster
|
|
Cache cache.CacheConf
|
|
CacheExpireTime time.Duration
|
|
CacheWithNotFoundExpiry time.Duration
|
|
|
|
Mongo struct {
|
|
Schema string
|
|
User string
|
|
Password string
|
|
Host string
|
|
Port string
|
|
Database string
|
|
ReplicaName string
|
|
MaxStaleness time.Duration
|
|
MaxPoolSize uint64
|
|
MinPoolSize uint64
|
|
MaxConnIdleTime time.Duration
|
|
Compressors []string
|
|
EnableStandardReadWriteSplitMode bool
|
|
ConnectTimeoutMs int64
|
|
}
|
|
|
|
// 密碼加密層數
|
|
Bcrypt struct {
|
|
Cost int
|
|
}
|
|
|
|
GoogleAuth struct {
|
|
ClientID string
|
|
AuthURL string
|
|
}
|
|
|
|
LineAuth struct {
|
|
ClientID string
|
|
ClientSecret string
|
|
RedirectURI string
|
|
}
|
|
}
|