tools

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Version is the version of the API
	Version = versionV1Beta1

	// ResourcePrefix is the prefix of the resource
	ResourcePrefix = "flexibleengine"

	// ModulePath is the path of the module
	ModulePath = "github.com/FlexibleEngineCloud/provider-flexibleengine"
)

VersionV1Beta1 is used to signify that the resource has been tested and external name configured

Variables

This section is empty.

Functions

func ExtractorParamPathfunc

func ExtractorParamPathfunc(isStatus bool, sourceAttrs ...string) xpref.ExtractValueFn

ExtractorParamPathfunc extracts the value of `sourceAttrs`

func GenerateExtractor

func GenerateExtractor(isStatus bool, sourceAttrs ...string) string

GenerateExtractor generates the extractor path. Extracts the value of `sourceAttrs` from `spec.forProvider` allowing nested parameters. If `isStatus` is set, then referenced param is retrieved from the status, if not, it's extracted from the spec. An example argument to GenerateExtractor is `key`, if `spec.forProvider.key` is to be extracted from the referred resource. Other examples are `"network", "0", "id"` is converted to `spec.forProvider.network[0].id`

func GenerateType

func GenerateType(module, _type string) string

GenerateType generates the type name for a given module and type. For example, GenerateType("vpc", "VPC") will return "github.com/FlexibleEngineCloud/provider-flexibleengine/apis/vpc/v1beta1.VPC"

func RemoveGroup

func RemoveGroup(name []string) string

RemoveGroup removes the group from the resource name For example, RemoveGroup("vpc_subnet") will return "subnet"

func RemovePrefix

func RemovePrefix(name string) string

RemovePrefix removes the prefix from the resource name For example, RemovePrefix("flexibleengine_vpc_subnet") will return "vpc_subnet"

func RemoveVersion

func RemoveVersion(name string) []string

RemoveVersion removes the version from the resource name For example, RemoveVersion("flexibleengine_vpc_subnet_v1") will return "flexibleengine_vpc_subnet"

Types

This section is empty.

Jump to

Keyboard shortcuts

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