Documentation
¶
Overview ¶
Package plan builds, hashes, saves and verifies immutable deployment plans.
Index ¶
Constants ¶
View Source
const Schema = "forge.deploy.plan/v1"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Plan ¶
type Plan struct {
Schema string `json:"schema"`
Hash string `json:"hash"`
CreatedAt time.Time `json:"created_at"`
TTL time.Duration `json:"ttl"`
Project string `json:"project"`
Environment string `json:"environment"`
TargetName string `json:"target"`
Target spec.Target `json:"target_spec"`
Deployment *model.Deployment `json:"deployment"`
Files map[string]string `json:"files"`
Inputs map[string]string `json:"inputs"`
Images []model.Image `json:"images"`
Operations []Operation `json:"operations"`
ObservedIDs map[string][]string `json:"observed_ids,omitempty"`
Snapshot state.Snapshot `json:"snapshot"`
Diagnostics output.Diagnostics `json:"diagnostics"`
}
func (*Plan) Canonical ¶
Canonical is the plan without Hash and CreatedAt, with every SecretRef reduced to name and resolver. encoding/json sorts map keys, and struct fields keep declaration order, so the output is stable.
func (*Plan) ComputeHash ¶
Click to show internal directories.
Click to hide internal directories.