compose

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Overview

Code generated by compose-gen. DO NOT EDIT.

Package compose compiles a parsed expression for evaluation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertBuiltInIntoFunction

func ConvertBuiltInIntoFunction(e *ast.Expr) (*ast.Expr, error)

ConvertBuiltInIntoFunction converts a BuiltIn Expr into a Function Expr.

func FuncImplements

func FuncImplements(i interface{}, typ reflect.Type) []interface{}

FuncImplements returns all the functions in the function tree that implements the provided type.

func GetMaker

func GetMaker(fnc *ast.Function) (*funcs.Maker, error)

GetMaker returns the function maker, given the function name and types of the parameters.

func NewBool

func NewBool(expr *ast.Expr) (funcs.Bool, error)

NewBool constructs a boolean function from a parsed expression.

func SetContext

func SetContext(f funcs.Bool, context *funcs.Context)

func Which

func Which(expr *ast.Expr) (types.Type, error)

Which returns the type that the expression will return.

Types

type Bool

type Bool interface {
	Eval(parser.Value) (bool, error)
}

Bool is an interface that represents a function, that given a value for a variable returns a boolean or an error.

func NewBoolFunc

func NewBoolFunc(f funcs.Bool) (Bool, error)

NewBoolFunc returns the same function that it was given, but that has been trimmed and which is ready for variable values and evaluation.

type Setter

type Setter interface {
	SetValue(parser.Value)
}

Setter is an interface that represents a variable in a function of which the value can be set.

Directories

Path Synopsis
Command compose-gen generates some of the code in the compose package.
Command compose-gen generates some of the code in the compose package.

Jump to

Keyboard shortcuts

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