level

package
v0.0.0-...-0917785 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: Unlicense Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LegacyRedis

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

func (*LegacyRedis) Delete

func (lr *LegacyRedis) Delete(ident string) error

Delete - Deletes this key

func (*LegacyRedis) Get

func (lr *LegacyRedis) Get(ident string, key string) string

Get - Get value from the hash-map

func (*LegacyRedis) HKeys

func (lr *LegacyRedis) HKeys(ident string) []string

HKeys - Get a list of the keys in the hash-map

func (*LegacyRedis) Set

func (lr *LegacyRedis) Set(ident string, key string, value string) error

Set - Set a value in the hash-map

func (*LegacyRedis) SetM

func (lr *LegacyRedis) SetM(ident string, set map[string]interface{}) error

SetM - runs HMSET

type Level

type Level struct {
	DB     *leveldb.DB
	Legacy *LegacyRedis
}

func New

func New(path string, rc *redis.Client) (*Level, error)

func (*Level) Get

func (lvl *Level) Get(ident string, key string) string

func (*Level) NewObject

func (lvl *Level) NewObject(prefix, ident string) *Object

func (*Level) NewState

func (lvl *Level) NewState(identifier string) *State

func (*Level) Set

func (lvl *Level) Set(ident string, key, value string) error

func (*Level) SetM

func (lvl *Level) SetM(ident string, hash map[string]interface{}) error

type Object

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

func (*Object) Delete

func (obj *Object) Delete() error

func (*Object) Get

func (obj *Object) Get(key string) string

func (*Object) HKeys

func (obj *Object) HKeys() []string

func (*Object) Set

func (obj *Object) Set(key, value string) error

type State

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

func (*State) Delete

func (st *State) Delete() error

func (*State) Get

func (st *State) Get(key string) string

func (*State) Set

func (st *State) Set(key, value string) error

func (*State) SetM

func (st *State) SetM(hash map[string]interface{}) error

Jump to

Keyboard shortcuts

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