// Code generated by MockGen. DO NOT EDIT.
// Source: storage.go
//
// Generated by this command:
//
//	mockgen -source=storage.go -package=mock -destination=./mock/storage.go
//

// Package mock is a generated GoMock package.
package mock

import (
	context "context"
	reflect "reflect"

	gomock "go.uber.org/mock/gomock"

	domain "github.com/bucketeer-io/bucketeer/v2/pkg/coderef/domain"
	mysql "github.com/bucketeer-io/bucketeer/v2/pkg/storage/v2/mysql"
)

// MockCodeReferenceStorage is a mock of CodeReferenceStorage interface.
type MockCodeReferenceStorage struct {
	ctrl     *gomock.Controller
	recorder *MockCodeReferenceStorageMockRecorder
}

// MockCodeReferenceStorageMockRecorder is the mock recorder for MockCodeReferenceStorage.
type MockCodeReferenceStorageMockRecorder struct {
	mock *MockCodeReferenceStorage
}

// NewMockCodeReferenceStorage creates a new mock instance.
func NewMockCodeReferenceStorage(ctrl *gomock.Controller) *MockCodeReferenceStorage {
	mock := &MockCodeReferenceStorage{ctrl: ctrl}
	mock.recorder = &MockCodeReferenceStorageMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCodeReferenceStorage) EXPECT() *MockCodeReferenceStorageMockRecorder {
	return m.recorder
}

// CreateCodeReference mocks base method.
func (m *MockCodeReferenceStorage) CreateCodeReference(ctx context.Context, codeRef *domain.CodeReference) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CreateCodeReference", ctx, codeRef)
	ret0, _ := ret[0].(error)
	return ret0
}

// CreateCodeReference indicates an expected call of CreateCodeReference.
func (mr *MockCodeReferenceStorageMockRecorder) CreateCodeReference(ctx, codeRef any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCodeReference", reflect.TypeOf((*MockCodeReferenceStorage)(nil).CreateCodeReference), ctx, codeRef)
}

// DeleteCodeReference mocks base method.
func (m *MockCodeReferenceStorage) DeleteCodeReference(ctx context.Context, id string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "DeleteCodeReference", ctx, id)
	ret0, _ := ret[0].(error)
	return ret0
}

// DeleteCodeReference indicates an expected call of DeleteCodeReference.
func (mr *MockCodeReferenceStorageMockRecorder) DeleteCodeReference(ctx, id any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCodeReference", reflect.TypeOf((*MockCodeReferenceStorage)(nil).DeleteCodeReference), ctx, id)
}

// GetCodeReference mocks base method.
func (m *MockCodeReferenceStorage) GetCodeReference(ctx context.Context, id string) (*domain.CodeReference, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetCodeReference", ctx, id)
	ret0, _ := ret[0].(*domain.CodeReference)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetCodeReference indicates an expected call of GetCodeReference.
func (mr *MockCodeReferenceStorageMockRecorder) GetCodeReference(ctx, id any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCodeReference", reflect.TypeOf((*MockCodeReferenceStorage)(nil).GetCodeReference), ctx, id)
}

// ListCodeReferences mocks base method.
func (m *MockCodeReferenceStorage) ListCodeReferences(ctx context.Context, whereParts []mysql.WherePart, orders []*mysql.Order, limit, offset int) ([]*domain.CodeReference, int, int64, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ListCodeReferences", ctx, whereParts, orders, limit, offset)
	ret0, _ := ret[0].([]*domain.CodeReference)
	ret1, _ := ret[1].(int)
	ret2, _ := ret[2].(int64)
	ret3, _ := ret[3].(error)
	return ret0, ret1, ret2, ret3
}

// ListCodeReferences indicates an expected call of ListCodeReferences.
func (mr *MockCodeReferenceStorageMockRecorder) ListCodeReferences(ctx, whereParts, orders, limit, offset any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCodeReferences", reflect.TypeOf((*MockCodeReferenceStorage)(nil).ListCodeReferences), ctx, whereParts, orders, limit, offset)
}

// RunInTransaction mocks base method.
func (m *MockCodeReferenceStorage) RunInTransaction(ctx context.Context, f func() error) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RunInTransaction", ctx, f)
	ret0, _ := ret[0].(error)
	return ret0
}

// RunInTransaction indicates an expected call of RunInTransaction.
func (mr *MockCodeReferenceStorageMockRecorder) RunInTransaction(ctx, f any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunInTransaction", reflect.TypeOf((*MockCodeReferenceStorage)(nil).RunInTransaction), ctx, f)
}

// UpdateCodeReference mocks base method.
func (m *MockCodeReferenceStorage) UpdateCodeReference(ctx context.Context, codeRef *domain.CodeReference) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UpdateCodeReference", ctx, codeRef)
	ret0, _ := ret[0].(error)
	return ret0
}

// UpdateCodeReference indicates an expected call of UpdateCodeReference.
func (mr *MockCodeReferenceStorageMockRecorder) UpdateCodeReference(ctx, codeRef any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCodeReference", reflect.TypeOf((*MockCodeReferenceStorage)(nil).UpdateCodeReference), ctx, codeRef)
}
