user

package
v0.0.0-...-555e775 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: MIT Imports: 5 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 *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, u *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