Documentation
¶
Overview ¶
Package operatorv1 defines the provider-neutral Operator V1 domain contract.
Index ¶
Constants ¶
View Source
const APIVersion = "brokerkit.io/operator/v1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApprovalBounds ¶
type Constraints ¶
type Decision ¶
type Decision struct {
ExpectedRevision int64 `json:"expected_revision"`
IdempotencyKey string `json:"idempotency_key"`
OnBehalfOf string `json:"on_behalf_of,omitempty"`
Constraints *Constraints `json:"constraints,omitempty"`
}
type Descriptor ¶
type Descriptor struct {
APIVersion string `json:"api_version"`
}
type ErrorEnvelope ¶
type ErrorEnvelope struct {
Error Error `json:"error"`
}
type EventStream ¶
EventStream is one source event stream. Receive blocks until an event or error.
type Presentation ¶
type Request ¶
type Request struct {
ID string `json:"id"`
Revision int64 `json:"revision"`
Requester string `json:"requester"`
Operation string `json:"operation"`
Status grants.Status `json:"status"`
RequestedAt time.Time `json:"requested_at"`
PendingExpiresAt *time.Time `json:"pending_expires_at,omitempty"`
ActiveExpiresAt *time.Time `json:"active_expires_at,omitempty"`
RequestedDurationSeconds int64 `json:"requested_duration_seconds"`
RequestedMaxUses usebudget.Limit `json:"requested_max_uses"`
GrantedMaxUses usebudget.Limit `json:"granted_max_uses"`
UsedCount int `json:"used_count"`
RequestReason string `json:"request_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"`
AllowedActions []Action `json:"allowed_actions"`
ApprovalBounds *ApprovalBounds `json:"approval_bounds,omitempty"`
}
type Source ¶
type Source interface {
Discover(context.Context) (Descriptor, error)
List(context.Context, Query) (Page, error)
Get(context.Context, string) (Request, error)
Decide(context.Context, string, Action, Decision) (Request, error)
Watch(context.Context, string) (EventStream, error)
Health(context.Context) error
}
Source is the complete provider-neutral trusted-host client contract.
Click to show internal directories.
Click to hide internal directories.