Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type ErrInvalidRequestBody ¶
type ErrInvalidRequestBody struct {
// contains filtered or unexported fields
}
func (ErrInvalidRequestBody) Error ¶
func (e ErrInvalidRequestBody) Error() string
type Middleware ¶
Middleware describes a Service middleware.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) Middleware
LoggingMiddleware takes a logger as a dependency and returns a service Middleware.
type Service ¶
type Service interface {
Save(context.Context, todo.Task) (*todo.Task, error)
List(context.Context) ([]todo.Task, error)
ToggleDone(ctx context.Context, id int64) error
Remove(ctx context.Context, id int64) error
Update(context.Context, todo.Task) (task *todo.Task, isCreated bool, err error)
}
Service is an application service that lets us interact with a list of tasks.
func NewService ¶
func NewService(repository todo.TaskRepository) Service
Click to show internal directories.
Click to hide internal directories.