tfgen

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 47 Imported by: 282

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

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

type GenerateOptions struct {
	ModuleFormat string
}

type Generator

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

func NewGenerator

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

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

func (*Generator) Generate

func (g *Generator) Generate() error

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

type GeneratorOptions

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

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