Documentation
¶
Overview ¶
Package skips keeps the workflows the user stopped on one unit: the workflow plans nothing there until the user undoes it, and its drafts held there are withdrawn.
Index ¶
- type Drafts
- type Service
- func (s *Service) Of(ctx context.Context, u unit.Unit) ([]string, error)
- func (s *Service) Skip(ctx context.Context, workflow string, u unit.Unit) error
- func (s *Service) Skipped(ctx context.Context, workflow string, u unit.Unit) (bool, error)
- func (s *Service) Unskip(ctx context.Context, workflow string, u unit.Unit) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Drafts ¶
type Drafts interface {
List(ctx context.Context, f outbox.Filter) ([]draft.Draft, error)
Withdraw(ctx context.Context, id draft.ID, reason string) (draft.Draft, error)
}
Drafts are the Outbox's drafts a skip withdraws.
type Service ¶
type Service struct {
Store Store
Drafts Drafts
Clock port.Clock
// contains filtered or unexported fields
}
Service skips workflows on units. It reads the store once and keeps the skips in memory after, since it is their only writer.