Documentation
¶
Overview ¶
Package deploymentplan holds immutable environment-specific executable plans. Credential values and runtime selector values never enter this envelope.
Index ¶
- Constants
- Variables
- func Admit(ctx context.Context, source slug.Slug, reference string) error
- func DispatchConfig(ctx context.Context, org, source slug.Slug) (string, error)
- func Encode(plan Plan) ([]byte, string, error)
- func WithDispatch(ctx context.Context, org slug.Slug, targets []Target) context.Context
- func WithStep(ctx context.Context, step slug.Slug) context.Context
- type Admission
- type Input
- type Plan
- type Target
Constants ¶
View Source
const FormatVersion = 1
Variables ¶
View Source
var ErrInvalid = xerror.New(xerror.KindInvalidInput, "DEPLOYMENT_RESOLUTION_INVALID", "deployment resolution is missing, invalid or no longer usable")
Functions ¶
func DispatchConfig ¶
DispatchConfig requires every dispatched source to belong to the attempt.
func WithDispatch ¶
Types ¶
type Admission ¶
type Admission struct {
Step slug.Slug `json:"step"`
DataSource slug.Slug `json:"data_source"`
CredentialReference string `json:"credential_reference"`
}
func Admissions ¶
type Input ¶
type Input struct {
Key string `json:"key"`
Type model.RuntimeVariableValueType `json:"type"`
Value string `json:"value"`
Revision string `json:"revision"`
}
type Plan ¶
type Plan struct {
TemplateDigest string `json:"template_digest"`
ResolutionInputs map[string]odcs.ResolutionValue `json:"resolution_inputs,omitempty"`
RevalidatedFrom string `json:"revalidated_from,omitempty"`
Inputs []Input `json:"inputs,omitempty"`
LiteralValues []pipelinevars.LiteralLocation `json:"literal_values,omitempty"`
FormatVersion int `json:"format_version"`
Organization slug.Slug `json:"organization"`
Project slug.Slug `json:"project"`
Environment slug.Slug `json:"environment"`
CompiledDigest string `json:"compiled_digest"`
CompiledPlan json.RawMessage `json:"compiled_plan"`
Pipeline *pipelinespec.Pipeline `json:"pipeline"`
Targets []Target `json:"targets"`
}
Click to show internal directories.
Click to hide internal directories.