Documentation ¶
Overview ¶
Package cache is a generated GoMock package.
Package cache is a generated GoMock package.
Index ¶
Constants ¶
const (
GobName = "ocm-cache.gob"
)
const (
VersionCacheKey = "Versions"
)
Variables ¶
var DefaultCacheExpiration = time.Now().Add(30 * time.Minute)
Functions ¶
func ConvertToStringSlice ¶
Types ¶
type MockRosaCache ¶
type MockRosaCache struct {
// contains filtered or unexported fields
}
MockRosaCache is a mock of RosaCache interface.
func NewMockRosaCache ¶
func NewMockRosaCache(ctrl *gomock.Controller) *MockRosaCache
NewMockRosaCache creates a new mock instance.
func (*MockRosaCache) EXPECT ¶
func (m *MockRosaCache) EXPECT() *MockRosaCacheMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRosaCache) Get ¶
func (m *MockRosaCache) Get(k string) (any, bool)
Get mocks base method.
func (*MockRosaCache) Items ¶
func (m *MockRosaCache) Items() map[string]Item
Items mocks base method.
type MockRosaCacheMockRecorder ¶
type MockRosaCacheMockRecorder struct {
// contains filtered or unexported fields
}
MockRosaCacheMockRecorder is the mock recorder for MockRosaCache.
func (*MockRosaCacheMockRecorder) Dir ¶
func (mr *MockRosaCacheMockRecorder) Dir() *gomock.Call
Dir indicates an expected call of Dir.
func (*MockRosaCacheMockRecorder) Get ¶
func (mr *MockRosaCacheMockRecorder) Get(k any) *gomock.Call
Get indicates an expected call of Get.
func (*MockRosaCacheMockRecorder) Items ¶
func (mr *MockRosaCacheMockRecorder) Items() *gomock.Call
Items indicates an expected call of Items.
type MockRosaCacheService ¶
type MockRosaCacheService struct {
// contains filtered or unexported fields
}
MockRosaCacheService is a mock of RosaCacheService interface.
func NewMockRosaCacheService ¶
func NewMockRosaCacheService(ctrl *gomock.Controller) *MockRosaCacheService
NewMockRosaCacheService creates a new mock instance.
func (*MockRosaCacheService) EXPECT ¶
func (m *MockRosaCacheService) EXPECT() *MockRosaCacheServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRosaCacheService) Get ¶
func (m *MockRosaCacheService) Get(key string) (any, bool)
Get mocks base method.
func (*MockRosaCacheService) LoadCache ¶
func (m *MockRosaCacheService) LoadCache() (RosaCache, error)
LoadCache mocks base method.
type MockRosaCacheServiceMockRecorder ¶
type MockRosaCacheServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockRosaCacheServiceMockRecorder is the mock recorder for MockRosaCacheService.
func (*MockRosaCacheServiceMockRecorder) Get ¶
func (mr *MockRosaCacheServiceMockRecorder) Get(key any) *gomock.Call
Get indicates an expected call of Get.
func (*MockRosaCacheServiceMockRecorder) LoadCache ¶
func (mr *MockRosaCacheServiceMockRecorder) LoadCache() *gomock.Call
LoadCache indicates an expected call of LoadCache.
type RosaCache ¶
type RosaCache interface { Set(k string, x interface{}, d time.Time) Get(k string) (interface{}, bool) Items() map[string]Item Dir() (string, error) }
func NewRosaCache ¶
func NewRosaCache(spec RosaCacheSpec) RosaCache
type RosaCacheData ¶
type RosaCacheService ¶
type RosaCacheService interface { LoadCache() (RosaCache, error) Get(key string) (interface{}, bool) Set(key string, value []string) error }
func NewRosaCacheService ¶
func NewRosaCacheService() (RosaCacheService, error)