function

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: BSD-3-Clause Imports: 9 Imported by: 14 modules, 16 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleToSingleOutput

func HandleToSingleOutput(values interface{}) interface{}

func ListAllFunctions

func ListAllFunctions() []string

func Registry

func Registry(f Function)

Types

type Func

type Func interface {
	Eval(inputScope, outputScope data.Scope) ([]interface{}, error)
	String() string
}

type Function

type Function interface {
	GetName() string
	GetCategory() string
}

func GetFunction

func GetFunction(name string) (Function, error)

func GetFunctionByTag

func GetFunctionByTag(name string, tag string) (Function, error)

type FunctionExp

type FunctionExp struct {
	Name   string       `json:"name"`
	Params []*Parameter `json:"params"`
}

func (*FunctionExp) Eval

func (f *FunctionExp) Eval() (interface{}, error)

func (*FunctionExp) EvalWithData

func (f *FunctionExp) EvalWithData(data interface{}, inputScope data.Scope, resolver data.Resolver) (interface{}, error)

func (*FunctionExp) EvalWithScope

func (f *FunctionExp) EvalWithScope(inputScope data.Scope, resolver data.Resolver) (interface{}, error)

type Parameter

type Parameter struct {
	Value expr.Expr `json:"value"`
}

Jump to

Keyboard shortcuts

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