Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClickhouseConfig ¶
type ClickhouseConfig struct { Host string `cfg:"CH_HOST" default:"localhost"` Port uint16 `cfg:"CH_PORT" default:"9000"` User string `cfg:"CH_USER" default:"default"` Pass string `cfg:"CH_PASS" default:"default"` Name string `cfg:"CH_NAME" default:"default"` MustConnect bool `cfg:"CH_MUST_CONNECT" default:"false"` }
type ClickhouseDB ¶
type ClickhouseDB struct { driver.Conn Addr string User string Pass string Name string Must bool Logger *zap.Logger }
func NewClickhouse ¶
func NewClickhouse(cfg *ClickhouseConfig) *ClickhouseDB
func (*ClickhouseDB) Close ¶
func (db *ClickhouseDB) Close() error
type PostgresConfig ¶
type PostgresConfig struct { Host string `cfg:"PG_HOST" default:"localhost"` Port uint16 `cfg:"PG_PORT" default:"5432"` User string `cfg:"PG_USER" default:"postgres"` Pass string `cfg:"PG_PASS" default:"postgres"` Name string `cfg:"PG_NAME" default:"postgres"` MaxConns uint16 `cfg:"PG_MAX_CONNS" default:"10"` }
type PostgresDB ¶
type PostgresDB struct { *pgxpool.Pool Addr string User string Pass string Name string MaxConns uint16 Logger *zap.Logger }
func NewPostgres ¶
func NewPostgres(cfg *PostgresConfig) *PostgresDB
func (*PostgresDB) Close ¶
func (db *PostgresDB) Close()
Click to show internal directories.
Click to hide internal directories.