service

package
v0.0.0-...-ac7271b Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserSvc

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

UserService

func NewUserSvc

func NewUserSvc(urepo *repository.UserRepo) *UserSvc

Instantiate new user Service

func (*UserSvc) CreateUser

func (s *UserSvc) CreateUser(ctx context.Context, dto *protoapi.UserDto) (*protoapi.UserDto, error)

Create new user

func (*UserSvc) DeleteUserByID

func (s *UserSvc) DeleteUserByID(ctx context.Context, id *wrappers.StringValue) (*wrappers.BoolValue, error)

Delete user by id

func (*UserSvc) GetUserByEmail

func (s *UserSvc) GetUserByEmail(ctx context.Context, email *wrappers.StringValue) (*protoapi.UserDto, error)

Get user by email

func (*UserSvc) GetUserByID

func (s *UserSvc) GetUserByID(ctx context.Context, id *wrappers.StringValue) (*protoapi.UserDto, error)

Get user by id

func (*UserSvc) ListUsers

func (s *UserSvc) ListUsers(ctx context.Context, e *empty.Empty) (*protoapi.UserDtoList, error)

Get all users

func (*UserSvc) UpdateUser

func (s *UserSvc) UpdateUser(ctx context.Context, dto *protoapi.UserDto) (*protoapi.UserDto, error)

Update user

Jump to

Keyboard shortcuts

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