Service manages a list of todos.
| 15 | |
| 16 | // Service manages a list of todos. |
| 17 | type Service interface { |
| 18 | // CreateTodo adds a new todo to the todo list. |
| 19 | CreateTodo(ctx context.Context, text string) (string, error) |
| 20 | |
| 21 | // ListTodos returns the list of todos. |
| 22 | ListTodos(ctx context.Context) ([]Todo, error) |
| 23 | |
| 24 | // MarkAsDone marks a todo as done. |
| 25 | MarkAsDone(ctx context.Context, id string) error |
| 26 | } |
| 27 | |
| 28 | type service struct { |
| 29 | idgenerator IDGenerator |
no outgoing calls
no test coverage detected