Versions in this module Expand all Collapse all v1 v1.2.1 Sep 22, 2024 v1.2.0 Sep 21, 2024 Changes in this version + const BucketExistsError + const BucketNotFoundError + const DatabaseAlreadyOpenError + const DatabaseNotOpenError + const DefaultKvBucket + const DefaultKvPath + const KeyNotFoundError + const KeyRequiredError + const KeyTooLargeError + const ValueTooLargeError + var ErrStop = errors.New("stop") + type Error struct + Message string + Name ErrorName + func NewError(name ErrorName, message string) *Error + func (e *Error) Error() string + type ErrorName string + type KV struct + func NewKV(vu modules.VU, db *db) *KV + func (k *KV) Clear() *sobek.Promise + func (k *KV) Close() error + func (k *KV) Delete(key sobek.Value) *sobek.Promise + func (k *KV) Get(key sobek.Value) *sobek.Promise + func (k *KV) List(options sobek.Value) *sobek.Promise + func (k *KV) Set(key sobek.Value, value sobek.Value) *sobek.Promise + func (k *KV) Size() *sobek.Promise + type ListEntry struct + Key string + Value any + type ListOptions struct + Limit int64 + Prefix string + func ImportListOptions(rt *sobek.Runtime, options sobek.Value) ListOptions + type ModuleInstance struct + func (mi *ModuleInstance) Exports() modules.Exports + func (mi *ModuleInstance) NewKV(_ sobek.ConstructorCall) *sobek.Object + func (mi *ModuleInstance) OpenKv() *sobek.Object + type RootModule struct + func New() *RootModule + func (rm *RootModule) NewModuleInstance(vu modules.VU) modules.Instance