mocks

package
v0.0.0-...-9665562 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAuthInteractor

type MockAuthInteractor struct {
	mock.Mock
}

MockAuthInteractor is an autogenerated mock type for the AuthInteractor type

func NewMockAuthInteractor

func NewMockAuthInteractor(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAuthInteractor

NewMockAuthInteractor creates a new instance of MockAuthInteractor. 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 (*MockAuthInteractor) CreateAccessToken

func (_m *MockAuthInteractor) CreateAccessToken(req entity.Authenticable) (string, error)

CreateAccessToken provides a mock function with given fields: req

func (*MockAuthInteractor) CreateRefreshToken

func (_m *MockAuthInteractor) CreateRefreshToken(req entity.Authenticable) (string, error)

CreateRefreshToken provides a mock function with given fields: req

func (*MockAuthInteractor) EXPECT

func (*MockAuthInteractor) ParseToken

func (_m *MockAuthInteractor) ParseToken(secret string, requestToken string) (*auth.Claims, error)

ParseToken provides a mock function with given fields: secret, requestToken

type MockAuthInteractor_CreateAccessToken_Call

type MockAuthInteractor_CreateAccessToken_Call struct {
	*mock.Call
}

MockAuthInteractor_CreateAccessToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAccessToken'

func (*MockAuthInteractor_CreateAccessToken_Call) Return

func (*MockAuthInteractor_CreateAccessToken_Call) Run

func (*MockAuthInteractor_CreateAccessToken_Call) RunAndReturn

type MockAuthInteractor_CreateRefreshToken_Call

type MockAuthInteractor_CreateRefreshToken_Call struct {
	*mock.Call
}

MockAuthInteractor_CreateRefreshToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRefreshToken'

func (*MockAuthInteractor_CreateRefreshToken_Call) Return

func (*MockAuthInteractor_CreateRefreshToken_Call) Run

func (*MockAuthInteractor_CreateRefreshToken_Call) RunAndReturn

type MockAuthInteractor_Expecter

type MockAuthInteractor_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockAuthInteractor_Expecter) CreateAccessToken

func (_e *MockAuthInteractor_Expecter) CreateAccessToken(req interface{}) *MockAuthInteractor_CreateAccessToken_Call

CreateAccessToken is a helper method to define mock.On call

  • req entity.Authenticable

func (*MockAuthInteractor_Expecter) CreateRefreshToken

func (_e *MockAuthInteractor_Expecter) CreateRefreshToken(req interface{}) *MockAuthInteractor_CreateRefreshToken_Call

CreateRefreshToken is a helper method to define mock.On call

  • req entity.Authenticable

func (*MockAuthInteractor_Expecter) ParseToken

func (_e *MockAuthInteractor_Expecter) ParseToken(secret interface{}, requestToken interface{}) *MockAuthInteractor_ParseToken_Call

ParseToken is a helper method to define mock.On call

  • secret string
  • requestToken string

type MockAuthInteractor_ParseToken_Call

type MockAuthInteractor_ParseToken_Call struct {
	*mock.Call
}

MockAuthInteractor_ParseToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseToken'

func (*MockAuthInteractor_ParseToken_Call) Return

func (*MockAuthInteractor_ParseToken_Call) Run

func (*MockAuthInteractor_ParseToken_Call) RunAndReturn

type MockCache

type MockCache struct {
	mock.Mock
}

MockCache is an autogenerated mock type for the Cache type

func NewMockCache

func NewMockCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCache

NewMockCache creates a new instance of MockCache. 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 (*MockCache) Del

func (_m *MockCache) Del(ctx context.Context, key string) (bool, error)

Del provides a mock function with given fields: ctx, key

func (*MockCache) EXPECT

func (_m *MockCache) EXPECT() *MockCache_Expecter

func (*MockCache) Exists

func (_m *MockCache) Exists(ctx context.Context, key string) (bool, error)

Exists provides a mock function with given fields: ctx, key

func (*MockCache) Get

func (_m *MockCache) Get(ctx context.Context, key string) (string, error)

