Documentation ¶
Overview ¶
Package pgrepo provides a postgres implementation of the repos.Iface interface.
It builds a configurable connection pool to a postgres database, with an instrumented driver for tracing.
Index ¶
Constants ¶
View Source
const ( DefaultURL = pgpool.DefaultURL DefaultDB = pgpool.DefaultDBAlias )
Variables ¶
This section is empty.
Functions ¶
func DefaultSettings ¶
DefaultSettings returns all defaults for this package as a viper register.
This is primarily intended for documentation & help purpose.
Types ¶
type Repository ¶
type Repository struct { *pgpool.Repository // contains filtered or unexported fields }
Repository knows how to handle a postgres backend database.
The database driver is instrumented for tracing.
func New ¶
New new postgres repository serving Messages.
The new repository needs to be started wih Start() in order to create the connection pools.
func (*Repository) Messages ¶
func (r *Repository) Messages() repos.MessageRepo
func (*Repository) Start ¶
func (r *Repository) Start() error
Click to show internal directories.
Click to hide internal directories.