naming

package
v0.0.0-...-f38f0d9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CfnToSdk

func CfnToSdk(properties map[string]interface{}) map[string]interface{}

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

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

func HasUppercaseAcronym(s string) bool

HasUppercaseAcronym checks if a CamelCase string contains an Uppercase acronym by looking for runs of capitals longer than 2

func LowerAcronyms

func LowerAcronyms(s string) string

lowers the trailing chars of any uppercase acronyms

func SanitizeCfnString

func SanitizeCfnString(str string) string

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

func ToCfnName(s string, lookupTable map[string]string) string

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

func ToSdkName(s string) string

ToSdkName converts a Cloud Formation property or attribute name to the lowerCamelCase convention that is used in Pulumi schema's properties.

func ToUpperCamel

func ToUpperCamel(s string) string

ToUpperCamel converts a string to UpperCamelCase.

Types

type ConversionError

type ConversionError struct {
	Type  string
	Value interface{}
}

func (*ConversionError) Error

func (e *ConversionError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL