Documentation
¶
Overview ¶
Package operatorinbox projects durable grants into bounded, operator-safe records.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DisplayField ¶
type DisplayField = LabeledValue
DisplayField is one bounded provider-specific display value.
type Item ¶
type Item struct {
ID string `json:"id"`
Revision int64 `json:"revision"`
Client string `json:"client"`
Operation string `json:"operation"`
Status grants.Status `json:"status"`
RequestedAt time.Time `json:"requested_at"`
PendingExpiresAt time.Time `json:"pending_expires_at"`
ActiveExpiresAt *time.Time `json:"active_expires_at,omitempty"`
RequestedDurationSeconds int64 `json:"requested_duration_seconds"`
RequestedMaxUses usebudget.Limit `json:"requested_max_uses"`
MaxUses usebudget.Limit `json:"max_uses"`
UsedCount int `json:"used_count"`
ReservedCount int `json:"reserved_count"`
Reason string `json:"reason,omitempty"`
DecidedAt *time.Time `json:"decided_at,omitempty"`
DecidedBy string `json:"decided_by,omitempty"`
DecidedOnBehalfOf string `json:"decided_on_behalf_of,omitempty"`
Presentation Presentation `json:"presentation"`
}
Item is the only grant representation exposed by the operator HTTP API.
type LabeledValue ¶
LabeledValue is one bounded operator-facing display fact.
type Page ¶
type Page struct {
Items []Item `json:"items"`
NextCursor string `json:"next_cursor,omitempty"`
HasMore bool `json:"has_more"`
EventCursor string `json:"event_cursor,omitempty"`
}
Page is one bounded inbox result.
type Presentation ¶
type Presentation struct {
Risk Risk `json:"risk"`
Title string `json:"title"`
Summary string `json:"summary,omitempty"`
Target string `json:"target"`
Fields []DisplayField `json:"fields,omitempty"`
PlanHash string `json:"plan_hash,omitempty"`
Audit []AuditSummary `json:"audit,omitempty"`
}
Presentation is the provider-owned safe display projection.
type PresenterFunc ¶
PresenterFunc adapts a function to Presenter.
func (PresenterFunc) Present ¶
func (f PresenterFunc) Present(ctx context.Context, grant grants.Grant) (Presentation, error)
type Risk ¶
type Risk string
Risk is a provider-supplied display classification with a fixed vocabulary.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service joins the durable store with one broker-owned presenter.
Click to show internal directories.
Click to hide internal directories.