// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" mock "github.com/stretchr/testify/mock" ) // NewIssueKeyStore creates a new instance of IssueKeyStore. 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 NewIssueKeyStore(t interface { mock.TestingT Cleanup(func()) }) *IssueKeyStore { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &IssueKeyStore{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // IssueKeyStore is an autogenerated mock type for the IssueKeyStore type type IssueKeyStore struct { mock.Mock } type IssueKeyStore_Expecter struct { mock *mock.Mock } func (_m *IssueKeyStore) EXPECT() *IssueKeyStore_Expecter { return &IssueKeyStore_Expecter{mock: &_m.Mock} } // Key provides a mock function for the type IssueKeyStore func (_mock *IssueKeyStore) 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 } // IssueKeyStore_Key_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Key' type IssueKeyStore_Key_Call struct { *mock.Call } // Key is a helper method to define mock.On call // - ctx context.Context func (_e *IssueKeyStore_Expecter) Key(ctx any) *IssueKeyStore_Key_Call { return &IssueKeyStore_Key_Call{Call: _e.mock.On("Key", ctx)} } func (_c *IssueKeyStore_Key_Call) Run(run func(ctx context.Context)) *IssueKeyStore_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 *IssueKeyStore_Key_Call) Return(bytes []byte, err error) *IssueKeyStore_Key_Call { _c.Call.Return(bytes, err) return _c } func (_c *IssueKeyStore_Key_Call) RunAndReturn(run func(ctx context.Context) ([]byte, error)) *IssueKeyStore_Key_Call { _c.Call.Return(run) return _c }