Documentation
¶
Overview ¶
Package todo is the domain of the quickstart service. It imports only the aggregate package, the stdlib and uuid, which depguard enforces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoTitle reports opening a Task without a title. ErrNoTitle = errors.New("todo: task needs a title") // ErrAlreadyOpened reports opening a Task twice. ErrAlreadyOpened = errors.New("todo: task already opened") // ErrAlreadyDone reports completing a Task twice. ErrAlreadyDone = errors.New("todo: task already done") )
Functions ¶
This section is empty.
Types ¶
type AssigneeNotified ¶
type AssigneeNotified struct{}
AssigneeNotified records that the assignee was told about the Task.
func (AssigneeNotified) EventType ¶
func (AssigneeNotified) EventType() string
EventType returns the permanent Event type of AssigneeNotified.
type Task ¶
Task is the Aggregate of one task. Its zero value is a task not opened yet.
func (*Task) MarkNotified ¶
func (t *Task) MarkNotified()
MarkNotified records that the assignee was notified. It is idempotent, because a Reactor may deliver the same event twice.
type TaskCompleted ¶
type TaskCompleted struct{}
TaskCompleted records that a Task is done.
func (TaskCompleted) EventType ¶
func (TaskCompleted) EventType() string
EventType returns the permanent Event type of TaskCompleted.
type TaskOpened ¶
TaskOpened records a new Task.
func (TaskOpened) EventType ¶
func (TaskOpened) EventType() string
EventType returns the permanent Event type of TaskOpened.