iac

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderDockerfiles

func RenderDockerfiles(ctx solution.Solution) ([]kio.File, error)

RenderDockerfiles is a temporary workaround for rendering trivial Dockerfiles for resources. Ideally this isn't explicit but instead handled by a template in some fashion.

func VariablesFromGraph

func VariablesFromGraph(g construct.Graph) (variables, error)

Types

type Arg

type Arg struct {
	Name    string
	Type    string
	Wrapper WrapperType
}

type ListMarshaller

type ListMarshaller interface {
	List() []any
	String() string
	Append(val any)
}

type MapMarshaller

type MapMarshaller interface {
	Map() map[string]any
	String() string
	SetKey(val any)
}

type PackageJsonFile

type PackageJsonFile struct {
	Dependencies    map[string]string
	DevDependencies map[string]string
	OtherFields     map[string]json.RawMessage
}

func (*PackageJsonFile) Clone

func (f *PackageJsonFile) Clone() kio.File

func (*PackageJsonFile) Merge

func (f *PackageJsonFile) Merge(other *PackageJsonFile)

func (*PackageJsonFile) Path

func (f *PackageJsonFile) Path() string

func (*PackageJsonFile) UnmarshalJSON

func (f *PackageJsonFile) UnmarshalJSON(b []byte) error

func (*PackageJsonFile) WriteTo

func (f *PackageJsonFile) WriteTo(w io.Writer) (n int64, err error)

type Plugin

type Plugin struct {
	Config *PulumiConfig
	KB     knowledgebase.TemplateKB
}

func (Plugin) Name

func (p Plugin) Name() string

func (Plugin) Translate

func (p Plugin) Translate(sol solution.Solution) ([]kio.File, error)

type PropertyTemplateData

type PropertyTemplateData struct {
	Resource construct.ResourceId
	Object   string
	Input    templateInputArgs
}

type PulumiConfig

type PulumiConfig struct {
	AppName string
}

type ResourceTemplate

type ResourceTemplate struct {
	Name              string
	Imports           []string
	OutputType        string
	Template          *template.Template
	PropertyTemplates map[string]*template.Template
	Args              map[string]Arg
	Path              string
	Exports           map[string]*template.Template
	ImportResource    *template.Template
}

type TemplatesCompiler

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

func (*TemplatesCompiler) AddExtraResources

func (tc *TemplatesCompiler) AddExtraResources(r construct.ResourceId) error

func (TemplatesCompiler) GetPackageJSON

func (tc TemplatesCompiler) GetPackageJSON(v construct.ResourceId) (*PackageJsonFile, error)

func (TemplatesCompiler) NewAppliedOutput

func (tc TemplatesCompiler) NewAppliedOutput(ref construct.PropertyRef, name string) appliedOutput

func (TemplatesCompiler) PackageJSON

func (tc TemplatesCompiler) PackageJSON() (*PackageJsonFile, error)

func (*TemplatesCompiler) ParseTemplate

func (tc *TemplatesCompiler) ParseTemplate(name string, r io.Reader) (*ResourceTemplate, error)

func (*TemplatesCompiler) PropertyRefValue

func (tc *TemplatesCompiler) PropertyRefValue(ref construct.PropertyRef) (any, error)

func (*TemplatesCompiler) RenderImports

func (tc *TemplatesCompiler) RenderImports(out io.Writer) error

func (*TemplatesCompiler) RenderResource

func (tc *TemplatesCompiler) RenderResource(out io.Writer, rid construct.ResourceId) error

func (*TemplatesCompiler) ResourceTemplate

func (tc *TemplatesCompiler) ResourceTemplate(id construct.ResourceId) (*ResourceTemplate, error)

type TsList

type TsList []any

func (TsList) String

func (l TsList) String() string

type TsMap

type TsMap map[string]any

func (TsMap) String

func (m TsMap) String() string

type WrapperType

type WrapperType string
const (
	TemplateWrapper       WrapperType = "TemplateWrapper"
	CamelCaseWrapper      WrapperType = "CamelCaseWrapper"
	LowerCamelCaseWrapper WrapperType = "LowerCamelCaseWrapper"
	ModelCaseWrapper      WrapperType = "ModelCaseWrapper"
)

Jump to

Keyboard shortcuts

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