service

package
v0.0.0-...-4857525 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: MIT Imports: 2 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 defines service structure

func NewService

func NewService(db *storage.Storage) *Service

NewService creates new service instance

func (*Service) AddNewUser

func (s *Service) AddNewUser(user *model.User) error

AddNewUser handles add new user

func (*Service) DeleteUserByID

func (s *Service) DeleteUserByID(userID int) error

DeleteUserByID handles delete user

func (*Service) GetAllUsers

func (s *Service) GetAllUsers() ([]*model.User, error)

GetAllUsers handles get user by id

func (*Service) GetUserByID

func (s *Service) GetUserByID(userID int) (*model.User, error)

GetUserByID handles get users

func (*Service) ReplaceUser

func (s *Service) ReplaceUser(user *model.User) error

ReplaceUser handles update user

func (*Service) UpdateUser

func (s *Service) UpdateUser(user *model.User) error

UpdateUser handles update user

Jump to

Keyboard shortcuts

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