Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware func(TodoService) TodoService
Middleware describes a service middleware.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) Middleware
LoggingMiddleware takes a logger as a dependency and returns a TodoService Middleware.
type TodoService ¶
type TodoService interface { Get(ctx context.Context) (t []io.Todo, error error) Add(ctx context.Context, todo io.Todo) (t io.Todo, error error) SetComplete(ctx context.Context, id string) (error error) RemoveComplete(ctx context.Context, id string) (error error) Delete(ctx context.Context, id string) (error error) }
TodoService describes the service.
func New ¶
func New(middleware []Middleware) TodoService
New returns a TodoService with all of the expected middleware wired in.
func NewBasicTodoService ¶
func NewBasicTodoService() TodoService
NewBasicTodoService returns a naive, stateless implementation of TodoService.
Click to show internal directories.
Click to hide internal directories.