Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Host string `mapstructure:"host"` Port string `mapstructure:"port"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` Database string `mapstructure:"database"` SSLMode string `mapstructure:"ssl_mode"` MaxIdleConns int `mapstructure:"max_idle_conns"` MaxOpenConns int `mapstructure:"max_open_conns"` ConnMaxLiftTime time.Duration `mapstructure:"conn_max_life_time"` }
type PostgresDB ¶
type PostgresDB struct {
// contains filtered or unexported fields
}
func New ¶
func New(config Config) *PostgresDB
func (*PostgresDB) Conn ¶
func (m *PostgresDB) Conn() *sql.DB
Click to show internal directories.
Click to hide internal directories.