MCPcopy
hub / github.com/sagikazarmark/modern-go-application / Service

Interface Service

internal/app/mga/todo/service.go:17–26  ·  view source on GitHub ↗

Service manages a list of todos.

Source from the content-addressed store, hash-verified

15
16// Service manages a list of todos.
17type 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
28type service struct {
29 idgenerator IDGenerator

Callers 21

TestList_CreatesATodoFunction · 0.95
runCreateFunction · 0.65
CreateTodoMethod · 0.65
CreateTodoMethod · 0.65
CreateTodoMethod · 0.65
MakeCreateTodoEndpointFunction · 0.65
TestList_ListTodosFunction · 0.95
runListFunction · 0.65
TodosMethod · 0.65
ListTodosMethod · 0.65
ListTodosMethod · 0.65

Implementers 4

serviceinternal/app/mga/todo/service.go
loggingMiddlewareinternal/app/mga/todo/tododriver/middl
instrumentationMiddlewareinternal/app/mga/todo/tododriver/middl
grpcServerinternal/app/mga/todo/tododriver/trans

Calls

no outgoing calls

Tested by

no test coverage detected