| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| |
| mock "github.com/stretchr/testify/mock" |
| ) |
| |
| // Throttle is an autogenerated mock type for the Throttle type |
| type Throttle struct { |
| mock.Mock |
| } |
| |
| // Get provides a mock function with given fields: ctx, roller |
| func (_m *Throttle) Get(ctx context.Context, roller string) (bool, error) { |
| ret := _m.Called(ctx, roller) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Get") |
| } |
| |
| var r0 bool |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { |
| return rf(ctx, roller) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok { |
| r0 = rf(ctx, roller) |
| } else { |
| r0 = ret.Get(0).(bool) |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { |
| r1 = rf(ctx, roller) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // Reset provides a mock function with given fields: ctx, roller |
| func (_m *Throttle) Reset(ctx context.Context, roller string) error { |
| ret := _m.Called(ctx, roller) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Reset") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { |
| r0 = rf(ctx, roller) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // Unthrottle provides a mock function with given fields: ctx, roller |
| func (_m *Throttle) Unthrottle(ctx context.Context, roller string) error { |
| ret := _m.Called(ctx, roller) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Unthrottle") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { |
| r0 = rf(ctx, roller) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // NewThrottle creates a new instance of Throttle. 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 NewThrottle(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *Throttle { |
| mock := &Throttle{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |