Documentation ¶
Index ¶
- func CfnToSdk(properties map[string]interface{}) map[string]interface{}
- func DiffToPatch(res *metadata.CloudAPIResource, types map[string]metadata.CloudAPIType, ...) ([]jsonpatch.JsonPatchOperation, error)
- func HasUppercaseAcronym(s string) bool
- func LowerAcronyms(s string) string
- func SanitizeCfnString(str string) string
- func SdkToCfn(res *metadata.CloudAPIResource, types map[string]metadata.CloudAPIType, ...) (map[string]interface{}, error)
- func ToCfnName(s string, lookupTable map[string]string) string
- func ToSdkName(s string) string
- func ToUpperCamel(s string) string
- type ConversionError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CfnToSdk ¶
CfnToSdk converts CloudFormation-shaped payload to Pulumi-SDK-shaped state. In particular, SDK properties are lowerCamelCase, while CloudFormation is usually (but not always) PascalCase.
func DiffToPatch ¶
func DiffToPatch(res *metadata.CloudAPIResource, types map[string]metadata.CloudAPIType, diff *resource.ObjectDiff) ([]jsonpatch.JsonPatchOperation, error)
DiffToPatch converts a Pulumi object diff to a CloudFormation-shaped patch operation slice. Update/add/delete operations are mapped to corresponding patch terms, and SDK properties are translated to respective CFN names.
func HasUppercaseAcronym ¶
HasUppercaseAcronym checks if a CamelCase string contains an Uppercase acronym by looking for runs of capitals longer than 2
func LowerAcronyms ¶
lowers the trailing chars of any uppercase acronyms
func SanitizeCfnString ¶
SanitizeCfnString ensures that a string from CFN docs meets the requirements for Pulumi schema strings.
func SdkToCfn ¶
func SdkToCfn(res *metadata.CloudAPIResource, types map[string]metadata.CloudAPIType, properties map[string]interface{}) (map[string]interface{}, error)
SdkToCfn converts Pulumi-SDK-shaped state to CloudFormation-shaped payload. In particular, SDK properties are lowerCamelCase, while CloudFormation is usually (but not always) PascalCase.
func ToCfnName ¶
ToCfnName converts a lowerCamelCase schema property name to the Cloud Formation property or attribute name either by looking up in the table if present or converting to PascalCase.
func ToSdkName ¶
ToSdkName converts a Cloud Formation property or attribute name to the lowerCamelCase convention that is used in Pulumi schema's properties.
func ToUpperCamel ¶
ToUpperCamel converts a string to UpperCamelCase.
Types ¶
type ConversionError ¶
type ConversionError struct { Type string Value interface{} }
func (*ConversionError) Error ¶
func (e *ConversionError) Error() string