// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "mtusi-messenger/internal/domain" "github.com/google/uuid" mock "github.com/stretchr/testify/mock" ) // NewMockRepository creates a new instance of MockRepository. 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 NewMockRepository(t interface { mock.TestingT Cleanup(func()) }) *MockRepository { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockRepository{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockRepository is an autogenerated mock type for the Repository type type MockRepository struct { mock.Mock } type MockRepository_Expecter struct { mock *mock.Mock } func (_m *MockRepository) EXPECT() *MockRepository_Expecter { return &MockRepository_Expecter{mock: &_m.Mock} } // Admission provides a mock function for the type MockRepository func (_mock *MockRepository) Admission(ctx context.Context, ownerID uuid.UUID) (int, int, int64, error) { ret := _mock.Called(ctx, ownerID) if len(ret) == 0 { panic("no return value specified for Admission") } var r0 int var r1 int var r2 int64 var r3 error if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID) (int, int, int64, error)); ok { return returnFunc(ctx, ownerID) } if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID) int); ok { r0 = returnFunc(ctx, ownerID) } else { r0 = ret.Get(0).(int) } if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID) int); ok { r1 = returnFunc(ctx, ownerID) } else { r1 = ret.Get(1).(int) } if returnFunc, ok := ret.Get(2).(func(context.Context, uuid.UUID) int64); ok { r2 = returnFunc(ctx, ownerID) } else { r2 = ret.Get(2).(int64) } if returnFunc, ok := ret.Get(3).(func(context.Context, uuid.UUID) error); ok { r3 = returnFunc(ctx, ownerID) } else { r3 = ret.Error(3) } return r0, r1, r2, r3 } // MockRepository_Admission_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Admission' type MockRepository_Admission_Call struct { *mock.Call } // Admission is a helper method to define mock.On call // - ctx context.Context // - ownerID uuid.UUID func (_e *MockRepository_Expecter) Admission(ctx any, ownerID any) *MockRepository_Admission_Call { return &MockRepository_Admission_Call{Call: _e.mock.On("Admission", ctx, ownerID)} } func (_c *MockRepository_Admission_Call) Run(run func(ctx context.Context, ownerID uuid.UUID)) *MockRepository_Admission_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 uuid.UUID if args[1] != nil { arg1 = args[1].(uuid.UUID) } run( arg0, arg1, ) }) return _c } func (_c *MockRepository_Admission_Call) Return(userPending int, totalPending int, stagedBytes int64, err error) *MockRepository_Admission_Call { _c.Call.Return(userPending, totalPending, stagedBytes, err) return _c } func (_c *MockRepository_Admission_Call) RunAndReturn(run func(ctx context.Context, ownerID uuid.UUID) (int, int, int64, error)) *MockRepository_Admission_Call { _c.Call.Return(run) return _c } // CompletePresign provides a mock function for the type MockRepository func (_mock *MockRepository) CompletePresign(ctx context.Context, ownerID uuid.UUID, attachmentID uuid.UUID, verifiedKey string, finalKey string, pipelineVersion int, maxAttempts int, jobID uuid.UUID) (domain.Attachment, error) { ret := _mock.Called(ctx, ownerID, attachmentID, verifiedKey, finalKey, pipelineVersion, maxAttempts, jobID) if len(ret) == 0 { panic("no return value specified for CompletePresign") } var r0 domain.Attachment var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID, string, string, int, int, uuid.UUID) (domain.Attachment, error)); ok { return returnFunc(ctx, ownerID, attachmentID, verifiedKey, finalKey, pipelineVersion, maxAttempts, jobID) } if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID, string, string, int, int, uuid.UUID) domain.Attachment); ok { r0 = returnFunc(ctx, ownerID, attachmentID, verifiedKey, finalKey, pipelineVersion, maxAttempts, jobID) } else { r0 = ret.Get(0).(domain.Attachment) } if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID, string, string, int, int, uuid.UUID) error); ok { r1 = returnFunc(ctx, ownerID, attachmentID, verifiedKey, finalKey, pipelineVersion, maxAttempts, jobID) } else { r1 = ret.Error(1) } return r0, r1 } // MockRepository_CompletePresign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CompletePresign' type MockRepository_CompletePresign_Call struct { *mock.Call } // CompletePresign is a helper method to define mock.On call // - ctx context.Context // - ownerID uuid.UUID // - attachmentID uuid.UUID // - verifiedKey string // - finalKey string // - pipelineVersion int // - maxAttempts int // - jobID uuid.UUID func (_e *MockRepository_Expecter) CompletePresign(ctx any, ownerID any, attachmentID any, verifiedKey any, finalKey any, pipelineVersion any, maxAttempts any, jobID any) *MockRepository_CompletePresign_Call { return &MockRepository_CompletePresign_Call{Call: _e.mock.On("CompletePresign", ctx, ownerID, attachmentID, verifiedKey, finalKey, pipelineVersion, maxAttempts, jobID)} } func (_c *MockRepository_CompletePresign_Call) Run(run func(ctx context.Context, ownerID uuid.UUID, attachmentID uuid.UUID, verifiedKey string, finalKey string, pipelineVersion int, maxAttempts int, jobID uuid.UUID)) *MockRepository_CompletePresign_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 uuid.UUID if args[1] != nil { arg1 = args[1].(uuid.UUID) } var arg2 uuid.UUID if args[2] != nil { arg2 = args[2].(uuid.UUID) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 string if args[4] != nil { arg4 = args[4].(string) } var arg5 int if args[5] != nil { arg5 = args[5].(int) } var arg6 int if args[6] != nil { arg6 = args[6].(int) } var arg7 uuid.UUID if args[7] != nil { arg7 = args[7].(uuid.UUID) } run( arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, ) }) return _c } func (_c *MockRepository_CompletePresign_Call) Return(attachment domain.Attachment, err error) *MockRepository_CompletePresign_Call { _c.Call.Return(attachment, err) return _c } func (_c *MockRepository_CompletePresign_Call) RunAndReturn(run func(ctx context.Context, ownerID uuid.UUID, attachmentID uuid.UUID, verifiedKey string, finalKey string, pipelineVersion int, maxAttempts int, jobID uuid.UUID) (domain.Attachment, error)) *MockRepository_CompletePresign_Call { _c.Call.Return(run) return _c } // CreatePresign provides a mock function for the type MockRepository func (_mock *MockRepository) CreatePresign(ctx context.Context, draft domain.AttachmentDraft) (domain.Attachment, error) { ret := _mock.Called(ctx, draft) if len(ret) == 0 { panic("no return value specified for CreatePresign") } var r0 domain.Attachment var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AttachmentDraft) (domain.Attachment, error)); ok { return returnFunc(ctx, draft) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AttachmentDraft) domain.Attachment); ok { r0 = returnFunc(ctx, draft) } else { r0 = ret.Get(0).(domain.Attachment) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.AttachmentDraft) error); ok { r1 = returnFunc(ctx, draft) } else { r1 = ret.Error(1) } return r0, r1 } // MockRepository_CreatePresign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePresign' type MockRepository_CreatePresign_Call struct { *mock.Call } // CreatePresign is a helper method to define mock.On call // - ctx context.Context // - draft domain.AttachmentDraft func (_e *MockRepository_Expecter) CreatePresign(ctx any, draft any) *MockRepository_CreatePresign_Call { return &MockRepository_CreatePresign_Call{Call: _e.mock.On("CreatePresign", ctx, draft)} } func (_c *MockRepository_CreatePresign_Call) Run(run func(ctx context.Context, draft domain.AttachmentDraft)) *MockRepository_CreatePresign_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.AttachmentDraft if args[1] != nil { arg1 = args[1].(domain.AttachmentDraft) } run( arg0, arg1, ) }) return _c } func (_c *MockRepository_CreatePresign_Call) Return(attachment domain.Attachment, err error) *MockRepository_CreatePresign_Call { _c.Call.Return(attachment, err) return _c } func (_c *MockRepository_CreatePresign_Call) RunAndReturn(run func(ctx context.Context, draft domain.AttachmentDraft) (domain.Attachment, error)) *MockRepository_CreatePresign_Call { _c.Call.Return(run) return _c } // CreateQueued provides a mock function for the type MockRepository func (_mock *MockRepository) CreateQueued(ctx context.Context, draft domain.AttachmentDraft, job domain.Job) (domain.Attachment, error) { ret := _mock.Called(ctx, draft, job) if len(ret) == 0 { panic("no return value specified for CreateQueued") } var r0 domain.Attachment var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AttachmentDraft, domain.Job) (domain.Attachment, error)); ok { return returnFunc(ctx, draft, job) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AttachmentDraft, domain.Job) domain.Attachment); ok { r0 = returnFunc(ctx, draft, job) } else { r0 = ret.Get(0).(domain.Attachment) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.AttachmentDraft, domain.Job) error); ok { r1 = returnFunc(ctx, draft, job) } else { r1 = ret.Error(1) } return r0, r1 } // MockRepository_CreateQueued_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateQueued' type MockRepository_CreateQueued_Call struct { *mock.Call } // CreateQueued is a helper method to define mock.On call // - ctx context.Context // - draft domain.AttachmentDraft // - job domain.Job func (_e *MockRepository_Expecter) CreateQueued(ctx any, draft any, job any) *MockRepository_CreateQueued_Call { return &MockRepository_CreateQueued_Call{Call: _e.mock.On("CreateQueued", ctx, draft, job)} } func (_c *MockRepository_CreateQueued_Call) Run(run func(ctx context.Context, draft domain.AttachmentDraft, job domain.Job)) *MockRepository_CreateQueued_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.AttachmentDraft if args[1] != nil { arg1 = args[1].(domain.AttachmentDraft) } var arg2 domain.Job if args[2] != nil { arg2 = args[2].(domain.Job) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockRepository_CreateQueued_Call) Return(attachment domain.Attachment, err error) *MockRepository_CreateQueued_Call { _c.Call.Return(attachment, err) return _c } func (_c *MockRepository_CreateQueued_Call) RunAndReturn(run func(ctx context.Context, draft domain.AttachmentDraft, job domain.Job) (domain.Attachment, error)) *MockRepository_CreateQueued_Call { _c.Call.Return(run) return _c } // DeletePending provides a mock function for the type MockRepository func (_mock *MockRepository) DeletePending(ctx context.Context, id uuid.UUID) error { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for DeletePending") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID) error); ok { r0 = returnFunc(ctx, id) } else { r0 = ret.Error(0) } return r0 } // MockRepository_DeletePending_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePending' type MockRepository_DeletePending_Call struct { *mock.Call } // DeletePending is a helper method to define mock.On call // - ctx context.Context // - id uuid.UUID func (_e *MockRepository_Expecter) DeletePending(ctx any, id any) *MockRepository_DeletePending_Call { return &MockRepository_DeletePending_Call{Call: _e.mock.On("DeletePending", ctx, id)} } func (_c *MockRepository_DeletePending_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockRepository_DeletePending_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 uuid.UUID if args[1] != nil { arg1 = args[1].(uuid.UUID) } run( arg0, arg1, ) }) return _c } func (_c *MockRepository_DeletePending_Call) Return(err error) *MockRepository_DeletePending_Call { _c.Call.Return(err) return _c } func (_c *MockRepository_DeletePending_Call) RunAndReturn(run func(ctx context.Context, id uuid.UUID) error) *MockRepository_DeletePending_Call { _c.Call.Return(run) return _c } // GetForMember provides a mock function for the type MockRepository func (_mock *MockRepository) GetForMember(ctx context.Context, userID uuid.UUID, id uuid.UUID) (domain.Attachment, error) { ret := _mock.Called(ctx, userID, id) if len(ret) == 0 { panic("no return value specified for GetForMember") } var r0 domain.Attachment var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (domain.Attachment, error)); ok { return returnFunc(ctx, userID, id) } if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) domain.Attachment); ok { r0 = returnFunc(ctx, userID, id) } else { r0 = ret.Get(0).(domain.Attachment) } if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { r1 = returnFunc(ctx, userID, id) } else { r1 = ret.Error(1) } return r0, r1 } // MockRepository_GetForMember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetForMember' type MockRepository_GetForMember_Call struct { *mock.Call } // GetForMember is a helper method to define mock.On call // - ctx context.Context // - userID uuid.UUID // - id uuid.UUID func (_e *MockRepository_Expecter) GetForMember(ctx any, userID any, id any) *MockRepository_GetForMember_Call { return &MockRepository_GetForMember_Call{Call: _e.mock.On("GetForMember", ctx, userID, id)} } func (_c *MockRepository_GetForMember_Call) Run(run func(ctx context.Context, userID uuid.UUID, id uuid.UUID)) *MockRepository_GetForMember_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 uuid.UUID if args[1] != nil { arg1 = args[1].(uuid.UUID) } var arg2 uuid.UUID if args[2] != nil { arg2 = args[2].(uuid.UUID) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockRepository_GetForMember_Call) Return(attachment domain.Attachment, err error) *MockRepository_GetForMember_Call { _c.Call.Return(attachment, err) return _c } func (_c *MockRepository_GetForMember_Call) RunAndReturn(run func(ctx context.Context, userID uuid.UUID, id uuid.UUID) (domain.Attachment, error)) *MockRepository_GetForMember_Call { _c.Call.Return(run) return _c } // GetForOwner provides a mock function for the type MockRepository func (_mock *MockRepository) GetForOwner(ctx context.Context, ownerID uuid.UUID, id uuid.UUID) (domain.Attachment, error) { ret := _mock.Called(ctx, ownerID, id) if len(ret) == 0 { panic("no return value specified for GetForOwner") } var r0 domain.Attachment var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (domain.Attachment, error)); ok { return returnFunc(ctx, ownerID, id) } if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) domain.Attachment); ok { r0 = returnFunc(ctx, ownerID, id) } else { r0 = ret.Get(0).(domain.Attachment) } if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { r1 = returnFunc(ctx, ownerID, id) } else { r1 = ret.Error(1) } return r0, r1 } // MockRepository_GetForOwner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetForOwner' type MockRepository_GetForOwner_Call struct { *mock.Call } // GetForOwner is a helper method to define mock.On call // - ctx context.Context // - ownerID uuid.UUID // - id uuid.UUID func (_e *MockRepository_Expecter) GetForOwner(ctx any, ownerID any, id any) *MockRepository_GetForOwner_Call { return &MockRepository_GetForOwner_Call{Call: _e.mock.On("GetForOwner", ctx, ownerID, id)} } func (_c *MockRepository_GetForOwner_Call) Run(run func(ctx context.Context, ownerID uuid.UUID, id uuid.UUID)) *MockRepository_GetForOwner_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 uuid.UUID if args[1] != nil { arg1 = args[1].(uuid.UUID) } var arg2 uuid.UUID if args[2] != nil { arg2 = args[2].(uuid.UUID) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockRepository_GetForOwner_Call) Return(attachment domain.Attachment, err error) *MockRepository_GetForOwner_Call { _c.Call.Return(attachment, err) return _c } func (_c *MockRepository_GetForOwner_Call) RunAndReturn(run func(ctx context.Context, ownerID uuid.UUID, id uuid.UUID) (domain.Attachment, error)) *MockRepository_GetForOwner_Call { _c.Call.Return(run) return _c } // GetVariant provides a mock function for the type MockRepository func (_mock *MockRepository) GetVariant(ctx context.Context, attachmentID uuid.UUID, pipelineVersion int, name domain.VariantName) (domain.Variant, error) { ret := _mock.Called(ctx, attachmentID, pipelineVersion, name) if len(ret) == 0 { panic("no return value specified for GetVariant") } var r0 domain.Variant var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, int, domain.VariantName) (domain.Variant, error)); ok { return returnFunc(ctx, attachmentID, pipelineVersion, name) } if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, int, domain.VariantName) domain.Variant); ok { r0 = returnFunc(ctx, attachmentID, pipelineVersion, name) } else { r0 = ret.Get(0).(domain.Variant) } if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, int, domain.VariantName) error); ok { r1 = returnFunc(ctx, attachmentID, pipelineVersion, name) } else { r1 = ret.Error(1) } return r0, r1 } // MockRepository_GetVariant_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVariant' type MockRepository_GetVariant_Call struct { *mock.Call } // GetVariant is a helper method to define mock.On call // - ctx context.Context // - attachmentID uuid.UUID // - pipelineVersion int // - name domain.VariantName func (_e *MockRepository_Expecter) GetVariant(ctx any, attachmentID any, pipelineVersion any, name any) *MockRepository_GetVariant_Call { return &MockRepository_GetVariant_Call{Call: _e.mock.On("GetVariant", ctx, attachmentID, pipelineVersion, name)} } func (_c *MockRepository_GetVariant_Call) Run(run func(ctx context.Context, attachmentID uuid.UUID, pipelineVersion int, name domain.VariantName)) *MockRepository_GetVariant_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 uuid.UUID if args[1] != nil { arg1 = args[1].(uuid.UUID) } var arg2 int if args[2] != nil { arg2 = args[2].(int) } var arg3 domain.VariantName if args[3] != nil { arg3 = args[3].(domain.VariantName) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *MockRepository_GetVariant_Call) Return(variant domain.Variant, err error) *MockRepository_GetVariant_Call { _c.Call.Return(variant, err) return _c } func (_c *MockRepository_GetVariant_Call) RunAndReturn(run func(ctx context.Context, attachmentID uuid.UUID, pipelineVersion int, name domain.VariantName) (domain.Variant, error)) *MockRepository_GetVariant_Call { _c.Call.Return(run) return _c } // IsChatMember provides a mock function for the type MockRepository func (_mock *MockRepository) IsChatMember(ctx context.Context, chatID uuid.UUID, userID uuid.UUID) (bool, error) { ret := _mock.Called(ctx, chatID, userID) if len(ret) == 0 { panic("no return value specified for IsChatMember") } var r0 bool var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (bool, error)); ok { return returnFunc(ctx, chatID, userID) } if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) bool); ok { r0 = returnFunc(ctx, chatID, userID) } else { r0 = ret.Get(0).(bool) } if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { r1 = returnFunc(ctx, chatID, userID) } else { r1 = ret.Error(1) } return r0, r1 } // MockRepository_IsChatMember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsChatMember' type MockRepository_IsChatMember_Call struct { *mock.Call } // IsChatMember is a helper method to define mock.On call // - ctx context.Context // - chatID uuid.UUID // - userID uuid.UUID func (_e *MockRepository_Expecter) IsChatMember(ctx any, chatID any, userID any) *MockRepository_IsChatMember_Call { return &MockRepository_IsChatMember_Call{Call: _e.mock.On("IsChatMember", ctx, chatID, userID)} } func (_c *MockRepository_IsChatMember_Call) Run(run func(ctx context.Context, chatID uuid.UUID, userID uuid.UUID)) *MockRepository_IsChatMember_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 uuid.UUID if args[1] != nil { arg1 = args[1].(uuid.UUID) } var arg2 uuid.UUID if args[2] != nil { arg2 = args[2].(uuid.UUID) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockRepository_IsChatMember_Call) Return(b bool, err error) *MockRepository_IsChatMember_Call { _c.Call.Return(b, err) return _c } func (_c *MockRepository_IsChatMember_Call) RunAndReturn(run func(ctx context.Context, chatID uuid.UUID, userID uuid.UUID) (bool, error)) *MockRepository_IsChatMember_Call { _c.Call.Return(run) return _c } // ListVariants provides a mock function for the type MockRepository func (_mock *MockRepository) ListVariants(ctx context.Context, attachmentID uuid.UUID, pipelineVersion int) ([]domain.Variant, error) { ret := _mock.Called(ctx, attachmentID, pipelineVersion) if len(ret) == 0 { panic("no return value specified for ListVariants") } var r0 []domain.Variant var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, int) ([]domain.Variant, error)); ok { return returnFunc(ctx, attachmentID, pipelineVersion) } if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, int) []domain.Variant); ok { r0 = returnFunc(ctx, attachmentID, pipelineVersion) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.Variant) } } if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, int) error); ok { r1 = returnFunc(ctx, attachmentID, pipelineVersion) } else { r1 = ret.Error(1) } return r0, r1 } // MockRepository_ListVariants_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVariants' type MockRepository_ListVariants_Call struct { *mock.Call } // ListVariants is a helper method to define mock.On call // - ctx context.Context // - attachmentID uuid.UUID // - pipelineVersion int func (_e *MockRepository_Expecter) ListVariants(ctx any, attachmentID any, pipelineVersion any) *MockRepository_ListVariants_Call { return &MockRepository_ListVariants_Call{Call: _e.mock.On("ListVariants", ctx, attachmentID, pipelineVersion)} } func (_c *MockRepository_ListVariants_Call) Run(run func(ctx context.Context, attachmentID uuid.UUID, pipelineVersion int)) *MockRepository_ListVariants_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 uuid.UUID if args[1] != nil { arg1 = args[1].(uuid.UUID) } var arg2 int if args[2] != nil { arg2 = args[2].(int) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockRepository_ListVariants_Call) Return(variants []domain.Variant, err error) *MockRepository_ListVariants_Call { _c.Call.Return(variants, err) return _c } func (_c *MockRepository_ListVariants_Call) RunAndReturn(run func(ctx context.Context, attachmentID uuid.UUID, pipelineVersion int) ([]domain.Variant, error)) *MockRepository_ListVariants_Call { _c.Call.Return(run) return _c }