naming

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloudControlPropertyToTerraformAttribute

func CloudControlPropertyToTerraformAttribute(propertyName string) string

CloudControlPropertyToTerraformAttribute converts a Cloud Control 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 ParseCloudControlTypeName

func ParseCloudControlTypeName(typeName string) (string, string, string, error)

ParseCloudControlTypeName parses a Cloud Control resource type name into 3 parts - Organization, Service and Resource.

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

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

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