postgres

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSchema added in v0.4.2

func CheckSchema(ctx context.Context, db *sql.DB) error

func NewPostgresDB

func NewPostgresDB(ctx context.Context, dsn string, cipher store.CredentialCodec) (*store.Store, error)

func NewPostgresDBWithOptions added in v0.4.2

func NewPostgresDBWithOptions(ctx context.Context, dsn string, cipher store.CredentialCodec, options OpenOptions) (*store.Store, error)

Types

type OpenOptions added in v0.4.2

type OpenOptions struct {
	SchemaMode             SchemaMode
	MaxOpenConnections     int
	MaxIdleConnections     int
	ConnectionMaxLifetime  time.Duration
	ConnectionMaxIdleTime  time.Duration
	PingTimeout            time.Duration
	SchemaBootstrapTimeout time.Duration
}

type SchemaMode added in v0.4.2

type SchemaMode string
const (
	SchemaModeAuto  SchemaMode = "auto"
	SchemaModeCheck SchemaMode = "check"
)

Jump to

Keyboard shortcuts

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