service

package
v0.0.0-...-6b8b621 Latest Latest
Warning

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

Go to latest
Published: May 2, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserService

func NewUserService(repo domain.UserRepository) domain.UserService

NewUserService is a function to initialize a UserService instance

Types

type UserService

type UserService struct {
	Repo domain.UserRepository
}

UserService is a struct to wrap service for User

func (*UserService) Create

Create is a service for creating a new user

func (*UserService) Destroy

func (svc *UserService) Destroy(id int) (*domain.UserDetailOutput, error)

Destroy is a service for destroying an user

func (*UserService) List

All is a service for showing users

func (*UserService) Show

func (svc *UserService) Show(id int) (*domain.UserDetailOutput, error)

Show is a service for showing a user by ID

func (*UserService) Update

func (svc *UserService) Update(id int, params domain.UserUpdateInput) (*domain.UserDetailOutput, error)

Update is a service for updating an user

Jump to

Keyboard shortcuts

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