Documentation ¶
Index ¶
- func NewUserService(repo domain.UserRepository) domain.UserService
- type UserService
- func (svc *UserService) Create(params domain.UserCreateInput) (*domain.UserDetailOutput, error)
- func (svc *UserService) Destroy(id int) (*domain.UserDetailOutput, error)
- func (svc *UserService) List(params domain.UserListInput) ([]*domain.UserCompactOutput, error)
- func (svc *UserService) Show(id int) (*domain.UserDetailOutput, error)
- func (svc *UserService) Update(id int, params domain.UserUpdateInput) (*domain.UserDetailOutput, error)
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 ¶
func (svc *UserService) Create(params domain.UserCreateInput) (*domain.UserDetailOutput, error)
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 ¶
func (svc *UserService) List(params domain.UserListInput) ([]*domain.UserCompactOutput, error)
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
Click to show internal directories.
Click to hide internal directories.