Get provides a mock function with given fields: ctx, key

func (*MockCache) Set

func (_m *MockCache) Set(ctx context.Context, key string, value interface{}, expireTime time.Duration) error

Set provides a mock function with given fields: ctx, key, value, expireTime

type MockCache_Del_Call

type MockCache_Del_Call struct {
	*mock.Call
}

MockCache_Del_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Del'

func (*MockCache_Del_Call) Return

func (_c *MockCache_Del_Call) Return(_a0 bool, _a1 error) *MockCache_Del_Call

func (*MockCache_Del_Call) Run

func (_c *MockCache_Del_Call) Run(run func(ctx context.Context, key string)) *MockCache_Del_Call

func (*MockCache_Del_Call) RunAndReturn

func (_c *MockCache_Del_Call) RunAndReturn(run func(context.Context, string) (bool, error)) *MockCache_Del_Call

type MockCache_Exists_Call

type MockCache_Exists_Call struct {
	*mock.Call
}

MockCache_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists'

func (*MockCache_Exists_Call) Return

func (_c *MockCache_Exists_Call) Return(_a0 bool, _a1 error) *MockCache_Exists_Call

func (*MockCache_Exists_Call) Run

func (_c *MockCache_Exists_Call) Run(run func(ctx context.Context, key string)) *MockCache_Exists_Call

func (*MockCache_Exists_Call) RunAndReturn

func (_c *MockCache_Exists_Call) RunAndReturn(run func(context.Context, string) (bool, error)) *MockCache_Exists_Call

type MockCache_Expecter

type MockCache_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockCache_Expecter) Del

func (_e *MockCache_Expecter) Del(ctx interface{}, key interface{}) *MockCache_Del_Call

Del is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*MockCache_Expecter) Exists

func (_e *MockCache_Expecter) Exists(ctx interface{}, key interface{}) *MockCache_Exists_Call

Exists is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*MockCache_Expecter) Get

func (_e *MockCache_Expecter) Get(ctx interface{}, key interface{}) *MockCache_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*MockCache_Expecter) Set

func (_e *MockCache_Expecter) Set(ctx interface{}, key interface{}, value interface{}, expireTime interface{}) *MockCache_Set_Call

Set is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value interface{}
  • expireTime time.Duration

type MockCache_Get_Call

type MockCache_Get_Call struct {
	*mock.Call
}

MockCache_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*MockCache_Get_Call) Return

func (_c *MockCache_Get_Call) Return(_a0 string, _a1 error) *MockCache_Get_Call

func (*MockCache_Get_Call) Run

func (_c *MockCache_Get_Call) Run(run func(ctx context.Context, key string)) *MockCache_Get_Call

func (*MockCache_Get_Call) RunAndReturn

func (_c *MockCache_Get_Call) RunAndReturn(run func(context.Context, string) (string, error)) *MockCache_Get_Call

type MockCache_Set_Call

type MockCache_Set_Call struct {
	*mock.Call
}

MockCache_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'

func (*MockCache_Set_Call) Return

func (_c *MockCache_Set_Call) Return(_a0 error) *MockCache_Set_Call

func (*MockCache_Set_Call) Run

func (_c *MockCache_Set_Call) Run(run func(ctx context.Context, key string, value interface{}, expireTime time.Duration)) *MockCache_Set_Call

func (*MockCache_Set_Call) RunAndReturn

func (_c *MockCache_Set_Call) RunAndReturn(run func(context.Context, string, interface{}, time.Duration) error) *MockCache_Set_Call

type MockRepository

type MockRepository struct {
	mock.Mock
}

MockRepository is an autogenerated mock type for the Repository type

func NewMockRepository

func NewMockRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRepository

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 (*MockRepository) Create

func (_m *MockRepository) Create(ctx context.Context, u entity.User) (entity.User, error)

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

func (*MockRepository) EXPECT

func (*MockRepository) GetByID

func (_m *MockRepository) GetByID(ctx context.Context, id uint64) (entity.User, error)

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

func (*MockRepository) GetByMobile

