Documentation
¶
Index ¶
- type Handler
- type Handler_Execute_Call
- type Handler_Expecter
- type Service
- func (_m *Service) CreateCompany(company *types.Company, user types.CreateUser) (types.User, error)
- func (_m *Service) CreateUser(user types.CreateUser) (types.User, error)
- func (_m *Service) DeleteUser(id uuid.UUID, companyID uuid.UUID) error
- func (_m *Service) EXPECT() *Service_Expecter
- func (_m *Service) GetRole(name string) (types.Role, error)
- func (_m *Service) GetUserByID(id uuid.UUID, companyID uuid.UUID) (types.User, error)
- func (_m *Service) GetUsers(companyID uuid.UUID) ([]types.User, error)
- func (_m *Service) LoadScript(fileName string) error
- func (_m *Service) Login(email string, password string) (types.User, error)
- func (_m *Service) UpdateUser(user types.CreateUser) error
- type Service_CreateCompany_Call
- func (_c *Service_CreateCompany_Call) Return(_a0 types.User, _a1 error) *Service_CreateCompany_Call
- func (_c *Service_CreateCompany_Call) Run(run func(company *types.Company, user types.CreateUser)) *Service_CreateCompany_Call
- func (_c *Service_CreateCompany_Call) RunAndReturn(run func(*types.Company, types.CreateUser) (types.User, error)) *Service_CreateCompany_Call
- type Service_CreateUser_Call
- func (_c *Service_CreateUser_Call) Return(_a0 types.User, _a1 error) *Service_CreateUser_Call
- func (_c *Service_CreateUser_Call) Run(run func(user types.CreateUser)) *Service_CreateUser_Call
- func (_c *Service_CreateUser_Call) RunAndReturn(run func(types.CreateUser) (types.User, error)) *Service_CreateUser_Call
- type Service_DeleteUser_Call
- type Service_Expecter
- func (_e *Service_Expecter) CreateCompany(company interface{}, user interface{}) *Service_CreateCompany_Call
- func (_e *Service_Expecter) CreateUser(user interface{}) *Service_CreateUser_Call
- func (_e *Service_Expecter) DeleteUser(id interface{}, companyID interface{}) *Service_DeleteUser_Call
- func (_e *Service_Expecter) GetRole(name interface{}) *Service_GetRole_Call
- func (_e *Service_Expecter) GetUserByID(id interface{}, companyID interface{}) *Service_GetUserByID_Call
- func (_e *Service_Expecter) GetUsers(companyID interface{}) *Service_GetUsers_Call
- func (_e *Service_Expecter) LoadScript(fileName interface{}) *Service_LoadScript_Call
- func (_e *Service_Expecter) Login(email interface{}, password interface{}) *Service_Login_Call
- func (_e *Service_Expecter) UpdateUser(user interface{}) *Service_UpdateUser_Call
- type Service_GetRole_Call
- type Service_GetUserByID_Call
- func (_c *Service_GetUserByID_Call) Return(_a0 types.User, _a1 error) *Service_GetUserByID_Call
- func (_c *Service_GetUserByID_Call) Run(run func(id uuid.UUID, companyID uuid.UUID)) *Service_GetUserByID_Call
- func (_c *Service_GetUserByID_Call) RunAndReturn(run func(uuid.UUID, uuid.UUID) (types.User, error)) *Service_GetUserByID_Call
- type Service_GetUsers_Call
- type Service_LoadScript_Call
- type Service_Login_Call
- type Service_UpdateUser_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler is an autogenerated mock type for the Handler type
func NewHandler ¶
NewHandler creates a new instance of Handler. 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 (*Handler) EXPECT ¶
func (_m *Handler) EXPECT() *Handler_Expecter
type Handler_Execute_Call ¶
Handler_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
func (*Handler_Execute_Call) Return ¶
func (_c *Handler_Execute_Call) Return(_a0 error) *Handler_Execute_Call
func (*Handler_Execute_Call) Run ¶
func (_c *Handler_Execute_Call) Run(run func(w http.ResponseWriter, r *http.Request)) *Handler_Execute_Call
func (*Handler_Execute_Call) RunAndReturn ¶
func (_c *Handler_Execute_Call) RunAndReturn(run func(http.ResponseWriter, *http.Request) error) *Handler_Execute_Call
type Handler_Expecter ¶
type Handler_Expecter struct {
// contains filtered or unexported fields
}
func (*Handler_Expecter) Execute ¶
func (_e *Handler_Expecter) Execute(w interface{}, r interface{}) *Handler_Execute_Call
Execute is a helper method to define mock.On call
- w http.ResponseWriter
- r *http.Request
type Service ¶
Service is an autogenerated mock type for the Service type
func NewService ¶
NewService creates a new instance of Service. 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 (*Service) CreateCompany ¶
CreateCompany provides a mock function with given fields: company, user
func (*Service) CreateUser ¶
CreateUser provides a mock function with given fields: user
func (*Service) DeleteUser ¶
DeleteUser provides a mock function with given fields: id, companyID
func (*Service) EXPECT ¶
func (_m *Service) EXPECT() *Service_Expecter
func (*Service) GetUserByID ¶
GetUserByID provides a mock function with given fields: id, companyID
func (*Service) LoadScript ¶
LoadScript provides a mock function with given fields: fileName
func (*Service) UpdateUser ¶
func (_m *Service) UpdateUser(user types.CreateUser) error
UpdateUser provides a mock function with given fields: user
type Service_CreateCompany_Call ¶
Service_CreateCompany_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCompany'
func (*Service_CreateCompany_Call) Return ¶
func (_c *Service_CreateCompany_Call) Return(_a0 types.User, _a1 error) *Service_CreateCompany_Call
func (*Service_CreateCompany_Call) Run ¶
func (_c *Service_CreateCompany_Call) Run(run func(company *types.Company, user types.CreateUser)) *Service_CreateCompany_Call
func (*Service_CreateCompany_Call) RunAndReturn ¶
func (_c *Service_CreateCompany_Call) RunAndReturn(run func(*types.Company, types.CreateUser) (types.User, error)) *Service_CreateCompany_Call
type Service_CreateUser_Call ¶
Service_CreateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUser'
func (*Service_CreateUser_Call) Return ¶
func (_c *Service_CreateUser_Call) Return(_a0 types.User, _a1 error) *Service_CreateUser_Call
func (*Service_CreateUser_Call) Run ¶
func (_c *Service_CreateUser_Call) Run(run func(user types.CreateUser)) *Service_CreateUser_Call
func (*Service_CreateUser_Call) RunAndReturn ¶
func (_c *Service_CreateUser_Call) RunAndReturn(run func(types.CreateUser) (types.User, error)) *Service_CreateUser_Call
type Service_DeleteUser_Call ¶
Service_DeleteUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUser'
func (*Service_DeleteUser_Call) Return ¶
func (_c *Service_DeleteUser_Call) Return(_a0 error) *Service_DeleteUser_Call
func (*Service_DeleteUser_Call) Run ¶
func (_c *Service_DeleteUser_Call) Run(run func(id uuid.UUID, companyID uuid.UUID)) *Service_DeleteUser_Call
func (*Service_DeleteUser_Call) RunAndReturn ¶
func (_c *Service_DeleteUser_Call) RunAndReturn(run func(uuid.UUID, uuid.UUID) error) *Service_DeleteUser_Call
type Service_Expecter ¶
type Service_Expecter struct {
// contains filtered or unexported fields
}
func (*Service_Expecter) CreateCompany ¶
func (_e *Service_Expecter) CreateCompany(company interface{}, user interface{}) *Service_CreateCompany_Call
CreateCompany is a helper method to define mock.On call
- company *types.Company
- user types.CreateUser
func (*Service_Expecter) CreateUser ¶
func (_e *Service_Expecter) CreateUser(user interface{}) *Service_CreateUser_Call
CreateUser is a helper method to define mock.On call
- user types.CreateUser
func (*Service_Expecter) DeleteUser ¶
func (_e *Service_Expecter) DeleteUser(id interface{}, companyID interface{}) *Service_DeleteUser_Call
DeleteUser is a helper method to define mock.On call
- id uuid.UUID
- companyID uuid.UUID
func (*Service_Expecter) GetRole ¶
func (_e *Service_Expecter) GetRole(name interface{}) *Service_GetRole_Call
GetRole is a helper method to define mock.On call
- name string
func (*Service_Expecter) GetUserByID ¶
func (_e *Service_Expecter) GetUserByID(id interface{}, companyID interface{}) *Service_GetUserByID_Call
GetUserByID is a helper method to define mock.On call
- id uuid.UUID
- companyID uuid.UUID
func (*Service_Expecter) GetUsers ¶
func (_e *Service_Expecter) GetUsers(companyID interface{}) *Service_GetUsers_Call
GetUsers is a helper method to define mock.On call
- companyID uuid.UUID
func (*Service_Expecter) LoadScript ¶
func (_e *Service_Expecter) LoadScript(fileName interface{}) *Service_LoadScript_Call
LoadScript is a helper method to define mock.On call
- fileName string
func (*Service_Expecter) Login ¶
func (_e *Service_Expecter) Login(email interface{}, password interface{}) *Service_Login_Call
Login is a helper method to define mock.On call
- email string
- password string
func (*Service_Expecter) UpdateUser ¶
func (_e *Service_Expecter) UpdateUser(user interface{}) *Service_UpdateUser_Call
UpdateUser is a helper method to define mock.On call
- user types.CreateUser
type Service_GetRole_Call ¶
Service_GetRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRole'
func (*Service_GetRole_Call) Return ¶
func (_c *Service_GetRole_Call) Return(_a0 types.Role, _a1 error) *Service_GetRole_Call
func (*Service_GetRole_Call) Run ¶
func (_c *Service_GetRole_Call) Run(run func(name string)) *Service_GetRole_Call
func (*Service_GetRole_Call) RunAndReturn ¶
func (_c *Service_GetRole_Call) RunAndReturn(run func(string) (types.Role, error)) *Service_GetRole_Call
type Service_GetUserByID_Call ¶
Service_GetUserByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByID'
func (*Service_GetUserByID_Call) Return ¶
func (_c *Service_GetUserByID_Call) Return(_a0 types.User, _a1 error) *Service_GetUserByID_Call
func (*Service_GetUserByID_Call) Run ¶
func (_c *Service_GetUserByID_Call) Run(run func(id uuid.UUID, companyID uuid.UUID)) *Service_GetUserByID_Call
func (*Service_GetUserByID_Call) RunAndReturn ¶
func (_c *Service_GetUserByID_Call) RunAndReturn(run func(uuid.UUID, uuid.UUID) (types.User, error)) *Service_GetUserByID_Call
type Service_GetUsers_Call ¶
Service_GetUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUsers'
func (*Service_GetUsers_Call) Return ¶
func (_c *Service_GetUsers_Call) Return(_a0 []types.User, _a1 error) *Service_GetUsers_Call
func (*Service_GetUsers_Call) Run ¶
func (_c *Service_GetUsers_Call) Run(run func(companyID uuid.UUID)) *Service_GetUsers_Call
func (*Service_GetUsers_Call) RunAndReturn ¶
func (_c *Service_GetUsers_Call) RunAndReturn(run func(uuid.UUID) ([]types.User, error)) *Service_GetUsers_Call
type Service_LoadScript_Call ¶
Service_LoadScript_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadScript'
func (*Service_LoadScript_Call) Return ¶
func (_c *Service_LoadScript_Call) Return(_a0 error) *Service_LoadScript_Call
func (*Service_LoadScript_Call) Run ¶
func (_c *Service_LoadScript_Call) Run(run func(fileName string)) *Service_LoadScript_Call
func (*Service_LoadScript_Call) RunAndReturn ¶
func (_c *Service_LoadScript_Call) RunAndReturn(run func(string) error) *Service_LoadScript_Call
type Service_Login_Call ¶
Service_Login_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Login'
func (*Service_Login_Call) Return ¶
func (_c *Service_Login_Call) Return(_a0 types.User, _a1 error) *Service_Login_Call
func (*Service_Login_Call) Run ¶
func (_c *Service_Login_Call) Run(run func(email string, password string)) *Service_Login_Call
func (*Service_Login_Call) RunAndReturn ¶
func (_c *Service_Login_Call) RunAndReturn(run func(string, string) (types.User, error)) *Service_Login_Call
type Service_UpdateUser_Call ¶
Service_UpdateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateUser'
func (*Service_UpdateUser_Call) Return ¶
func (_c *Service_UpdateUser_Call) Return(_a0 error) *Service_UpdateUser_Call
func (*Service_UpdateUser_Call) Run ¶
func (_c *Service_UpdateUser_Call) Run(run func(user types.CreateUser)) *Service_UpdateUser_Call
func (*Service_UpdateUser_Call) RunAndReturn ¶
func (_c *Service_UpdateUser_Call) RunAndReturn(run func(types.CreateUser) error) *Service_UpdateUser_Call