db

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Plugin = plugins.Plugin{
	Config: &Config{},
	Inject: New,
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Database DatabaseItem `yaml:"database"`
}

func (*Config) Default

func (v *Config) Default()

type DB

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

func New

func New(c *Config) *DB

func (*DB) DelKV

func (v *DB) DelKV(item EntityKV) error

func (*DB) Down

func (v *DB) Down() error

func (*DB) GetKV

func (v *DB) GetKV(item *EntityKV) error

func (*DB) ListKV

func (v *DB) ListKV(prefix []byte) ([]EntityKV, error)

func (*DB) SearchKV

func (v *DB) SearchKV(prefix []byte) ([]EntityKV, error)

func (*DB) SetKV

func (v *DB) SetKV(item EntityKV) error

func (*DB) Up

func (v *DB) Up(_ xc.Context) error

type DatabaseItem

type DatabaseItem struct {
	Folder string `yaml:"folder"`
}

type EntityKV

type EntityKV struct {
	Key   []byte
	Value []byte
}

func (EntityKV) Buckets

func (v EntityKV) Buckets() [][]byte

Jump to

Keyboard shortcuts

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