Documentation
¶
Index ¶
- type JsonPresenter
- type LogRepository
- type LogUsecase
- type MockLogger
- type Parser
- func (_m *Parser) ParserBodyRequest(c *fiber.Ctx, req parser.BodyRequest) error
- func (_m *Parser) ParserBodyRequestWithUserID(c *fiber.Ctx, req parser.WithUserID) error
- func (_m *Parser) ParserBodyWithIntIDPathParams(c *fiber.Ctx, req parser.WithPathID) error
- func (_m *Parser) ParserBodyWithIntIDPathParamsAndUserID(c *fiber.Ctx, req parser.WithPathIDAndUserID) error
- func (_m *Parser) ParserIntIDFromPathParams(c *fiber.Ctx) (int64, error)
- func (_m *Parser) ParserUserID(c *fiber.Ctx) (int64, error)
- type Presenter
- type Queue
- func (_m *Queue) BindQueue(key string) (amqp091.Queue, error)
- func (_m *Queue) Close() error
- func (_m *Queue) Connect() error
- func (_m *Queue) HandleConsumedDeliveries(key string, handle func(map[string]interface{}) error)
- func (_m *Queue) Publish(key string, message []byte, attempts int32) error
- func (_m *Queue) Reconnect() error
- type TodoListRepository
- func (_m *TodoListRepository) Begin() (mysql.TrxObj, error)
- func (_m *TodoListRepository) Create(ctx context.Context, dbTrx mysql.TrxObj, params *entity.TodoList, ...) error
- func (_m *TodoListRepository) DeleteByID(ctx context.Context, dbTrx mysql.TrxObj, id int64) error
- func (_m *TodoListRepository) GetByID(ctx context.Context, ID int64) (*entity.TodoList, error)
- func (_m *TodoListRepository) GetByUserID(ctx context.Context, ID int64) ([]*entity.TodoList, error)
- func (_m *TodoListRepository) LockByID(ctx context.Context, dbTrx mysql.TrxObj, ID int64) (*entity.TodoList, error)
- func (_m *TodoListRepository) Update(ctx context.Context, dbTrx mysql.TrxObj, params *entity.TodoList, ...) error
- type TodoListUsecase
- func (_m *TodoListUsecase) Create(ctx context.Context, todoListReq *entity.TodoListReq) (*entity.TodoListResponse, error)
- func (_m *TodoListUsecase) DeleteByID(ctx context.Context, todoListID int64) error
- func (_m *TodoListUsecase) GetByID(ctx context.Context, todoListID int64) (*entity.TodoListResponse, error)
- func (_m *TodoListUsecase) GetByUserID(ctx context.Context, userID int64) ([]*entity.TodoListResponse, error)
- func (_m *TodoListUsecase) UpdateByID(ctx context.Context, todoListReq *entity.TodoListReq) error
- type TrxObj
- type UserRepository
- func (_m *UserRepository) Begin() (mysql.TrxObj, error)
- func (_m *UserRepository) Create(ctx context.Context, dbTrx mysql.TrxObj, user *entity.User) error
- func (_m *UserRepository) GetByEmail(ctx context.Context, email string) (*entity.User, error)
- func (_m *UserRepository) GetByEmailAndRole(ctx context.Context, email string, role entity.RoleType) (*entity.User, error)
- func (_m *UserRepository) LockByID(ctx context.Context, dbTrx mysql.TrxObj, ID int64) (*entity.User, error)
- type UserUsecase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonPresenter ¶
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 ¶
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 ¶
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.
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 ¶
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 ¶
ParserBodyRequest provides a mock function with given fields: c, req
func (*Parser) ParserBodyRequestWithUserID ¶
ParserBodyRequestWithUserID provides a mock function with given fields: c, req
func (*Parser) ParserBodyWithIntIDPathParams ¶
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 ¶
ParserIntIDFromPathParams provides a mock function with given fields: c
type Presenter ¶
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 ¶
BuildError provides a mock function with given fields: c, err
type Queue ¶
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) HandleConsumedDeliveries ¶
HandleConsumedDeliveries provides a mock function with given fields: key, handle
type TodoListRepository ¶
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 ¶
DeleteByID provides a mock function with given fields: ctx, dbTrx, 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
type TodoListUsecase ¶
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 ¶
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.
type UserRepository ¶
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) GetByEmail ¶
GetByEmail provides a mock function with given fields: ctx, email
type UserUsecase ¶
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