mocks

package
v0.0.0-...-cd49875 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonPresenter

type JsonPresenter struct {
	mock.Mock
}

JsonPresenter is an autogenerated mock type for the JsonPresenter type

func NewJsonPresenter

func NewJsonPresenter(t mockConstructorTestingTNewJsonPresenter) *JsonPresenter

NewJsonPresenter creates a new instance of JsonPresenter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*JsonPresenter) BuildError

func (_m *JsonPresenter) BuildError(c *fiber.Ctx, err error) error

BuildError provides a mock function with given fields: c, err

func (*JsonPresenter) BuildSuccess

func (_m *JsonPresenter) BuildSuccess(c *fiber.Ctx, data interface{}, message string, code int) error

BuildSuccess provides a mock function with given fields: c, data, message, code

type LogRepository

type LogRepository struct {
	mock.Mock
}

LogRepository is an autogenerated mock type for the LogRepository type

func NewLogRepository

func NewLogRepository(t mockConstructorTestingTNewLogRepository) *LogRepository

NewLogRepository creates a new instance of LogRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*LogRepository) Create

func (_m *LogRepository) Create(ctx context.Context, params entity.LogCollection) error

Create provides a mock function with given fields: ctx, params

type LogUsecase

type LogUsecase struct {
	mock.Mock
}

LogUsecase is an autogenerated mock type for the LogUsecase type

func NewLogUsecase

func NewLogUsecase(t mockConstructorTestingTNewLogUsecase) *LogUsecase

NewLogUsecase creates a new instance of LogUsecase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*LogUsecase) Log

func (_m *LogUsecase) Log(status entity.LogType, message string, funcName string, err error, logFields map[string]string, processName string)

Log provides a mock function with given fields: status, message, funcName, err, logFields, processName

type MockLogger

type MockLogger struct {
	LogErrorFunc func(processName string, funcName string, err error, logFields entity.CaptureFields, message string)
}

func (*MockLogger) LogError

func (m *MockLogger) LogError(processName string, funcName string, err error, logFields entity.CaptureFields, message string)

type Parser

type Parser struct {
	mock.Mock
}

Parser is an autogenerated mock type for the Parser type

func NewParser

func NewParser(t mockConstructorTestingTNewParser) *Parser

NewParser creates a new instance of Parser. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Parser) ParserBodyRequest

func (_m *Parser) ParserBodyRequest(c *fiber.Ctx, req parser.BodyRequest) error

ParserBodyRequest provides a mock function with given fields: c, req

func (*Parser) ParserBodyRequestWithUserID

func (_m *Parser) ParserBodyRequestWithUserID(c *fiber.Ctx, req parser.WithUserID) error

ParserBodyRequestWithUserID provides a mock function with given fields: c, req

func (*Parser) ParserBodyWithIntIDPathParams

func (_m *Parser) ParserBodyWithIntIDPathParams(c *fiber.Ctx, req parser.WithPathID) error

ParserBodyWithIntIDPathParams provides a mock function with given fields: c, req

func (*Parser) ParserBodyWithIntIDPathParamsAndUserID

func (_m *Parser) ParserBodyWithIntIDPathParamsAndUserID(c *fiber.Ctx, req parser.WithPathIDAndUserID) error

ParserBodyWithIntIDPathParamsAndUserID provides a mock function with given fields: c, req

func (*Parser) ParserIntIDFromPathParams

func (_m *Parser) ParserIntIDFromPathParams(c *fiber.Ctx) (int64, error)

ParserIntIDFromPathParams provides a mock function with given fields: c

func (*Parser) ParserUserID

func (_m *Parser) ParserUserID(c *fiber.Ctx) (int64, error)

ParserUserID provides a mock function with given fields: c

type Presenter

type Presenter struct {
	mock.Mock
}

Presenter is an autogenerated mock type for the Presenter type

func NewPresenter

func NewPresenter(t mockConstructorTestingTNewPresenter) *Presenter

NewPresenter creates a new instance of Presenter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Presenter) BuildError

func (_m *Presenter) BuildError(c *fiber.Ctx, err error) error

BuildError provides a mock function with given fields: c, err

func (*Presenter) BuildSuccess

func (_m *Presenter) BuildSuccess(c *fiber.Ctx, data interface{}, message string, code int) error

BuildSuccess provides a mock function with given fields: c, data, message, code

type Queue

type Queue struct {
	mock.Mock
}

Queue is an autogenerated mock type for the Queue type

func NewQueue

func NewQueue(t mockConstructorTestingTNewQueue) *Queue

NewQueue creates a new instance of Queue. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Queue) BindQueue

func (_m *Queue) BindQueue(key string) (amqp091.Queue, error)

BindQueue provides a mock function with given fields: key

func (*Queue) Close

func (_m *Queue) Close() error

Close provides a mock function with given fields:

func (*Queue) Connect

func (_m *Queue) Connect() error

Connect provides a mock function with given fields:

func (*Queue) HandleConsumedDeliveries

func (_m *Queue) HandleConsumedDeliveries(key string, handle func(map[string]interface{}) error)

HandleConsumedDeliveries provides a mock function with given fields: key, handle

func (*Queue) Publish

func (_m *Queue) Publish(key string, message []byte, attempts int32) error

Publish provides a mock function with given fields: key, message, attempts

func (*Queue) Reconnect

func (_m *Queue) Reconnect() error

Reconnect provides a mock function with given fields:

type TodoListRepository

type TodoListRepository struct {
	mock.Mock
}

TodoListRepository is an autogenerated mock type for the TodoListRepository type

func NewTodoListRepository

func NewTodoListRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *TodoListRepository

NewTodoListRepository creates a new instance of TodoListRepository. 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 (*TodoListRepository) Begin

func (_m *TodoListRepository) Begin() (mysql.TrxObj, error)

