manager

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrDBFileBroken added in v0.1.8

type ErrDBFileBroken struct {
	Filename    string
	OpenError   error
	DecodeError error
}

func (ErrDBFileBroken) Error added in v0.1.8

func (e ErrDBFileBroken) Error() string

func (ErrDBFileBroken) Unwrap added in v0.1.8

func (e ErrDBFileBroken) Unwrap() error

type ErrDBFileCannot added in v0.1.8

type ErrDBFileCannot struct {
	Action     string
	Underlying error
}

func (ErrDBFileCannot) Error added in v0.1.8

func (e ErrDBFileCannot) Error() string

func (ErrDBFileCannot) Unwrap added in v0.1.8

func (e ErrDBFileCannot) Unwrap() error

type Manager

type Manager interface {
	kvstore.Getter
	kvstore.Checker
	kvstore.Cloner
	kvstore.Exporter
	kvstore.KeySplitter

	Close()

	Set(key string, value *kvstore.Value) error
	SetNull(key string) error
	SetInt64(key string, value int64) error
	SetUint64(key string, value uint64) error
	SetFloat64(key string, value float64) error
	SetBool(key string, value bool) error
	SetString(key string, value string) error
	SetTrue(key string) error
	SetFalse(key string) error
	SetList(key string, value []interface{}) error
	SetMap(key string, value map[string]interface{}) error

	Delete(key string) error
	Clear() error

	ApplyByJSON(data []byte) error

	Dump() error

	Unsafe() UnsafeManager
	IsReadonly() bool
}

func NewManager

func NewManager(dbFilename string) (Manager, error)

NewManager 创建一个新的 Manager 对象

func NewReadonlyManager added in v0.1.13

func NewReadonlyManager(dbFilename string) (Manager, error)

type UnsafeManager

type UnsafeManager interface {
	UnsafeLock()
	UnsafeUnlock()

	UnsafeStore() kvstore.Store
}

Jump to

Keyboard shortcuts

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