Documentation
¶
Index ¶
- func NewPostgresBackend(host string, port int, user, password, database string, opts ...option) *postgresBackend
- func NewPostgresBackendWithDB(pool *sql.DB, opts ...option) *postgresBackend
- func WithApplyMigrations(applyMigrations bool) option
- func WithBackendOptions(opts ...backend.BackendOption) option
- func WithPostgresOptions(f func(db *sql.DB)) option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostgresBackend ¶
func NewPostgresBackendWithDB ¶
NewPostgresBackendWithDB leaves connection configuration and ownership with the caller. Automatic migrations are disabled by default.
func WithApplyMigrations ¶
func WithApplyMigrations(applyMigrations bool) option
WithApplyMigrations automatically applies database migrations on startup.
func WithBackendOptions ¶
func WithBackendOptions(opts ...backend.BackendOption) option
WithBackendOptions allows to pass generic backend options.
func WithPostgresOptions ¶
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package db owns postgres connection setup and the backend's immutable migration history.
|
Package db owns postgres connection setup and the backend's immutable migration history. |
Click to show internal directories.
Click to hide internal directories.