Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.Wrap(errorx.Err_NOT_FOUND, "record not found") ErrExists = errors.Wrap(errorx.Err_ALREADY_EXISTS, "key/bucket exists") ErrEmptyNode = errors.Wrap(errorx.Err_INVALID_ARGUMENT, "empty node") ErrEmptyLeaf = errors.Wrap(errorx.Err_INVALID_ARGUMENT, "empty leaf") ErrNoSuchBucket = errors.Wrap(errorx.Err_NOT_FOUND, "no such bucket") ErrNoParentBucket = errors.Wrap(errorx.Err_INVALID_ARGUMENT, "no parent bucket") )
Functions ¶
func KeySplitter ¶
Types ¶
type KV ¶
type KV interface { // GetKV get value of key GetKV(key string, isDir bool) (*apicassemdb.Entity, error) // SetKV save key and value SetKV(key string, value *apicassemdb.Entity, isDir bool) error // UnsetKV save key and value UnsetKV(key string, isDir bool) error // Range iterates all keys or buckets under the given key. Range(key string, seek string, limit int) (*RangeResult, error) }
KV is a proxy who helps convert data between logic and persistence.Not only all parameters of KV are logic datatype, but also all return values.
func NewEmptyRepository ¶
func NewEmptyRepository() KV
type RangeResult ¶
type RangeResult struct { Items []*apicassemdb.Entity HasMore bool NextSeekKey string ExpiredKeys []string }
Click to show internal directories.
Click to hide internal directories.