Files
cloud-services/pkg/redis/redisutils/cache_set_mock.go

29 lines
891 B
Go

package redisutils
import (
"github.com/fiskerinc/cloud-services/pkg/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)
}