Documentation ¶
Index ¶
- func BackEndUrl() string
- func GetEmailPort() int
- func GetExpiredToken() int
- func GetOtpExpired() time.Duration
- func GetOtpLength() int
- func GetRabbitPort() int
- func GetRedisDatabase() int
- func GetRedisDefaultCacheTimeOut() time.Duration
- func GetRedisMinIdleConn() int
- func GetRedisPoolSize() int
- func GetRedisPoolTimeout() int
- func GetRedisPort() int
- func LoadEnv()
- func ServiceName() string
- func UseRabbitMQ() bool
- type AppConfig
- type Configs
- type DbConfig
- type EmailConfig
- type RabbitMQConfig
- type RedisConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackEndUrl ¶
func BackEndUrl() string
func GetEmailPort ¶
func GetEmailPort() int
func GetExpiredToken ¶
func GetExpiredToken() int
func GetOtpExpired ¶
func GetOtpLength ¶
func GetOtpLength() int
func GetRabbitPort ¶
func GetRabbitPort() int
func GetRedisDatabase ¶
func GetRedisDatabase() int
func GetRedisMinIdleConn ¶
func GetRedisMinIdleConn() int
func GetRedisPoolSize ¶
func GetRedisPoolSize() int
func GetRedisPoolTimeout ¶
func GetRedisPoolTimeout() int
func GetRedisPort ¶
func GetRedisPort() int
func ServiceName ¶
func ServiceName() string
func UseRabbitMQ ¶
func UseRabbitMQ() bool
Types ¶
type AppConfig ¶
type AppConfig struct { Name string `json:"name"` Env string `json:"env"` Port string `json:"port"` ExpiredToken int `json:"expired_token"` SecretKey string `json:"secret_key"` UseRabbitMQ bool `json:"use_rabbit_mq"` OtpLength int `json:"otp_length"` OtpExpired time.Duration `json:"otp_expired"` BasicUsername string `json:"basic_username"` BasicPassword string `json:"basic_password"` }
type Configs ¶
type Configs struct { App AppConfig DB DbConfig Redis RedisConfig RabbitMQ RabbitMQConfig Email EmailConfig }
func GetInstance ¶
func GetInstance() *Configs
type EmailConfig ¶
type RabbitMQConfig ¶
type RedisConfig ¶
type RedisConfig struct { Host string `json:"host"` Port int `json:"port"` Password string `json:"password"` Database int `json:"database"` Master string `json:"master"` PoolSize int `json:"pool_size"` PoolTimeout int `json:"pool_timeout"` MinIdleConn int `json:"min_idle_conn"` DefaultCacheTimeOut time.Duration `json:"default_cache_time_out"` }
Click to show internal directories.
Click to hide internal directories.