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

Function NewService

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

NewService returns a new Service.

(idgenerator IDGenerator, store Store, events Events)

Source from the content-addressed store, hash-verified

87
88// NewService returns a new Service.
89func NewService(idgenerator IDGenerator, store Store, events Events) Service {
90 return &service{
91 idgenerator: idgenerator,
92 store: store,
93 events: events,
94 }
95}
96
97func (s service) CreateTodo(ctx context.Context, text string) (string, error) {
98 id, err := s.idgenerator.Generate()

Callers 7

InitializeAppFunction · 0.92
TestList_CreatesATodoFunction · 0.85
TestList_ListTodosFunction · 0.85
TestList_MarkAsDoneFunction · 0.85

Calls

no outgoing calls

Tested by 6

TestList_CreatesATodoFunction · 0.68
TestList_ListTodosFunction · 0.68
TestList_MarkAsDoneFunction · 0.68