kv

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const UnDefStr = ""

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValueDB

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

func NewKeyValueDB

func NewKeyValueDB(ctx context.Context, ev *iflog.IpfsLog, log *zap.Logger) (*KeyValueDB, error)

func (*KeyValueDB) Close

func (kv *KeyValueDB) Close()

func (*KeyValueDB) Delete

func (kv *KeyValueDB) Delete(ctx context.Context, key string) error

func (*KeyValueDB) Flush

func (kv *KeyValueDB) Flush(ctx context.Context) error

func (*KeyValueDB) Get

func (kv *KeyValueDB) Get(key string) string

func (*KeyValueDB) List

func (kv *KeyValueDB) List() map[string]string

func (*KeyValueDB) Put

func (kv *KeyValueDB) Put(ctx context.Context, key, value string) error

type OperateType

type OperateType byte
const (
	SetOperateType OperateType = iota
	DeleteOperateType
)

Jump to

Keyboard shortcuts

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