Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Module is default connection to PostgreSQL Module = module.Module{ {Constructor: NewDefaultConfig}, {Constructor: NewConnection}, } // ErrEmptyConfig when given empty options ErrEmptyConfig = errors.New("database empty config") // ErrEmptyLogger when logger not initialized ErrEmptyLogger = errors.New("database empty logger") )
Functions ¶
Types ¶
type Config ¶
type Config = struct { Addr string User string Password string Database string Debug bool PoolSize int Logger *zap.SugaredLogger }
Config alias
type Hook ¶
type Hook struct { StartAt time.Time Before func(*pg.QueryEvent) After func(*pg.QueryEvent) }
Hook is a simple implementation of pg.QueryHook
Click to show internal directories.
Click to hide internal directories.