kv

package
v0.0.0-...-b3d26d0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Del

func Del(ctx common.Context, originKey string)

func Drop

func Drop(ctx common.Context, masterKey string)

func Get

func Get(ctx common.Context, originKey string)

func GetPassword

func GetPassword(masterKey string) string

func List

func List(ctx common.Context, originKey string)

func Put

func Put(ctx common.Context, originKey, val string)

Types

type KvData

type KvData map[string][]byte

func FromData

func FromData(data []byte, key string) KvData

func New

func New() KvData

func ReadKv

func ReadKv(masterKey, password string) KvData

func (KvData) Append

func (data KvData) Append(key, val string)

func (KvData) Del

func (data KvData) Del(key string)

func (KvData) Encrypt

func (data KvData) Encrypt(key string) ([]byte, error)

func (KvData) Get

func (data KvData) Get(key string) []byte

func (KvData) IsValid

func (data KvData) IsValid() bool

func (KvData) List

func (data KvData) List(keyPrefix string) ([]string, [][]byte)

func (KvData) Put

func (data KvData) Put(key string, val []byte)

Jump to

Keyboard shortcuts

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