Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func NewPostgresConnection ¶
func NewPostgresConnection(config PostgresConfig) (*DB, error)
type PostgresConfig ¶
type PostgresConfig struct { URL string `mapstructure:"DB_URL"` MaxOpenConns int `mapstructure:"DB_MAX_OPEN_CONNS"` MaxIdleConns int `mapstructure:"DB_MAX_IDLE_CONNS"` MaxLifetime time.Duration `mapstructure:"DB_MAX_LIFETIME"` }
func LoadPostgresConfig ¶
func LoadPostgresConfig() (PostgresConfig, error)
type RedisClient ¶
type RedisClient struct {
*redis.Client
}
func NewRedisConnection ¶
func NewRedisConnection(config RedisConfig) (*RedisClient, error)
func (*RedisClient) Close ¶
func (r *RedisClient) Close() error
type RedisConfig ¶
type RedisConfig struct { URL string `mapstructure:"REDIS_URL"` PoolSize int `mapstructure:"REDIS_POOL_SIZE"` }
func LoadRedisConfig ¶
func LoadRedisConfig() (RedisConfig, error)
Click to show internal directories.
Click to hide internal directories.