// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" mock "github.com/stretchr/testify/mock" ) // NewSessionStore creates a new instance of SessionStore. 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 NewSessionStore(t interface { mock.TestingT Cleanup(func()) }) *SessionStore { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &SessionStore{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // SessionStore is an autogenerated mock type for the SessionStore type type SessionStore struct { mock.Mock } type SessionStore_Expecter struct { mock *mock.Mock } func (_m *SessionStore) EXPECT() *SessionStore_Expecter { return &SessionStore_Expecter{mock: &_m.Mock} } // BumpEpoch provides a mock function for the type SessionStore func (_mock *SessionStore) BumpEpoch(ctx context.Context) (uint64, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for BumpEpoch") } var r0 uint64 var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) (uint64, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) uint64); ok { r0 = returnFunc(ctx) } else { r0 = ret.Get(0).(uint64) } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // SessionStore_BumpEpoch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BumpEpoch' type SessionStore_BumpEpoch_Call struct { *mock.Call } // BumpEpoch is a helper method to define mock.On call // - ctx context.Context func (_e *SessionStore_Expecter) BumpEpoch(ctx any) *SessionStore_BumpEpoch_Call { return &SessionStore_BumpEpoch_Call{Call: _e.mock.On("BumpEpoch", ctx)} } func (_c *SessionStore_BumpEpoch_Call) Run(run func(ctx context.Context)) *SessionStore_BumpEpoch_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *SessionStore_BumpEpoch_Call) Return(v uint64, err error) *SessionStore_BumpEpoch_Call { _c.Call.Return(v, err) return _c } func (_c *SessionStore_BumpEpoch_Call) RunAndReturn(run func(ctx context.Context) (uint64, error)) *SessionStore_BumpEpoch_Call { _c.Call.Return(run) return _c } // Epoch provides a mock function for the type SessionStore func (_mock *SessionStore) Epoch(ctx context.Context) (uint64, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for Epoch") } var r0 uint64 var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) (uint64, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) uint64); ok { r0 = returnFunc(ctx) } else { r0 = ret.Get(0).(uint64) } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // SessionStore_Epoch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Epoch' type SessionStore_Epoch_Call struct { *mock.Call } // Epoch is a helper method to define mock.On call // - ctx context.Context func (_e *SessionStore_Expecter) Epoch(ctx any) *SessionStore_Epoch_Call { return &SessionStore_Epoch_Call{Call: _e.mock.On("Epoch", ctx)} } func (_c *SessionStore_Epoch_Call) Run(run func(ctx context.Context)) *SessionStore_Epoch_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *SessionStore_Epoch_Call) Return(v uint64, err error) *SessionStore_Epoch_Call { _c.Call.Return(v, err) return _c } func (_c *SessionStore_Epoch_Call) RunAndReturn(run func(ctx context.Context) (uint64, error)) *SessionStore_Epoch_Call { _c.Call.Return(run) return _c } // Key provides a mock function for the type SessionStore func (_mock *SessionStore) Key(ctx context.Context) ([]byte, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for Key") } var r0 []byte var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]byte, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []byte); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // SessionStore_Key_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Key' type SessionStore_Key_Call struct { *mock.Call } // Key is a helper method to define mock.On call // - ctx context.Context func (_e *SessionStore_Expecter) Key(ctx any) *SessionStore_Key_Call { return &SessionStore_Key_Call{Call: _e.mock.On("Key", ctx)} } func (_c *SessionStore_Key_Call) Run(run func(ctx context.Context)) *SessionStore_Key_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *SessionStore_Key_Call) Return(bytes []byte, err error) *SessionStore_Key_Call { _c.Call.Return(bytes, err) return _c } func (_c *SessionStore_Key_Call) RunAndReturn(run func(ctx context.Context) ([]byte, error)) *SessionStore_Key_Call { _c.Call.Return(run) return _c }