lang

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2019 License: MIT Imports: 4 Imported by: 28

Documentation

Index

Constants

View Source
const (
	FluxCompilerType = "flux"
	SpecCompilerType = "spec"
	ASTCompilerType  = "ast"
)

Variables

This section is empty.

Functions

func AddCompilerMappings

func AddCompilerMappings(mappings flux.CompilerMappings) error

AddCompilerMappings adds the Flux specific compiler mappings.

Types

type ASTCompiler added in v0.18.0

type ASTCompiler struct {
	AST *ast.Package `json:"ast"`
}

ASTCompiler implements Compiler by producing a Spec from an AST.

func (ASTCompiler) Compile added in v0.18.0

func (c ASTCompiler) Compile(ctx context.Context) (*flux.Spec, error)

func (ASTCompiler) CompilerType added in v0.18.0

func (ASTCompiler) CompilerType() flux.CompilerType

type FluxCompiler

type FluxCompiler struct {
	Query string `json:"query"`
}

FluxCompiler compiles a Flux script into a spec.

func (FluxCompiler) Compile

func (c FluxCompiler) Compile(ctx context.Context) (*flux.Spec, error)

func (FluxCompiler) CompilerType

func (c FluxCompiler) CompilerType() flux.CompilerType

type SpecCompiler

type SpecCompiler struct {
	Spec *flux.Spec `json:"spec"`
}

SpecCompiler implements Compiler by returning a known spec.

func (SpecCompiler) Compile

func (c SpecCompiler) Compile(ctx context.Context) (*flux.Spec, error)

func (SpecCompiler) CompilerType

func (c SpecCompiler) CompilerType() flux.CompilerType

Jump to

Keyboard shortcuts

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