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"
)

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
	}
}
