postgres

package
v0.0.0-...-249e25c Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStore

func NewStore(connStr string) (kv.BlobStore, error)

func NewStoreConfig

func NewStoreConfig(cfg Config) (kv.BlobStore, error)

Types

type Config

type Config struct {
	ConnStr       string
	Logger        *zap.Logger
	EnableLogging bool
	MaxConns      int32
}

type Store

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

Store ...

func (*Store) Close

func (s *Store) Close() error

Close ...

func (*Store) CreateStoreIfNotExists

func (s *Store) CreateStoreIfNotExists(table string) error

CreateStoreIfNotExists ...

func (*Store) DeleteStore

func (s *Store) DeleteStore(table string) error

DeleteStore ...

func (*Store) Update

func (s *Store) Update(table string, fn func(tx kv.BlobTx) error) error

Update ...

func (*Store) View

func (s *Store) View(table string, fn func(tx kv.BlobTx) error) error

View ...

type Tx

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

Tx ...

func (Tx) Delete

func (t Tx) Delete(key string) error

Delete ...

func (Tx) Get

func (t Tx) Get(key string) (value []byte, err error)

Get ...

func (Tx) Put

func (t Tx) Put(key string, value []byte) error

Put ...

func (Tx) ScanCursor

func (t Tx) ScanCursor(cursor kv.Cursor) (values [][]byte, err error)

ScanCursor ...

func (Tx) ScanPrefix

func (t Tx) ScanPrefix(prefix string) (values [][]byte, err error)

ScanPrefix ...

Jump to

Keyboard shortcuts

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