generator

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalImports

type AdditionalImports struct {
	DefaultsString  bool
	DefaultsInt64   bool
	DefaultsFloat64 bool
	DefaultsBool    bool

	ValidatorString  bool
	ValidatorInt64   bool
	ValidatorFloat64 bool

	PlanModifier        bool
	PlanModifierString  bool
	PlanModifierInt64   bool
	PlanModifierFloat64 bool
	PlanModifierBool    bool
}

type Data

type Data struct {
	Group             string
	Version           string
	Resource          string
	Kind              string
	ResourceName      string
	PackageName       string
	ModuleName        string
	AdditionalImports AdditionalImports
	SpecProperties    []*Property
	StatusProperties  []*Property
}

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(config *config.Config) *Generator

func (*Generator) Generate

func (g *Generator) Generate() error

type Property

type Property struct {
	Name              string
	TFName            string // Terraform argument name is snake case
	Description       string
	FieldName         string
	GoType            string
	ArgumentType      string
	ElementType       string
	Required          bool
	Optional          bool
	Computed          bool
	Default           string
	ValidatorsType    string
	Validators        []string
	PlanModifiersType string
	PlanModifiers     []string

	Properties []*Property
}

Jump to

Keyboard shortcuts

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