backend/internal/config/config.go

53 lines
1.2 KiB
Go
Raw Normal View History

2025-09-30 16:53:31 +00:00
package config
import (
"time"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/redis"
"github.com/zeromicro/go-zero/rest"
)
2025-09-30 16:53:31 +00:00
type Config struct {
rest.RestConf
// Redis 配置
RedisConf redis.RedisConf
// Redis Cluster (Cache)
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
}
2025-09-30 16:53:31 +00:00
}