Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrKeyNotFound is returned when the key is not found. ErrKeyNotFound = errors.New("key not found") // ErrUnknown is returned when the error is unknown. ErrUnknown = errors.New("unknown error") )
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { Store Missing(key string) bool Pull(key string, value interface{}) error Set(key string, value interface{}, ttl time.Duration) bool Add(key string, value interface{}, ttl time.Duration) bool Remember(key string, value interface{}, ttl time.Duration, callback func() interface{}) error RememberForever(key string, value interface{}, callback func() interface{}) error Delete(key string) bool Clear() bool }
type Store ¶
type Store interface { Has(key string) bool Get(key string, value interface{}) error Put(key string, value interface{}, ttl time.Duration) bool Increment(key string, value int) int Decrement(key string, value int) int Forever(key string, value interface{}) bool Forget(key string) bool Flush() bool GetPrefix() string }
type StoreAddable ¶
type StorePullable ¶
Click to show internal directories.
Click to hide internal directories.