Documentation
¶
Index ¶
- Variables
- func Fetch(value interface{}, err error) func() (interface{}, error)
- func FetchPanic() (interface{}, error)
- func GetCacheError(get func(key string, result interface{}) (bool, error), key string)
- func GetCacheHit(get func(key string, result interface{}) (bool, error), key string, ...)
- func GetCacheMiss(get func(key string, result interface{}) (bool, error), key string)
- func GetOrSetCached(...)
- func GetOrSetError(...)
- func GetOrSetFetch(...)
- type FakeCache
- func (c *FakeCache) DeleteKey(key string) bool
- func (c *FakeCache) ExpireKey(key string) bool
- func (c *FakeCache) FailGetFor(key string, err error)
- func (c *FakeCache) FailGetOrSetFor(key string, err error)
- func (c *FakeCache) FailGetStaleFor(key string, err error)
- func (c *FakeCache) FailSetFor(key string, err error)
- func (c *FakeCache) Get(key string, result interface{}) (hit bool, err error)
- func (c *FakeCache) GetMustHaveBeenCalledWith(key string, times int) error
- func (c *FakeCache) GetMustNotHaveBeenCalledWith(key string) error
- func (c *FakeCache) GetOrSet(key string, result interface{}, duration time.Duration, ...) error
- func (c *FakeCache) GetOrSetMustHaveBeenCalledWith(key string, times int, duration interface{}) error
- func (c *FakeCache) GetOrSetMustNotHaveBeenCalledWith(key string, duration interface{}) error
- func (c *FakeCache) GetStale(key string, result interface{}) (hit bool, err error)
- func (c *FakeCache) GetStaleMustHaveBeenCalledWith(key string, times int) error
- func (c *FakeCache) GetStaleMustNotHaveBeenCalledWith(key string) error
- func (c *FakeCache) Populate(key string, value interface{}, duration time.Duration) error
- func (c *FakeCache) Reset() *FakeCache
- func (c *FakeCache) Set(key string, value interface{}, duration time.Duration) error
- func (c *FakeCache) SetMustHaveBeenCalledWith(key string, value interface{}, duration interface{}) error
- func (c *FakeCache) SetMustNotHaveBeenCalledWith(key string, value interface{}, duration interface{}) error
- type Matcher
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Any anyMatcher = "any"
)
Functions ¶
func FetchPanic ¶
func FetchPanic() (interface{}, error)
FetchPanic returns a function that should not be called to be passed to GetOrSet.
func GetCacheError ¶
func GetCacheHit ¶
func GetCacheMiss ¶
func GetOrSetCached ¶
func GetOrSetError ¶
Types ¶
type FakeCache ¶
type FakeCache struct {
// contains filtered or unexported fields
}
func NewFakeCache ¶
func NewFakeCache() *FakeCache
func (*FakeCache) FailGetFor ¶
func (*FakeCache) FailGetOrSetFor ¶
func (*FakeCache) FailGetStaleFor ¶
func (*FakeCache) FailSetFor ¶
func (*FakeCache) GetMustHaveBeenCalledWith ¶
func (*FakeCache) GetMustNotHaveBeenCalledWith ¶
func (*FakeCache) GetOrSetMustHaveBeenCalledWith ¶
func (*FakeCache) GetOrSetMustNotHaveBeenCalledWith ¶
func (*FakeCache) GetStaleMustHaveBeenCalledWith ¶
func (*FakeCache) GetStaleMustNotHaveBeenCalledWith ¶
func (*FakeCache) SetMustHaveBeenCalledWith ¶
func (*FakeCache) SetMustNotHaveBeenCalledWith ¶
Click to show internal directories.
Click to hide internal directories.