user

package
v0.0.0-...-ad0da93 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package user contains user application services

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 user application service

func New

func New(udb model.UserDB, rbac model.RBACService, auth model.AuthService) *Service

New creates new user application service

func (*Service) Delete

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

Delete deletes a user

func (*Service) List

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

List returns list of users

func (*Service) Update

func (s *Service) Update(c echo.Context, u *Update) (*model.User, error)

Update updates user's contact information

func (*Service) View

func (s *Service) View(c echo.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