Documentation ¶
Overview ¶
Package task describes task domain.
Index ¶
Constants ¶
View Source
const ( Active = Status("") Canceled = Status("canceled") Done = Status("done") Expired = Status("expired") )
Available task statuses.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct { Identity Value CreatedAt time.Time `json:"createdAt"` Status Status `json:"status,omitempty"` ClosedAt *time.Time `json:"closedAt,omitempty"` }
Entity is an identified task entity.
type Finder ¶
type Finder interface { Find(context.Context) []Entity FindByID(context.Context, Identity) (Entity, error) }
Finder finds tasks.
type Finisher ¶
type Finisher interface { Cancel(context.Context, Identity) error Finish(context.Context, Identity) error }
Finisher closes tasks.
type Status ¶
type Status string
Status describes task state.
func (Status) JSONSchema ¶
JSONSchema exposes Status JSON schema, implements jsonschema.Exposer.
Click to show internal directories.
Click to hide internal directories.