Documentation
¶
Index ¶
- Variables
- func Ensure(s KVStore, key string, newValue []byte) ([]byte, error)
- func LoadJSON(s KVStore, key string, v interface{}) (returnErr error)
- func NameFromID(id types.ID) string
- func StoreJSON(s KVStore, key string, v interface{}) (returnErr error)
- type EntityStore
- type IDIndexStore
- type KVStore
- type OneTimeStore
- type Store
- type ValueIndexStore
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
View Source
var ErrTryAgain = errors.New("try again")
Functions ¶
func NameFromID ¶
Types ¶
type EntityStore ¶
type IDIndexStore ¶
type KVStore ¶
type KVStore interface { Load(key string) ([]byte, error) Store(key string, data []byte) error StoreTTL(key string, data []byte, ttlSeconds int64) error Delete(key string) error Keys() ([]string, error) Flush() []error }
func NewCacheKVStore ¶
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
type Store ¶
type Store interface { KVStore Entity(string) EntityStore ValueIndex(string, types.ValueArray) ValueIndexStore IDIndex(string) IDIndexStore }
Click to show internal directories.
Click to hide internal directories.