Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadDatabaseSpecs ¶
LoadDatabaseSpecs loads all jobs from the database into specs keyed by alias.
Types ¶
type CallbackSpec ¶
type Diff ¶
Diff captures the comparison between desired and existing specs.
type JobSpec ¶
type JobSpec struct {
Alias string `json:"alias"`
Labels map[string]string `json:"labels"`
Annotations map[string]string `json:"annotations"`
// Remediation participates in diffing because it is ENFORCED policy, not
// documentation: it is what resolves the agent's effective playbook. A
// remediation-only change that rendered as "no changes" would let an approver
// wave through a policy edit believing nothing changed — and the same diff is
// what an ApprovalRequest shows a human.
Remediation *schema.MetadataRemediation `json:"remediation,omitempty"`
Trigger TriggerSpec `json:"trigger"`
Callbacks []CallbackSpec `json:"callbacks"`
Steps []StepSpec `json:"steps"`
}
JobSpec captures the fields that participate in diffing.
func FromDefinition ¶
func FromDefinition(def *schema.Definition) JobSpec
FromDefinition normalises a job definition into a JobSpec.
type TriggerSpec ¶
Click to show internal directories.
Click to hide internal directories.