extension

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute interface {
	Computed() bool
	DefaultValue() string
	Deprecation() string
	Description() string
	ElementType() string
	Field() *protogen.Field
	HasNestedType() bool
	IsPointer() bool
	MdDescription() string
	Name() string
	NeedsDefaultValue() bool
	Optional() bool
	Required() bool
	Schema() *pb.GoIdentity
	Sensitive() bool
	TypeValue() TypeValue
}

type Block

type Block interface {
	Clients() []string
	Description() string
	ExecFilename() string
	ExecGoName() string
	Filename() string
	GoName() string
	HasServiceClient() bool
	IsDataSource() bool
	IsResource() bool
	Model() Model
	ModelGoName() string
	Option() *pb.Block
	TerraformName() string
	Type() protoreflect.ExtensionType
	TypeName() string
}

Block is helper to gocode a terraform block.

//go:gocode mockery --name Block --output ../../mocks.

type Model

type Model interface {
	Attributes() []Attribute
	Message() *protogen.Message
	GoName() string
	PackageName() string
	FindAttribute(name string) (Attribute, bool)
	IsProvider() bool
	IsDatasource() bool
	IsResource() bool
}

type PackageData added in v0.3.0

type PackageData struct {
	ExecImportPath      protogen.GoImportPath
	ExecPackageName     protogen.GoPackageName
	PbImportPath        protogen.GoImportPath
	PbPackageName       protogen.GoPackageName
	ProviderImportPath  protogen.GoImportPath
	ProviderPackageName protogen.GoPackageName
}

type Provider

type Provider interface {
	AddDatasource(string, string)
	AddResource(string, string)
	Datasources() map[string]string
	Description() string
	ExecFilename() string
	ExecGoName() string
	Filename() string
	GoName() string
	HasServiceClient() bool
	Model() Model
	ModelGoName() string
	Option() *pb.Provider
	PackageData() PackageData
	Resources() map[string]string
	SetHasServiceClient(bool)
	TerraformName() string
}

Provider is helper to gocode a terraform provider.

//go:gocode mockery --name Provider --output ../../mocks.

type Synthesizer

type Synthesizer interface {
	Block(msg *protogen.Message, blockType protoreflect.ExtensionType) (Block, error)
	Attribute(field *protogen.Field, explicit bool) (Attribute, error)
	Datasource(msg *protogen.Message) (Block, error)
	FieldOption(desc protoreflect.FieldDescriptor) *pb.Attribute
	ProviderOption(desc protoreflect.MessageDescriptor) *pb.Provider
	MessageOption(desc protoreflect.MessageDescriptor, extType protoreflect.ExtensionType) *pb.Block
	Provider(msg *protogen.Message) (Provider, error)
	Resource(msg *protogen.Message) (Block, error)
	Model(msg *protogen.Message, explicit bool) (Model, error)
	Module() string
	MessagePackageName(msg *protogen.Message) protogen.GoPackageName
	MessageImportPath(msg *protogen.Message) protogen.GoImportPath
}

Synthesizer for synthesizing Provider or resource, datasource Block from proto files, messages.

//go:gocode mockery --name Synthesizer --output ../../mocks.

type TypeValue

type TypeValue interface {
	IsList() bool
	IsMap() bool
	IsNestedSingleObject() bool
	NestedTypeValue() string
	TerraformNative() bool
	Type() *pb.GoIdentity
	Value() *pb.GoIdentity
}

Jump to

Keyboard shortcuts

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