v0.5.7 Latest Latest

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

Go to latest
Published: Nov 12, 2018 License: BSD-3-Clause Imports: 12 Imported by: 13




This section is empty.


This section is empty.


func ConvertToRef

func ConvertToRef(val interface{}) (*ref.MappingRef, error)

func ConvertToValue

func ConvertToValue(value interface{}, dataType funcexprtype.Type) (interface{}, error)

func HandleToSingleOutput

func HandleToSingleOutput(values interface{}) interface{}

func ListAllFunctions

func ListAllFunctions() []string

func Registry

func Registry(f Function)


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 ConvertToFunction

func ConvertToFunction(val interface{}) (*FunctionExp, error)

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)

func (*FunctionExp) Tostring added in v0.5.7

func (f *FunctionExp) Tostring() string

type Parameter

type Parameter struct {
	Function *FunctionExp      `json:"function"`
	Type     funcexprtype.Type `json:"type"`
	Value    interface{}       `json:"value"`

func (*Parameter) IsEmtpy

func (p *Parameter) IsEmtpy() bool

func (*Parameter) IsFunction

func (p *Parameter) IsFunction() bool

func (*Parameter) UnmarshalJSON

func (p *Parameter) UnmarshalJSON(paramData []byte) error

Jump to

Keyboard shortcuts

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