Documentation
¶
Index ¶
- Variables
- type CreateRequest
- type CreateResponse
- type FindByIDRequest
- type FindByIDResponse
- type Repoer
- type Role
- type Service
- func (s *Service) Create(ctx context.Context, req CreateRequest) (CreateResponse, error)
- func (s *Service) FindByID(ctx context.Context, req FindByIDRequest) (FindByIDResponse, error)
- func (s *Service) SoftDeleteByID(ctx context.Context, req SoftDeleteByIDRequest) error
- func (s *Service) UpdateByID(ctx context.Context, req UpdateByIDRequest) (UpdateByIDResponse, error)
- type SoftDeleteByIDRequest
- type UpdateByIDRequest
- type UpdateByIDResponse
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInternal = errors.New("api: user: the user service encountered an unexpected condition that prevented it from fulfilling the request") ErrNotFoundByID = errors.New("api: user: could not find any user with provided ID") ErrInvalidRole = errors.New("api: user: role is not valid") )
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct {
User *User
}
type CreateResponse ¶
type CreateResponse struct {
User *User
}
type FindByIDRequest ¶
type FindByIDResponse ¶
type FindByIDResponse struct {
User *User
}
type Service ¶
type Service struct {
Repo Repoer
}
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, req CreateRequest) (CreateResponse, error)
func (*Service) FindByID ¶
func (s *Service) FindByID(ctx context.Context, req FindByIDRequest) (FindByIDResponse, error)
func (*Service) SoftDeleteByID ¶
func (s *Service) SoftDeleteByID(ctx context.Context, req SoftDeleteByIDRequest) error
func (*Service) UpdateByID ¶
func (s *Service) UpdateByID(ctx context.Context, req UpdateByIDRequest) (UpdateByIDResponse, error)
type SoftDeleteByIDRequest ¶
type UpdateByIDRequest ¶
type UpdateByIDResponse ¶
type UpdateByIDResponse struct {
User *User
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.