Documentation
¶
Overview ¶
Package approval holds pending recipe runs that an OPA policy flagged as require_approval, until an authorized actor approves or denies them. The store is the mechanism; whether approval is required and who may approve is decided by policy. The default store is in-memory with a TTL; runs not decided within the TTL expire.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Record ¶
type Record struct {
ID string `json:"id"`
Actor string `json:"actor"`
Recipe string `json:"recipe"`
Hosts []string `json:"hosts,omitempty"`
Reason string `json:"reason,omitempty"`
Status Status `json:"status"`
Approver string `json:"approver,omitempty"`
CreatedAt time.Time `json:"created_at"`
DecidedAt time.Time `json:"decided_at"`
}
Record is one pending run awaiting a decision.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store keeps pending runs in memory with a TTL. Safe for concurrent use.
func (*Store) Decide ¶
Decide marks a pending record approved or denied by approver. It errors if the record is missing or already decided.
Click to show internal directories.
Click to hide internal directories.