Initial cloud-services repo - gateway service + pkg modules
This commit is contained in:
28
pkg/redis/redisutils/cache_set_mock.go
Normal file
28
pkg/redis/redisutils/cache_set_mock.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package redisutils
|
||||
|
||||
import (
|
||||
"fiskerinc.com/modules/redis"
|
||||
"time"
|
||||
)
|
||||
|
||||
type GetCachedSetMock func(key string) (map[string]struct{}, error)
|
||||
|
||||
type CacheSetMock struct {
|
||||
GetCachedSetMock func(key string) (map[string]struct{}, error)
|
||||
UpdateSetCacheMock func(key string, cacheValues []interface{}) error
|
||||
CreateSetCacheMock func(key string, cacheValues []interface{}, expireTime time.Time) error
|
||||
}
|
||||
|
||||
func (c CacheSetMock) SetConnection(client redis.Client) {}
|
||||
|
||||
func (c CacheSetMock) GetCachedSet(key string) (map[string]struct{}, error) {
|
||||
return c.GetCachedSetMock(key)
|
||||
}
|
||||
|
||||
func (c CacheSetMock) UpdateSetCache(key string, cacheValues []interface{}) error {
|
||||
return c.UpdateSetCacheMock(key, cacheValues)
|
||||
}
|
||||
|
||||
func (c CacheSetMock) CreateSetCache(key string, cacheValues []interface{}, expireTime time.Time) error {
|
||||
return c.CreateSetCacheMock(key, cacheValues, expireTime)
|
||||
}
|
||||
Reference in New Issue
Block a user