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

Interface Store

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

Store provides todo persistence.

Source from the content-addressed store, hash-verified

39
40// Store provides todo persistence.
41type Store interface {
42 // Store stores a todo.
43 Store(ctx context.Context, todo Todo) error
44
45 // All returns all todos.
46 All(ctx context.Context) ([]Todo, error)
47
48 // Get returns a single todo by its ID.
49 Get(ctx context.Context, id string) (Todo, error)
50}
51
52// NotFoundError is returned if a todo cannot be found.
53type NotFoundError struct {

Callers 7

CreateTodoMethod · 0.65
MarkAsDoneMethod · 0.65
AllMethod · 0.65
ListTodosMethod · 0.65
TestHandlerFunction · 0.65
GetMethod · 0.65
MarkAsDoneMethod · 0.65

Implementers 2

InMemoryStoreinternal/app/mga/todo/store.go
ReadOnlyStoreinternal/app/mga/todo/store.go

Calls

no outgoing calls

Tested by

no test coverage detected