services

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 ...

func (*ServiceError) Error

func (se *ServiceError) Error() string

ServiceError implements error

type Services

type Services struct {
	ES entityservices.EntityServices
	DS data.Datastore
}

Services the business services

func NewServices

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) Do

func (s Services) Do(par1 int, par2 int) (int, error)

Do ... just for test mocking

func (Services) LoginUser

func (s Services) LoginUser(username string, pass string) (*models.User, error)

LoginUser check user and pwd

func (Services) UpdateUser

func (s Services) UpdateUser(username string, email string, role types.RoleType) (*models.User, error)

UpdateUser update user data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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