Documentation ¶
Index ¶
- Variables
- type Cache2Go
- func (cache *Cache2Go) Add(key string, ttl time.Duration, dataBlob []byte) error
- func (cache *Cache2Go) Count() int
- func (cache *Cache2Go) Delete(key string) error
- func (cache *Cache2Go) Exists(key string) bool
- func (cache *Cache2Go) List() []string
- func (cache *Cache2Go) Purge() error
- func (cache *Cache2Go) PurgeOne(key string) error
- func (cache *Cache2Go) Value(key string) ([]byte, error)
- type DataStore
- type Diskv
- func (kvstore *Diskv) Add(key string, ttl time.Duration, dataBlob []byte) error
- func (kvstore *Diskv) Count() int
- func (kvstore *Diskv) Delete(key string) error
- func (kvstore *Diskv) Exists(key string) bool
- func (kvstore *Diskv) List() []string
- func (kvstore *Diskv) Purge() error
- func (kvstore *Diskv) PurgeOne(key string) error
- func (kvstore *Diskv) Value(key string) ([]byte, error)
- type LocalAuth
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DoryDiskvBaseDir = golenv.OverrideIfEnv("DORY_DISKV_BASE_DIR", "/tmp") DoryDiskvCacheMB = golenv.OverrideIfEnv("DORY_DISKV_CACHE_MB", "128") )
Functions ¶
This section is empty.
Types ¶
type Cache2Go ¶
type Cache2Go struct {
CacheTable *cache2go.CacheTable
}
Cache2Go is abstracted here so it can be mocked.
type DataStore ¶
type DataStore interface { Add(string, time.Duration, []byte) error Delete(string) error Exists(string) bool Value(string) ([]byte, error) List() []string Count() int Purge() error PurgeOne(string) error }
DataStore is an interface for all datastore backends that can be used. Mainly so I can write actual "unit" tests.
func NewLocalAuthStore ¶
NewLocalAuthStore instantiates and return a Cache2Go Table store.
type LocalAuth ¶
LocalAuth is a struct for Name as Auth-Path, Value with Gol Library Struct for Data/Cipher/Key nodes, TTLSecond for expiry timeout.
func (*LocalAuth) Delete ¶
Delete purges a Auth-Path in Cache2Go Table, if it's value is decipherable by given Token.
Click to show internal directories.
Click to hide internal directories.