database

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnknown is returned when a response is received that doesn't match any expected outcome.
	ErrUnknown = fmt.Errorf("unknown error")
)

Functions

This section is empty.

Types

type DBModule added in v0.6.2

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

func NewDBModule added in v0.6.2

func NewDBModule(hub *kv.Hub, logger *zap.Logger) (*DBModule, error)

func (*DBModule) Close added in v0.6.2

func (mod *DBModule) Close() error

func (*DBModule) GetAll added in v0.6.2

func (mod *DBModule) GetAll(prefix string) (map[string]string, error)

func (*DBModule) GetJSON added in v0.6.2

func (mod *DBModule) GetJSON(key string, dst interface{}) error

func (*DBModule) GetKey added in v0.6.2

func (mod *DBModule) GetKey(key string) (string, error)

func (*DBModule) Hub added in v0.6.2

func (mod *DBModule) Hub() *kv.Hub

func (*DBModule) PutJSON added in v0.6.2

func (mod *DBModule) PutJSON(key string, data interface{}) error

func (*DBModule) PutJSONBulk added in v0.6.2

func (mod *DBModule) PutJSONBulk(kvs map[string]interface{}) error

func (*DBModule) PutKey added in v0.6.2

func (mod *DBModule) PutKey(key string, data string) error

func (*DBModule) RemoveKey added in v0.6.2

func (mod *DBModule) RemoveKey(key string) error

func (*DBModule) Subscribe added in v0.6.2

func (mod *DBModule) Subscribe(fn kv.SubscriptionCallback, prefixes ...string) error

type KvError added in v0.6.2

type KvError struct {
	ErrorData kv.Error
}

func (*KvError) Error added in v0.6.2

func (kv *KvError) Error() string

type KvPair added in v0.6.2

type KvPair struct {
	Key  string
	Data string
}

Jump to

Keyboard shortcuts

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