Documentation
¶
Overview ¶
Package proposals is the job that proposes what each enabled plugin proposes on its own units, such as GitHub's nudge. Every draft waits for its rule's approval policy. The drafts on GTD entries and Slack units come from the profile's workflows through draft.propose.
Index ¶
Constants ¶
const ReasonMoot = draft.WithdrawMoot
ReasonMoot is the discard reason of a plugin rule's draft on a unit whose closure is posted.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct {
Outbox Outbox
// Facts reads a unit's card facts; a plugin rule's draft on a unit whose closure is posted is withdrawn. nil: none.
Facts coregtd.Facts
Sources []Source
// Enabled says whether a provider's plugin is enabled; nil: every one is.
Enabled func(unit.ProviderID) bool
// Approval is the configured approval of a plugin's rules' drafts; nil: wait.
Approval func(unit.ProviderID) draft.Approval
// RepeatAfter is how long a sent, discarded or dry-run draft of a key keeps the key quiet.
RepeatAfter time.Duration
Clock port.Clock
Log func(format string, args ...any) // ids, rules, kinds and units; never text
// contains filtered or unexported fields
}
type Outbox ¶
type Outbox interface {
Propose(ctx context.Context, p outbox.Proposal) (draft.Draft, error)
List(ctx context.Context, f outbox.Filter) ([]draft.Draft, error)
Discard(ctx context.Context, id draft.ID, reason string) (draft.Draft, error)
}
Outbox is what the job needs of the outbox service (*outbox.Service).