kv

package
v0.0.0-...-bcfd2cf Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	Store(string, []byte) error
	StoreBatch(interface{}) error
	StoreQueueBatch(interface{}) error
	Read(string) ([]byte, error)
	ReadKeys() ([]string, error)
	ReadKeyValues() (map[string][]byte, error)
	ReadKeysWithPrefix(string) ([]string, error)
	ReadPrefix(string) ([][]byte, error)
	ReadFirstValueByPrefix(string) ([]byte, error)
	ReadPrefixWithKey(string) (map[string][]byte, error)
	IsStored(string) bool
	Delete(string) error
	Empty() error
	Close() error
}

DB interface implements methods for a generic key value storage db

func NewDB

func NewDB() (db DB, err error)

NewDB returns a new DB instance based on the environment

type DBMock

type DBMock struct {
	mock.Mock
}

DBMock is an autogenerated mock type for the DB type

func NewDBMock

func NewDBMock() *DBMock

func (*DBMock) Close

func (_m *DBMock) Close() error

Close provides a mock function with given fields:

func (*DBMock) Delete

func (_m *DBMock) Delete(_a0 string) error

Delete provides a mock function with given fields: _a0

func (*DBMock) Empty

func (_m *DBMock) Empty() error

Empty provides a mock function with given fields:

func (*DBMock) IsStored

func (_m *DBMock) IsStored(_a0 string) bool

IsStored provides a mock function with given fields: _a0

func (*DBMock) Read

func (_m *DBMock) Read(_a0 string) ([]byte, error)

Read provides a mock function with given fields: _a0

func (*DBMock) ReadFirstValueByPrefix

func (_m *DBMock) ReadFirstValueByPrefix(_a0 string) ([]byte, error)

ReadFirstValueByPrefix provides a mock function with given fields: _a0

func (*DBMock) ReadKeyValues

func (_m *DBMock) ReadKeyValues() (map[string][]byte, error)

ReadKeyValues provides a mock function with given fields:

func (*DBMock) ReadKeys

func (_m *DBMock) ReadKeys() ([]string, error)

ReadKeys provides a mock function with given fields:

func (*DBMock) ReadKeysWithPrefix

func (_m *DBMock) ReadKeysWithPrefix(_a0 string) ([]string, error)

ReadKeysWithPrefix provides a mock function with given fields: _a0

func (*DBMock) ReadPrefix

func (_m *DBMock) ReadPrefix(_a0 string) ([][]byte, error)

ReadPrefix provides a mock function with given fields: _a0

func (*DBMock) ReadPrefixWithKey

func (_m *DBMock) ReadPrefixWithKey(_a0 string) (map[string][]byte, error)

ReadPrefixWithKey provides a mock function with given fields: _a0

func (*DBMock) Store

func (_m *DBMock) Store(_a0 string, _a1 []byte) error

Store provides a mock function with given fields: _a0, _a1

func (*DBMock) StoreBatch

func (_m *DBMock) StoreBatch(_a0 interface{}) error

StoreBatch provides a mock function with given fields: _a0

func (*DBMock) StoreQueueBatch

func (_m *DBMock) StoreQueueBatch(_a0 interface{}) error

StoreQueueBatch provides a mock function with given fields: _a0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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