Begin provides a mock function with given fields:

func (*TodoListRepository) Create

func (_m *TodoListRepository) Create(ctx context.Context, dbTrx mysql.TrxObj, params *entity.TodoList, nonZeroVal bool) error

Create provides a mock function with given fields: ctx, dbTrx, params, nonZeroVal

func (*TodoListRepository) DeleteByID

func (_m *TodoListRepository) DeleteByID(ctx context.Context, dbTrx mysql.TrxObj, id int64) error

DeleteByID provides a mock function with given fields: ctx, dbTrx, id

func (*TodoListRepository) GetByID

func (_m *TodoListRepository) GetByID(ctx context.Context, ID int64) (*entity.TodoList, error)

GetByID provides a mock function with given fields: ctx, ID

func (*TodoListRepository) GetByUserID

func (_m *TodoListRepository) GetByUserID(ctx context.Context, ID int64) ([]*entity.TodoList, error)

GetByUserID provides a mock function with given fields: ctx, ID

func (*TodoListRepository) LockByID

func (_m *TodoListRepository) LockByID(ctx context.Context, dbTrx mysql.TrxObj, ID int64) (*entity.TodoList, error)

LockByID provides a mock function with given fields: ctx, dbTrx, ID

func (*TodoListRepository) Update

func (_m *TodoListRepository) Update(ctx context.Context, dbTrx mysql.TrxObj, params *entity.TodoList, changes *entity.TodoList) error

Update provides a mock function with given fields: ctx, dbTrx, params, changes

type TodoListUsecase

type TodoListUsecase struct {
	mock.Mock
}

TodoListUsecase is an autogenerated mock type for the TodoListUsecase type

func NewTodoListUsecase

func NewTodoListUsecase(t interface {
	mock.TestingT
	Cleanup(func())
}) *TodoListUsecase

NewTodoListUsecase creates a new instance of TodoListUsecase. 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 (*TodoListUsecase) Create

func (_m *TodoListUsecase) Create(ctx context.Context, todoListReq *entity.TodoListReq) (*entity.TodoListResponse, error)

Create provides a mock function with given fields: ctx, todoListReq

func (*TodoListUsecase) DeleteByID

func (_m *TodoListUsecase) DeleteByID(ctx context.Context, todoListID int64) error

DeleteByID provides a mock function with given fields: ctx, todoListID

func (*TodoListUsecase) GetByID

func (_m *TodoListUsecase) GetByID(ctx context.Context, todoListID int64) (*entity.TodoListResponse, error)

GetByID provides a mock function with given fields: ctx, todoListID

func (*TodoListUsecase) GetByUserID

func (_m *TodoListUsecase) GetByUserID(ctx context.Context, userID int64) ([]*entity.TodoListResponse, error)

GetByUserID provides a mock function with given fields: ctx, userID

func (*TodoListUsecase) UpdateByID

func (_m *TodoListUsecase) UpdateByID(ctx context.Context, todoListReq *entity.TodoListReq) error

UpdateByID provides a mock function with given fields: ctx, todoListReq

type TrxObj

type TrxObj struct {
	mock.Mock
}

TrxObj is an autogenerated mock type for the TrxObj type

func NewTrxObj

func NewTrxObj(t mockConstructorTestingTNewTrxObj) *TrxObj

NewTrxObj creates a new instance of TrxObj. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*TrxObj) Commit

func (_m *TrxObj) Commit() error

Commit provides a mock function with given fields:

func (*TrxObj) Rollback

func (_m *TrxObj) Rollback() error

Rollback provides a mock function with given fields:

type UserRepository

type UserRepository struct {
	mock.Mock
}

UserRepository is an autogenerated mock type for the UserRepository type

func NewUserRepository

func NewUserRepository(t mockConstructorTestingTNewUserRepository) *UserRepository

NewUserRepository creates a new instance of UserRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*UserRepository) Begin

func (_m *UserRepository) Begin() (mysql.TrxObj, error)

Begin provides a mock function with given fields:

func (*UserRepository) Create

func (_m *UserRepository) Create(ctx context.Context, dbTrx mysql.TrxObj, user *entity.User) error

Create provides a mock function with given fields: ctx, dbTrx, user

func (*UserRepository) GetByEmail

func (_m *UserRepository) GetByEmail(ctx context.Context, email string) (*entity.User, error)

GetByEmail provides a mock function with given fields: ctx, email

func (*UserRepository) GetByEmailAndRole

func (_m *UserRepository) GetByEmailAndRole(ctx context.Context, email string, role entity.RoleType) (*entity.User, error)

GetByEmailAndRole provides a mock function with given fields: ctx, email, role

func (*UserRepository) LockByID

func (_m *UserRepository) LockByID(ctx context.Context, dbTrx mysql.TrxObj, ID int64) (*entity.User, error)

LockByID provides a mock function with given fields: ctx, dbTrx, ID

type UserUsecase

type UserUsecase struct {
	mock.Mock
}

UserUsecase is an autogenerated mock type for the UserUsecase type

func NewUserUsecase

func NewUserUsecase(t mockConstructorTestingTNewUserUsecase) *UserUsecase

NewUserUsecase creates a new instance of UserUsecase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*UserUsecase) CreateAsGuest

func (_m *UserUsecase) CreateAsGuest(ctx context.Context, createUserReq *entity.CreateUserReq) (*entity.CreateUserResponse, error)

CreateAsGuest provides a mock function with given fields: ctx, createUserReq

func (*UserUsecase) VerifyByEmailAndPassword

func (_m *UserUsecase) VerifyByEmailAndPassword(ctx context.Context, req *entity.LoginReq) (*entity.LoginResponse, error)

VerifyByEmailAndPassword provides a mock function with given fields: ctx, req

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL