Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCacheNotSameType = errors.New("cached item have is not same type as expected result")
Functions ¶
This section is empty.
Types ¶
type GenericCache ¶
type Mem ¶
type Mem struct {
// contains filtered or unexported fields
}
Mem store data in memory, will be used to cache user group permission rule.
func NewMemoryCache ¶
func NewMemoryCache() *Mem
type MockGenericCache ¶
MockGenericCache is an autogenerated mock type for the GenericCache type
func (*MockGenericCache) EXPECT ¶
func (_m *MockGenericCache) EXPECT() *MockGenericCache_Expecter
type MockGenericCache_Expecter ¶
type MockGenericCache_Expecter struct {
// contains filtered or unexported fields
}
func (*MockGenericCache_Expecter) Get ¶
func (_e *MockGenericCache_Expecter) Get(ctx interface{}, key interface{}, value interface{}) *MockGenericCache_Get_Call
Get is a helper method to define mock.On call
- ctx context.Context
- key string
- value interface{}
func (*MockGenericCache_Expecter) Set ¶
func (_e *MockGenericCache_Expecter) Set(ctx interface{}, key interface{}, value interface{}, ttl interface{}) *MockGenericCache_Set_Call
Set is a helper method to define mock.On call
- ctx context.Context
- key string
- value interface{}
- ttl time.Duration
type MockGenericCache_Get_Call ¶
MockGenericCache_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
func (*MockGenericCache_Get_Call) Return ¶
func (_c *MockGenericCache_Get_Call) Return(_a0 bool, _a1 error) *MockGenericCache_Get_Call
func (*MockGenericCache_Get_Call) Run ¶
func (_c *MockGenericCache_Get_Call) Run(run func(ctx context.Context, key string, value interface{})) *MockGenericCache_Get_Call
type MockGenericCache_Set_Call ¶
MockGenericCache_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'
func (*MockGenericCache_Set_Call) Return ¶
func (_c *MockGenericCache_Set_Call) Return(_a0 error) *MockGenericCache_Set_Call
func (*MockGenericCache_Set_Call) Run ¶
func (_c *MockGenericCache_Set_Call) Run(run func(ctx context.Context, key string, value interface{}, ttl time.Duration)) *MockGenericCache_Set_Call
Click to show internal directories.
Click to hide internal directories.