Help us shape the future of Go! Take the 2026 Go Developer Survey

shared

package
v0.0.61 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DataSourceType = "DataSource"
	ResourceType   = "Resource"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	CfResource *ccschema.Resource
	TfType     string
}

func NewResource

func NewResource(resourceType, cfTypeSchemaFile string) (*Resource, error)

NewResource creates a Resource type from the corresponding resource's Cloud Control Schema file

type TemplateData

type TemplateData struct {
	AcceptanceTestFunctionPrefix  string
	AttributeNameMap              map[string]string
	CloudControlTypeName          string
	CreateTimeoutInMinutes        int
	DeleteTimeoutInMinutes        int
	FactoryFunctionName           string
	FrameworkDefaultsPackages     []string
	FrameworkPlanModifierPackages []string
	FrameworkValidatorsPackages   []string
	HasRequiredAttribute          bool
	HasUpdateMethod               bool
	ImportFrameworkTypes          bool
	ImportFrameworkJSONTypes      bool
	ImportFrameworkTimeTypes      bool
	ImportFrameworkValidator      bool
	ImportInternalDefaults        bool
	ImportInternalValidators      bool
	ImportRegexp                  bool
	PackageName                   string
	PrimaryIdentifier             []string
	RootPropertiesSchema          string
	SchemaDescription             string
	SchemaVersion                 int64
	TerraformTypeName             string
	UpdateTimeoutInMinutes        int
	WriteOnlyPropertyPaths        []string
	ReadOnlyPropertyPaths         []string
	CreateOnlyPropertyPaths       []string
}

func GenerateTemplateData

func GenerateTemplateData(ui cli.Ui, cfTypeSchemaFile, resType, tfResourceType, packageName string) (*TemplateData, error)

GenerateTemplateData generates the templates body from the Resource constructed from a Cloud Control type's Schema file. This method can be applied to both singular data source and resource types.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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