func (_m *MockRepository) GetByMobile(ctx context.Context, mobile string) (entity.User, error)

GetByMobile provides a mock function with given fields: ctx, mobile

func (*MockRepository) IsMobileUnique

func (_m *MockRepository) IsMobileUnique(ctx context.Context, mobile string) (bool, error)

IsMobileUnique provides a mock function with given fields: ctx, mobile

type MockRepository_Create_Call

type MockRepository_Create_Call struct {
	*mock.Call
}

MockRepository_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'

func (*MockRepository_Create_Call) Return

func (*MockRepository_Create_Call) Run

func (*MockRepository_Create_Call) RunAndReturn

type MockRepository_Expecter

type MockRepository_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockRepository_Expecter) Create

func (_e *MockRepository_Expecter) Create(ctx interface{}, u interface{}) *MockRepository_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • u entity.User

func (*MockRepository_Expecter) GetByID

func (_e *MockRepository_Expecter) GetByID(ctx interface{}, id interface{}) *MockRepository_GetByID_Call

GetByID is a helper method to define mock.On call

  • ctx context.Context
  • id uint64

func (*MockRepository_Expecter) GetByMobile

func (_e *MockRepository_Expecter) GetByMobile(ctx interface{}, mobile interface{}) *MockRepository_GetByMobile_Call

GetByMobile is a helper method to define mock.On call

  • ctx context.Context
  • mobile string

func (*MockRepository_Expecter) IsMobileUnique

func (_e *MockRepository_Expecter) IsMobileUnique(ctx interface{}, mobile interface{}) *MockRepository_IsMobileUnique_Call

IsMobileUnique is a helper method to define mock.On call

  • ctx context.Context
  • mobile string

type MockRepository_GetByID_Call

type MockRepository_GetByID_Call struct {
	*mock.Call
}

MockRepository_GetByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByID'

func (*MockRepository_GetByID_Call) Return

func (*MockRepository_GetByID_Call) Run

func (*MockRepository_GetByID_Call) RunAndReturn

type MockRepository_GetByMobile_Call

type MockRepository_GetByMobile_Call struct {
	*mock.Call
}

MockRepository_GetByMobile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByMobile'

func (*MockRepository_GetByMobile_Call) Return

func (*MockRepository_GetByMobile_Call) Run

func (*MockRepository_GetByMobile_Call) RunAndReturn

type MockRepository_IsMobileUnique_Call

type MockRepository_IsMobileUnique_Call struct {
	*mock.Call
}

MockRepository_IsMobileUnique_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsMobileUnique'

func (*MockRepository_IsMobileUnique_Call) Return

func (*MockRepository_IsMobileUnique_Call) Run

func (*MockRepository_IsMobileUnique_Call) RunAndReturn

type MockValidator

type MockValidator struct {
	mock.Mock
}

MockValidator is an autogenerated mock type for the Validator type

func NewMockValidator

func NewMockValidator(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockValidator

NewMockValidator creates a new instance of MockValidator. 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 (*MockValidator) EXPECT

func (_m *MockValidator) EXPECT() *MockValidator_Expecter

func (*MockValidator) ValidateCreateTaskRequest

func (_m *MockValidator) ValidateCreateTaskRequest(req task.CreateRequest) (map[string]string, error)

ValidateCreateTaskRequest provides a mock function with given fields: req

func (*MockValidator) ValidateLoginRequest

func (_m *MockValidator) ValidateLoginRequest(req dtouser.LoginRequest) (map[string]string, error)

ValidateLoginRequest provides a mock function with given fields: req

func (*MockValidator) ValidateProfileRequest

func (_m *MockValidator) ValidateProfileRequest(req dtouser.ProfileRequest) (map[string]string, error)

ValidateProfileRequest provides a mock function with given fields: req

func (*MockValidator) ValidateRefreshTokenRequest

func (_m *MockValidator) ValidateRefreshTokenRequest(req dtouser.RefreshTokenRequest) (map[string]string, error)

ValidateRefreshTokenRequest provides a mock function with given fields: req

func (*MockValidator) ValidateRegisterRequest

func (_m *MockValidator) ValidateRegisterRequest(req dtouser.RegisterRequest) (map[string]string, error)

ValidateRegisterRequest provides a mock function with given fields: req

type MockValidator_Expecter

type MockValidator_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockValidator_Expecter) ValidateCreateTaskRequest

