Documentation
¶
Overview ¶
Package stack contains the serialized and configurable state associated with an stack; or, in other words, a deployment target. It pertains to resources and deployment plans, but is a package unto itself.
Index ¶
- Constants
- Variables
- func DeserializeCheckpoint(chkpoint *apitype.CheckpointV3) (*deploy.Snapshot, error)
- func DeserializeDeploymentV3(deployment apitype.DeploymentV3) (*deploy.Snapshot, error)
- func DeserializeOperation(op apitype.OperationV2, dec config.Decrypter) (resource.Operation, error)
- func DeserializeProperties(props map[string]interface{}, dec config.Decrypter) (resource.PropertyMap, error)
- func DeserializePropertyValue(v interface{}, dec config.Decrypter) (resource.PropertyValue, error)
- func DeserializeResource(res apitype.ResourceV3, dec config.Decrypter) (*resource.State, error)
- func DeserializeUntypedDeployment(deployment *apitype.UntypedDeployment) (*deploy.Snapshot, error)
- func GetRootStackResource(snap *deploy.Snapshot) (*resource.State, error)
- func SerializeCheckpoint(stack tokens.QName, snap *deploy.Snapshot, sm secrets.Manager) (*apitype.VersionedCheckpoint, error)
- func SerializeDeployment(snap *deploy.Snapshot, sm secrets.Manager) (*apitype.DeploymentV3, error)
- func SerializeOperation(op resource.Operation, enc config.Encrypter) (apitype.OperationV2, error)
- func SerializeProperties(props resource.PropertyMap, enc config.Encrypter) (map[string]interface{}, error)
- func SerializePropertyValue(prop resource.PropertyValue, enc config.Encrypter) (interface{}, error)
- func SerializeResource(res *resource.State, enc config.Encrypter) (apitype.ResourceV3, error)
- func UnmarshalVersionedCheckpointToLatestCheckpoint(bytes []byte) (*apitype.CheckpointV3, error)
Constants ¶
const ( // DeploymentSchemaVersionOldestSupported is the oldest deployment schema that we // still support, i.e. we can produce a `deploy.Snapshot` from. This will generally // need to be at least one less than the current schema version so that old deployments can // be migrated to the current schema. DeploymentSchemaVersionOldestSupported = 1 )
Variables ¶
var ( // ErrDeploymentSchemaVersionTooOld is returned from `DeserializeDeployment` if the // untyped deployment being deserialized is too old to understand. ErrDeploymentSchemaVersionTooOld = fmt.Errorf("this stack's deployment is too old") // ErrDeploymentSchemaVersionTooNew is returned from `DeserializeDeployment` if the // untyped deployment being deserialized is too new to understand. ErrDeploymentSchemaVersionTooNew = fmt.Errorf("this stack's deployment version is too new") )
Functions ¶
func DeserializeCheckpoint ¶
func DeserializeCheckpoint(chkpoint *apitype.CheckpointV3) (*deploy.Snapshot, error)
DeserializeCheckpoint takes a serialized deployment record and returns its associated snapshot. Returns nil if there have been no deployments performed on this checkpoint.
func DeserializeDeploymentV3 ¶ added in v0.16.13
func DeserializeDeploymentV3(deployment apitype.DeploymentV3) (*deploy.Snapshot, error)
DeserializeDeploymentV3 deserializes a typed DeploymentV3 into a `deploy.Snapshot`.
func DeserializeOperation ¶ added in v0.15.0
func DeserializeProperties ¶
func DeserializeProperties(props map[string]interface{}, dec config.Decrypter) (resource.PropertyMap, error)
DeserializeProperties deserializes an entire map of deploy properties into a resource property map.
func DeserializePropertyValue ¶
func DeserializePropertyValue(v interface{}, dec config.Decrypter) (resource.PropertyValue, error)
DeserializePropertyValue deserializes a single deploy property into a resource property value.
func DeserializeResource ¶
DeserializeResource turns a serialized resource back into its usual form.
func DeserializeUntypedDeployment ¶ added in v0.15.0
func DeserializeUntypedDeployment(deployment *apitype.UntypedDeployment) (*deploy.Snapshot, error)
DeserializeUntypedDeployment deserializes an untyped deployment and produces a `deploy.Snapshot` from it. DeserializeDeployment will return an error if the untyped deployment's version is not within the range `DeploymentSchemaVersionCurrent` and `DeploymentSchemaVersionOldestSupported`.
func GetRootStackResource ¶
GetRootStackResource returns the root stack resource from a given snapshot, or nil if not found.
func SerializeCheckpoint ¶
func SerializeCheckpoint(stack tokens.QName, snap *deploy.Snapshot, sm secrets.Manager) (*apitype.VersionedCheckpoint, error)
SerializeCheckpoint turns a snapshot into a data structure suitable for serialization.
func SerializeDeployment ¶
SerializeDeployment serializes an entire snapshot as a deploy record.
func SerializeOperation ¶ added in v0.15.0
func SerializeProperties ¶
func SerializeProperties(props resource.PropertyMap, enc config.Encrypter) (map[string]interface{}, error)
SerializeProperties serializes a resource property bag so that it's suitable for serialization.
func SerializePropertyValue ¶
func SerializePropertyValue(prop resource.PropertyValue, enc config.Encrypter) (interface{}, error)
SerializePropertyValue serializes a resource property value so that it's suitable for serialization.
func SerializeResource ¶
SerializeResource turns a resource into a structure suitable for serialization.
func UnmarshalVersionedCheckpointToLatestCheckpoint ¶
func UnmarshalVersionedCheckpointToLatestCheckpoint(bytes []byte) (*apitype.CheckpointV3, error)
Types ¶
This section is empty.