Documentation ¶
Index ¶
- func MakeHTTPHandler(s Service, logger log.Logger) http.Handler
- type CreateRequest
- type CreateResponse
- type DeleteRequest
- type DeleteResponse
- type GetByIDRequest
- type GetByIDResponse
- type GetListRequest
- type GetListResponse
- type Repository
- type Service
- type Task
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateRequest ¶
type CreateRequest struct {
Task *Task `json:"task,omitempty"`
}
type CreateResponse ¶
type DeleteRequest ¶
type DeleteResponse ¶
type DeleteResponse struct {
Err error `json:"error,omitempty"`
}
type GetByIDRequest ¶
type GetByIDResponse ¶
type GetListRequest ¶
type GetListRequest struct{}
type GetListResponse ¶
type Repository ¶
type Service ¶
type Service interface { Create(context.Context, *Task) (*Task, error) GetList(context.Context) []*Task GetByID(ctx context.Context, ID uuid.UUID) (*Task, error) Update(ctx context.Context, t *Task) (*Task, error) Delete(ctx context.Context, ID uuid.UUID) error }
func NewLoggingService ¶
NewLoggingService returns a new instance of a logging Service.
func NewService ¶
func NewService(repo Repository) Service
type UpdateRequest ¶
type UpdateRequest struct {
Task *Task `json:"task,omitempty"`
}
type UpdateResponse ¶
Click to show internal directories.
Click to hide internal directories.