naming

package
v0.58.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrganizationNameAWS = "AWS"
)

Variables

This section is empty.

Functions

func CloudFormationPropertyToTerraformAttribute

func CloudFormationPropertyToTerraformAttribute(propertyName string) string

CloudFormationPropertyToTerraformAttribute converts a CloudFormation property name to a Terraform attribute name. For example `GlobalReplicationGroupDescription` -> `global_replication_group_description`.

func CreateTerraformTypeName

func CreateTerraformTypeName(org, svc, res string) string

CreateTerraformTypeName creates a Terraform resource type name from 3 parts - Organization, Service and Resource.

func ParseCloudFormationTypeName

func ParseCloudFormationTypeName(typeName string) (string, string, string, error)

ParseCloudFormationTypeName parses a CloudFormation resource type name into 3 parts - Organization, Service and Resource. See https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-typeName.

func ParseTerraformTypeName

func ParseTerraformTypeName(typeName string) (string, string, string, error)

ParseTerraformTypeName parses a Terraform resource type name into 3 parts - Organization, Service and Resource.

func Pluralize added in v0.0.6

func Pluralize(name string) string

Pluralize converts a name to its plural form. The inflection package is used as a first attempt to pluralize names, but exceptions to the rule are handled as follows:

  • '_plural' is appended to a name ending in 's' e.g. 'windows'
  • 's' is appended to a name ending in a number

func PluralizeWithCustomNameSuffix added in v0.0.6

func PluralizeWithCustomNameSuffix(name, suffix string) string

PluralizeWithCustomNameSuffix converts a name to its plural form similar to Pluralize, with the exception that a suffix can be passed in as an argument to be used only for names that are considered "custom" i.e. return true for isCustomName.

Types

This section is empty.

Jump to

Keyboard shortcuts

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