user

package
v0.0.0-...-b033284 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service represents the user application service

func NewUserService

func NewUserService(userRepo model.UserRepo, auth model.AuthService, rbac model.RBACService) *Service

NewUserService create a new user application service

func (*Service) Delete

func (s *Service) Delete(c *gin.Context, id int) error

Delete deletes a user

func (*Service) List

func (s *Service) List(c *gin.Context, p *model.Pagination) ([]model.User, error)

List returns list of users

func (*Service) Update

func (s *Service) Update(c *gin.Context, update *Update) (*model.User, error)

Update updates user's contact information

func (*Service) View

func (s *Service) View(c *gin.Context, id int) (*model.User, error)

View returns single user

type Update

type Update struct {
	ID        int
	FirstName *string
	LastName  *string
	Mobile    *string
	Phone     *string
	Address   *string
}

Update contains user's information used for updating

Jump to

Keyboard shortcuts

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