Documentation
¶
Overview ¶
Package agentdraftstest is a fake of the outbox's agent API, which keeps drafts in memory and answers by their state as the outbox does: a session reaches a draft on its units or proposed from one of them; it revises or withdraws one of those of turn or session origin, held or failed, at the draft's rev, at least 1, stamped with its session.
Index ¶
- type Outbox
- func (o *Outbox) AgentAmend(_ context.Context, c outbox.Caller, id draft.ID, a outbox.Amendment) (draft.Draft, error)
- func (o *Outbox) AgentRead(_ context.Context, c outbox.Caller, id draft.ID) (draft.Draft, []draft.Revision, error)
- func (o *Outbox) AgentWithdraw(_ context.Context, c outbox.Caller, id draft.ID, rev int64, reason string) (draft.Draft, error)
- func (o *Outbox) Callers() []outbox.Caller
- func (o *Outbox) Edit(id draft.ID, text string)
- func (o *Outbox) Get(id draft.ID) draft.Draft
- func (o *Outbox) Put(d draft.Draft)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Outbox ¶
Outbox is the fake. Its zero value keeps no draft.