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