Documentation ¶
Index ¶
- Constants
- func DefaultPoolSize() int
- type DebugHook
- type Postgres
- func (p *Postgres) Check(ctx context.Context) error
- func (p *Postgres) Close() error
- func (p *Postgres) CreateCage(ctx context.Context, cage *model.Cage) error
- func (p *Postgres) ExecTx(ctx context.Context, fn func(tx *pg.Tx) error) error
- func (p *Postgres) GetCage(ctx context.Context, id model.ID) (*model.Cage, error)
- func (p *Postgres) ListCages(ctx context.Context, params storage.ListCageParams) ([]*model.Cage, error)
- func (p *Postgres) UpdateCage(ctx context.Context, id model.ID, updater storage.CageUpdater) error
Constants ¶
View Source
const DefaultMaxConnAge = 10 * time.Minute
Variables ¶
This section is empty.
Functions ¶
func DefaultPoolSize ¶
func DefaultPoolSize() int
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func Connect ¶
Connect parses a database URL into options that can be used to connect to PostgreSQL.
func (*Postgres) CreateCage ¶
func (*Postgres) UpdateCage ¶
Click to show internal directories.
Click to hide internal directories.