Documentation
¶
Index ¶
- Variables
- type ServiceError
- type Services
- func (s Services) CreateUser(username string, pass string, email string, role types.RoleType) (*models.User, error)
- func (s Services) Do(par1 int, par2 int) (int, error)
- func (s Services) GetEntityOptions(entityType genmodels.EntityType) ([]entitydto.EntityOption, error)
- func (s Services) LoginUser(username string, pass string) (*models.User, error)
- func (s Services) UpdateUser(username string, email string, role types.RoleType) (*models.User, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorLoginNotAllowed = &ServiceError{"msg.error.login"} ErrorUserNotCreated = &ServiceError{"msg.error.user.create"} ErrorUserNotSaved = &ServiceError{"msg.error.user.update"} ErrorUserNotDeleted = &ServiceError{"msg.error.user.delete"} ErrorUserPasswordRules = &ServiceError{"msg.error.user.passwordrules"} )
Functions ¶
This section is empty.
Types ¶
type ServiceError ¶
type ServiceError struct {
// contains filtered or unexported fields
}
ServiceError ...
type Services ¶
type Services struct { DS data.Datastore EF entitymodel.EntityFactory }
Services the business services
func NewServices ¶
func NewServices(ef entitymodel.EntityFactory, ds data.Datastore) *Services
NewServices ...
func (Services) CreateUser ¶
func (s Services) CreateUser(username string, pass string, email string, role types.RoleType) (*models.User, error)
CreateUser create new user
func (Services) GetEntityOptions ¶
func (s Services) GetEntityOptions(entityType genmodels.EntityType) ([]entitydto.EntityOption, error)
GetEntityOptions ...
Click to show internal directories.
Click to hide internal directories.