Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface {
Get(key string) interface{}
Lookup(key string) (interface{}, bool)
Set(key string, value interface{}) bool
SetNX(key string, value interface{}, expire time.Duration) bool
}
Cache 缓存
type CacheMock ¶ added in v0.5.0
type CacheMock struct {
GetFunc func(key string) interface{}
LookupFunc func(key string) (interface{}, bool)
SetFunc func(key string, value interface{}) bool
SetNXFunc func(key string, value interface{}, expire time.Duration) bool
}
type CacheMockMock ¶ added in v0.5.0
type CacheMockMock struct {
GetFunc func(key string) interface{}
LookupFunc func(key string) (interface{}, bool)
SetFunc func(key string, value interface{}) bool
SetNXFunc func(key string, value interface{}, expire time.Duration) bool
}
func (*CacheMockMock) Get ¶ added in v0.5.0
func (mockRecv *CacheMockMock) Get(key string) interface{}
func (*CacheMockMock) Lookup ¶ added in v0.5.0
func (mockRecv *CacheMockMock) Lookup(key string) (interface{}, bool)
func (*CacheMockMock) Set ¶ added in v0.5.0
func (mockRecv *CacheMockMock) Set(key string, value interface{}) bool
type ICacheMock ¶ added in v0.5.0
type ImemImplMock ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.