kvdb

package
v0.0.0-...-64eff32 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: GPL-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBV

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

func (*DBV) GetAccessTime

func (v *DBV) GetAccessTime() int64

func (*DBV) GetData

func (v *DBV) GetData() string

type KV

type KV struct {
	K string `json:"k"`
	V string `json:"v,omitempty"`
	P string `json:"p,omitempty"`
	L int    `json:"l,omitempty"`
}

type KVDB

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

func NewKVDB

func NewKVDB(p string, savepath string) *KVDB

func (*KVDB) DelK

func (kvdb *KVDB) DelK(k string)

func (*KVDB) Find

func (kvdb *KVDB) Find(k string) (v string, err error)

func (*KVDB) GetK

func (kvdb *KVDB) GetK(k string) (v string)

func (*KVDB) Load

func (kvdb *KVDB) Load()

func (*KVDB) Save

func (kvdb *KVDB) Save()

func (*KVDB) Store

func (kvdb *KVDB) Store(k, v string) error

func (*KVDB) TraversDo

func (kvdb *KVDB) TraversDo(arg interface{}, f func(arg interface{}, k, v interface{}))

func (*KVDB) Update

func (kvdb *KVDB) Update(k, v string)

type KVDBInterface

type KVDBInterface interface {
	Store(k, v string) error
	Update(k, v string)
	GetK(k string) (v string)
	Find(k string) (v string, err error)
	DelK(k string)
	TraversDo(arg interface{}, f func(arg interface{}, k, v interface{}))
	Save()
	Load()
}

type KVS

type KVS struct {
	Kvs []*KV `json:"kvs"`
}

Jump to

Keyboard shortcuts

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