Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { App AppConfig `mapstructure:"app"` HTTP HTTPConfig `mapstructure:"http"` Limiter LimiterConfig `mapstructure:"ttl"` CacheTTL time.Duration `mapstructure:"ttl"` Postgres PostgresConfig Redis RedisConfig }
type HTTPConfig ¶
type PostgresConfig ¶
type PostgresConfig struct { Port string `mapstructure:"port"` Host string `mapstructure:"host"` Name string `mapstructure:"dbName"` User string `mapstructure:"user"` Password string `mapstructure:"password"` }
func (PostgresConfig) GetDSN ¶
func (pc PostgresConfig) GetDSN() string
func (PostgresConfig) GetMaxIdleConn ¶
func (pc PostgresConfig) GetMaxIdleConn() int
func (PostgresConfig) GetMaxOpenConn ¶
func (pc PostgresConfig) GetMaxOpenConn() int
type RedisConfig ¶
type RedisConfig struct { Port string `mapstructure:"port"` Host string `mapstructure:"host"` Password string `mapstructure:"password"` DB int `mapstructure:"db"` }
func (RedisConfig) GetAddr ¶
func (rc RedisConfig) GetAddr() string
func (RedisConfig) GetDB ¶
func (rc RedisConfig) GetDB() int
func (RedisConfig) GetPassword ¶
func (rc RedisConfig) GetPassword() string
Click to show internal directories.
Click to hide internal directories.