Documentation ¶
Index ¶
- Variables
- func AtomicModify(s KVStore, key string, ...) error
- func AtomicModifyWithOptions(s KVStore, key string, ...) error
- func Ensure(s KVStore, key string, newValue []byte) ([]byte, error)
- func LoadJSON(s KVStore, key string, v interface{}) (returnErr error)
- func StoreJSON(s KVStore, key string, v interface{}) (returnErr error)
- type KVStore
- type OneTimeStore
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func AtomicModify ¶
func AtomicModifyWithOptions ¶
Types ¶
type KVStore ¶
type KVStore interface { Load(key string) ([]byte, error) Store(key string, data []byte) error StoreTTL(key string, data []byte, ttlSeconds int64) error StoreWithOptions(key string, value []byte, opts model.PluginKVSetOptions) (bool, error) Delete(key string) error }
func NewEncryptedKeyStore ¶
func NewHashedKeyStore ¶
func NewPluginStore ¶
type OneTimeStore ¶
type OneTimeStore KVStore
OneTimeStore is a KV store that deletes each record after the first load,
func NewOneTimePluginStore ¶
func NewOneTimePluginStore(api plugin.API, ttl time.Duration) OneTimeStore
func NewOneTimeStore ¶
func NewOneTimeStore(kv KVStore) OneTimeStore
Click to show internal directories.
Click to hide internal directories.