application

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBucketNotFound = errors.New("err bucket not found")

Functions

This section is empty.

Types

type Application

type Application struct {
	Browse *BrowseHandler
}

type Browse

type Browse struct {
	Path   []Key
	Before *Key
	After  *Key
	From   *Key
}

type BrowseHandler

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

func NewBrowseHandler

func NewBrowseHandler(transactionProvider TransactionProvider) *BrowseHandler

func (*BrowseHandler) Execute

func (h *BrowseHandler) Execute(query Browse) (tree Tree, err error)

type Database

type Database interface {
	// Browse returns ErrBucketNotFound if the bucket specified by the path
	// does not exist.
	Browse(path []Key, before, after, from *Key) ([]Entry, error)
}

type Entry

type Entry struct {
	Bucket bool
	Key    Key
	Value  Value
}

type Key

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

func MustNewKey

func MustNewKey(b []byte) Key

func NewKey

func NewKey(b []byte) (Key, error)

func (Key) Bytes

func (k Key) Bytes() []byte

type TransactableAdapters

type TransactableAdapters struct {
	Database Database
}

type TransactionHandler

type TransactionHandler func(adapters *TransactableAdapters) error

type TransactionProvider

type TransactionProvider interface {
	Read(handler TransactionHandler) error
	Write(handler TransactionHandler) error
}

type Tree

type Tree struct {
	Path    []Key
	Entries []Entry
}

type Value

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

func MustNewValue

func MustNewValue(b []byte) Value

func NewValue

func NewValue(b []byte) (Value, error)

func (Value) Bytes

func (v Value) Bytes() []byte

func (Value) IsEmpty

func (v Value) IsEmpty() bool

Jump to

Keyboard shortcuts

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