Help us shape the future of Go! Take the 2026 Go Developer Survey

postgres

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package postgres provides PostgreSQL implementations of storage KV, Blob, and Tx backends. Schema changes are deliberately not run by Open; deploy the embedded Goose migrations separately before starting applications.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrations

func Migrations() fs.FS

Migrations returns the embedded PostgreSQL Goose migration filesystem.

func NewBlob

func NewBlob() storage.Backend

NewBlob returns a PostgreSQL Blob backend. Options: dsn (required) and namespace.

func NewKV

func NewKV() storage.Backend

NewKV returns a PostgreSQL KV backend. Options: dsn (required), namespace, and ttl. Run the embedded migrations before using its methods.

func NewTx

func NewTx() storage.Backend

NewTx returns a PostgreSQL transaction backend. Options: dsn (required).

func Register

func Register(reg *storage.Registry) error

Register adds all PostgreSQL backend kinds to reg.

func TxFromContext

func TxFromContext(ctx context.Context) (*sql.Tx, bool)

TxFromContext retrieves the transaction supplied to a TxRunner callback.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL