tfgen

package
v2.23.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 46 Imported by: 51

Documentation

Overview

Pulling out some of the repeated strings tokens into constants would harm readability, so we just ignore the goconst linter's warning.

nolint: goconst

Index

Constants

This section is empty.

Variables

View Source
var AllLanguages = []Language{Golang, NodeJS, Python, CSharp}

Functions

func GenerateSchema added in v2.10.0

func GenerateSchema(info tfbridge.ProviderInfo, sink diag.Sink) (pschema.PackageSpec, error)

func LoadGoMod

func LoadGoMod() (*modfile.File, error)

func Main

func Main(pkg string, version string, prov tfbridge.ProviderInfo)

Main executes the TFGen process for the given package pkg and provider prov.

Types

type DocKind

type DocKind string

DocKind indicates what kind of entity's documentation is being requested.

const (
	// ResourceDocs indicates documentation pertaining to resource entities.
	ResourceDocs DocKind = "resources"
	// DataSourceDocs indicates documentation pertaining to data source entities.
	DataSourceDocs DocKind = "data-sources"
)

type GenerateOptions added in v2.10.0

type GenerateOptions struct {
	ModuleFormat string
}

type Generator added in v2.10.0

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

func NewGenerator added in v2.10.0

func NewGenerator(opts GeneratorOptions) (*Generator, error)

NewGenerator returns a code-generator for the given language runtime and package info.

func (*Generator) Generate added in v2.10.0

func (g *Generator) Generate() error

Generate creates Pulumi packages from the information it was initialized with.

type GeneratorOptions added in v2.10.0

type GeneratorOptions struct {
	Package            string
	Version            string
	Language           Language
	ProviderInfo       tfbridge.ProviderInfo
	Root               afero.Fs
	ProviderInfoSource il.ProviderInfoSource
	PluginHost         plugin.Host
	TerraformVersion   string
	Sink               diag.Sink
}

type Language added in v2.10.0

type Language string
const (
	Golang Language = "go"
	NodeJS Language = "nodejs"
	Python Language = "python"
	CSharp Language = "dotnet"
	Schema Language = "schema"
)

Jump to

Keyboard shortcuts

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