Documentation ¶
Overview ¶
Package diner provides the use case for diner
Package diner provides the use case for diner ¶
Package diner provides the use case for diner
Index ¶
- type NewDiner
- type PaginationResultDiner
- type Service
- func (s *Service) Create(ctx context.Context, diner *NewDiner) (*dinerDomain.Diner, error)
- func (s *Service) Delete(ctx context.Context, id int64) error
- func (s *Service) GetAll(ctx context.Context, page int64, limit int64) (*PaginationResultDiner, error)
- func (s *Service) GetByID(ctx context.Context, id int64) (*dinerDomain.Diner, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NewDiner ¶
type NewDiner struct { Name string `json:"name" example:"Mr. Smith"` TableNumber int `json:"table_no" example:"101"` }
NewDiner is a struct that contains the data for a new diner
type PaginationResultDiner ¶
type PaginationResultDiner struct { Data *[]domainDiner.Diner Total int64 Limit int64 Current int64 NextCursor uint PrevCursor uint NumPages int64 }
PaginationResultDiner is a struct that contains the pagination result for diner
type Service ¶
type Service struct {
DinerRepository repository.Diners
}
Service is a struct that contains the repository implementation for diner use case
Click to show internal directories.
Click to hide internal directories.