func (_e *MockValidator_Expecter) ValidateCreateTaskRequest(req interface{}) *MockValidator_ValidateCreateTaskRequest_Call

ValidateCreateTaskRequest is a helper method to define mock.On call

  • req task.CreateRequest

func (*MockValidator_Expecter) ValidateLoginRequest

func (_e *MockValidator_Expecter) ValidateLoginRequest(req interface{}) *MockValidator_ValidateLoginRequest_Call

ValidateLoginRequest is a helper method to define mock.On call

  • req dtouser.LoginRequest

func (*MockValidator_Expecter) ValidateProfileRequest

func (_e *MockValidator_Expecter) ValidateProfileRequest(req interface{}) *MockValidator_ValidateProfileRequest_Call

ValidateProfileRequest is a helper method to define mock.On call

  • req dtouser.ProfileRequest

func (*MockValidator_Expecter) ValidateRefreshTokenRequest

func (_e *MockValidator_Expecter) ValidateRefreshTokenRequest(req interface{}) *MockValidator_ValidateRefreshTokenRequest_Call

ValidateRefreshTokenRequest is a helper method to define mock.On call

  • req dtouser.RefreshTokenRequest

func (*MockValidator_Expecter) ValidateRegisterRequest

func (_e *MockValidator_Expecter) ValidateRegisterRequest(req interface{}) *MockValidator_ValidateRegisterRequest_Call

ValidateRegisterRequest is a helper method to define mock.On call

  • req dtouser.RegisterRequest

type MockValidator_ValidateCreateTaskRequest_Call

type MockValidator_ValidateCreateTaskRequest_Call struct {
	*mock.Call
}

MockValidator_ValidateCreateTaskRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateCreateTaskRequest'

func (*MockValidator_ValidateCreateTaskRequest_Call) Return

func (*MockValidator_ValidateCreateTaskRequest_Call) Run

func (*MockValidator_ValidateCreateTaskRequest_Call) RunAndReturn

type MockValidator_ValidateLoginRequest_Call

type MockValidator_ValidateLoginRequest_Call struct {
	*mock.Call
}

MockValidator_ValidateLoginRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateLoginRequest'

func (*MockValidator_ValidateLoginRequest_Call) Return

func (*MockValidator_ValidateLoginRequest_Call) Run

func (*MockValidator_ValidateLoginRequest_Call) RunAndReturn

type MockValidator_ValidateProfileRequest_Call

type MockValidator_ValidateProfileRequest_Call struct {
	*mock.Call
}

MockValidator_ValidateProfileRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateProfileRequest'

func (*MockValidator_ValidateProfileRequest_Call) Return

func (*MockValidator_ValidateProfileRequest_Call) Run

func (*MockValidator_ValidateProfileRequest_Call) RunAndReturn

type MockValidator_ValidateRefreshTokenRequest_Call

type MockValidator_ValidateRefreshTokenRequest_Call struct {
	*mock.Call
}

MockValidator_ValidateRefreshTokenRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateRefreshTokenRequest'

func (*MockValidator_ValidateRefreshTokenRequest_Call) Return

func (*MockValidator_ValidateRefreshTokenRequest_Call) Run

func (*MockValidator_ValidateRefreshTokenRequest_Call) RunAndReturn

type MockValidator_ValidateRegisterRequest_Call

type MockValidator_ValidateRegisterRequest_Call struct {
	*mock.Call
}

MockValidator_ValidateRegisterRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateRegisterRequest'

func (*MockValidator_ValidateRegisterRequest_Call) Return

func (*MockValidator_ValidateRegisterRequest_Call) Run

func (*MockValidator_ValidateRegisterRequest_Call) RunAndReturn

Jump to

Keyboard shortcuts

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