kvmap

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorParamEmpty liberr.CodeError = iota + liberr.MinPkgDatabaseKVMap
	ErrorBadInstance
	ErrorGetFunction
	ErrorSetFunction
	ErrorListFunction
	ErrorFunctionParams
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver[K comparable, MK comparable, M any] struct {
	libkvd.KVDriver[K, M]

	FctGet  FuncGet[K, MK]
	FctSet  FuncSet[K, MK]
	FctList FuncList[K, MK]
}

func (*Driver[K, MK, M]) Get

func (o *Driver[K, MK, M]) Get(key K, model *M) error

func (*Driver[K, MK, M]) List

func (o *Driver[K, MK, M]) List() ([]K, error)

func (*Driver[K, MK, M]) Set

func (o *Driver[K, MK, M]) Set(key K, model M) error

func (*Driver[K, MK, M]) Walk

func (o *Driver[K, MK, M]) Walk(fct libkvd.FctWalk[K, M]) error

type FuncGet

type FuncGet[K comparable, MK comparable] func(key K) (map[MK]any, error)

type FuncList

type FuncList[K comparable, MK comparable] func() ([]K, error)

type FuncSet

type FuncSet[K comparable, MK comparable] func(key K, model map[MK]any) error

Jump to

Keyboard shortcuts

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