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

postgres

package
v1.79.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package postgres provides a PostgreSQL-backed granular config entry store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store persists config entries in PostgreSQL with change auditing.

func New

func New(db *sql.DB) *Store

New creates a new PostgreSQL config entry store.

func (*Store) Changelog added in v1.48.0

func (s *Store) Changelog(ctx context.Context, limit int) ([]configstore.ChangelogEntry, error)

Changelog returns recent config changes, newest first.

func (*Store) Delete added in v1.48.0

func (s *Store) Delete(ctx context.Context, key, author string) error

Delete removes a config entry and logs the change atomically.

func (*Store) Get added in v1.48.0

func (s *Store) Get(ctx context.Context, key string) (*configstore.Entry, error)

Get returns a single config entry by key.

func (*Store) List added in v1.48.0

func (s *Store) List(ctx context.Context) ([]configstore.Entry, error)

List returns all config entries, ordered by key.

func (*Store) Mode

func (*Store) Mode() string

Mode returns "database".

func (*Store) Set added in v1.48.0

func (s *Store) Set(ctx context.Context, key, value, author string) error

Set creates or updates a config entry and logs the change atomically.

Jump to

Keyboard shortcuts

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