agentdraftstest

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Outbox

type Outbox struct {
	At time.Time
	// contains filtered or unexported fields
}

Outbox is the fake. Its zero value keeps no draft.

func (*Outbox) AgentAmend

func (o *Outbox) AgentAmend(_ context.Context, c outbox.Caller, id draft.ID, a outbox.Amendment) (draft.Draft, error)

func (*Outbox) AgentRead

func (o *Outbox) AgentRead(_ context.Context, c outbox.Caller, id draft.ID) (draft.Draft, []draft.Revision, error)

func (*Outbox) AgentWithdraw

func (o *Outbox) AgentWithdraw(_ context.Context, c outbox.Caller, id draft.ID, rev int64, reason string) (draft.Draft, error)

func (*Outbox) Callers

func (o *Outbox) Callers() []outbox.Caller

Callers are the callers of every call, in order.

func (*Outbox) Edit

func (o *Outbox) Edit(id draft.ID, text string)

Edit revises draft id as a person does, outside the agent API.

func (*Outbox) Get

func (o *Outbox) Get(id draft.ID) draft.Draft

Get is draft id as stored.

func (*Outbox) Put

func (o *Outbox) Put(d draft.Draft)

Put stores d and its first revision, by its proposer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL