| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| |
| mock "github.com/stretchr/testify/mock" |
| ) |
| |
| // Cache is an autogenerated mock type for the Cache type |
| type Cache struct { |
| mock.Mock |
| } |
| |
| // Add provides a mock function with given fields: key |
| func (_m *Cache) Add(key string) { |
| _m.Called(key) |
| } |
| |
| // Exists provides a mock function with given fields: key |
| func (_m *Cache) Exists(key string) bool { |
| ret := _m.Called(key) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Exists") |
| } |
| |
| var r0 bool |
| if rf, ok := ret.Get(0).(func(string) bool); ok { |
| r0 = rf(key) |
| } else { |
| r0 = ret.Get(0).(bool) |
| } |
| |
| return r0 |
| } |
| |
| // GetValue provides a mock function with given fields: ctx, key |
| func (_m *Cache) GetValue(ctx context.Context, key string) (string, error) { |
| ret := _m.Called(ctx, key) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetValue") |
| } |
| |
| var r0 string |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { |
| return rf(ctx, key) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, string) string); ok { |
| r0 = rf(ctx, key) |
| } else { |
| r0 = ret.Get(0).(string) |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { |
| r1 = rf(ctx, key) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // SetValue provides a mock function with given fields: ctx, key, value |
| func (_m *Cache) SetValue(ctx context.Context, key string, value string) error { |
| ret := _m.Called(ctx, key, value) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for SetValue") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { |
| r0 = rf(ctx, key, value) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // NewCache creates a new instance of Cache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. |
| // The first argument is typically a *testing.T value. |
| func NewCache(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *Cache { |
| mock := &Cache{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |