mdb

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CmdAdd

func CmdAdd(key string, obj Mdb, args []string) (err error)

func CmdDel

func CmdDel(key string, ids []string) (err error)

func CmdGet

func CmdGet(key string, id string) (err error)

func CmdList

func CmdList(key string) (err error)

func CmdReadRec added in v1.0.1

func CmdReadRec(key string, obj Mdb, fp *os.File) (err error)

func CmdSet

func CmdSet(key string, id string, obj Mdb, args []string) (err error)

func Del

func Del(key string, id string) (err error)

func DelAll

func DelAll(key string) (err error)

func List

func List(key string) (ids []string, err error)

func Load

func Load(key string, id string, o Mdb) (err error)

func Save

func Save(key string, id string, o Mdb) (err error)

func SetKV

func SetKV(o Mdb, args []string) (e error)

Types

type Mdb

type Mdb interface {
	Reset()
	Validate() error
	Set(key, val string) error
	Marshal() ([]byte, error)
	Unmarshal(b []byte) error
}

type Object

type Object map[string]string

func (Object) Marshal

func (s Object) Marshal() (b []byte, err error)

func (Object) Reset

func (s Object) Reset()

func (Object) Set

func (s Object) Set(key, val string) error

func (Object) Unmarshal

func (s Object) Unmarshal(b []byte) (err error)

func (Object) Validate

func (s Object) Validate() error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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