Documentation
¶
Overview ¶
Package postgres provides a persistence Driver backed by PostgreSQL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.18.0
type Config struct {
// Pool is the pgxpool configuration used to establish connections.
Pool *pgxpool.Config
}
Config holds the configuration for a PostgreSQL persistence driver.
func FromURL ¶ added in v0.18.0
FromURL returns a *Config for the given postgres:// or postgresql:// *url.URL. See ParseURL for the URL format.
func ParseURL ¶ added in v0.18.0
ParseURL returns a *Config for the given postgres:// or postgresql:// URL string.
URL format:
postgres://[user:password@]host[:port]/database[?parameters]
Pool and connection settings can be configured via URL parameters. See pgxpool.ParseConfig for the full list of supported parameters.
type Driver ¶ added in v0.18.0
type Driver struct {
// contains filtered or unexported fields
}
Driver is a persistence driver backed by PostgreSQL.
func New ¶ added in v0.18.0
New returns a Driver that uses the given *sql.DB. The caller retains ownership of db; Driver.Close does not close it.
func (*Driver) JournalStore ¶ added in v0.18.0
func (d *Driver) JournalStore() journal.BinaryStore
JournalStore returns a journal store backed by PostgreSQL.
func (*Driver) KVStore ¶ added in v0.18.0
func (d *Driver) KVStore() kv.BinaryStore
KVStore returns a key/value store backed by PostgreSQL.
func (*Driver) SetStore ¶ added in v0.18.0
func (d *Driver) SetStore() set.BinaryStore
SetStore returns a set store backed by PostgreSQL.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
bigint
Package bigint provides helpers to "bias encode" uint64 values as signed PostgreSQL int8 (bigint) values.
|
Package bigint provides helpers to "bias encode" uint64 values as signed PostgreSQL int8 (bigint) values. |
|
pgerror
Package pgerror provides utilities for working with PostgreSQL errors.
|
Package pgerror provides utilities for working with PostgreSQL errors. |
|
pgtest
Package pgtest provides utilities for testing code that interacts with PostgreSQL databases.
|
Package pgtest provides utilities for testing code that interacts with PostgreSQL databases. |
|
Package pgjournal provides an implementation of journal.BinaryStore that persists to a PostgreSQL database.
|
Package pgjournal provides an implementation of journal.BinaryStore that persists to a PostgreSQL database. |
|
Package pgkv provides an implementation of kv.BinaryStore that persists to a PostgreSQL database.
|
Package pgkv provides an implementation of kv.BinaryStore that persists to a PostgreSQL database. |
|
Package pgset provides an implementation of set.BinaryStore that persists to a PostgreSQL database.
|
Package pgset provides an implementation of set.BinaryStore that persists to a PostgreSQL database. |