kv

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRecordNotFound = errors.New("record not found")

ErrRecordNotFound ...

Functions

This section is empty.

Types

type BlobStore

type BlobStore interface {
	Close() error
	CreateStoreIfNotExists(table string) error
	DeleteStore(table string) error
	View(table string, fn func(tx BlobTx) error) error
	Update(table string, fn func(tx BlobTx) error) error
}

BlobStore ...

type BlobTx

type BlobTx interface {
	Put(key string, value []byte) error
	Get(key string) ([]byte, error)
	Delete(key string) error
	ScanPrefix(prefix string) ([][]byte, error)
	ScanCursor(cursor Cursor) ([][]byte, error)
}

BlobTx ...

type Cursor

type Cursor struct {
	Prefix string
	After  string
	Before string
	First  int
	Last   int
}

type RWStore

type RWStore interface {
	Store
	Update(fn func(tx RWTx) error) error
}

RWStore ...

type RWTx

type RWTx interface {
	RWStore
	Delete(key string) error
	Get(key string, m proto.Message) error
	Put(key string, m proto.Message) error
	ScanPrefix(prefix string, messages any) error
	ScanCursor(cursor Cursor, messages any) error
}

RWTx ...

type Store

type Store interface {
	View(fn func(tx Tx) error) error
}

Store ...

type Tx

type Tx interface {
	Store
	Get(key string, m proto.Message) error
	ScanPrefix(prefix string, messages any) error
	ScanCursor(cursor Cursor, messages any) error
}

Tx ..

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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