functions

package
v0.0.0-...-581c726 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallFunction

func CallFunction(name string, args []interface{}) (interface{}, error)

func CallInstanceFunction

func CallInstanceFunction(name string, instance interface{}, args []interface{}) (interface{}, error)

func HasFunction

func HasFunction(name string) bool

func HasInstanceFunction

func HasInstanceFunction(t reflect.Type, name string) bool

func Init

func Init()

func RegisterFunction

func RegisterFunction(fn JsonFunction)

func RegisterMathFunctions

func RegisterMathFunctions()

func RegisterSemverFunctions

func RegisterSemverFunctions()

func RegisterStringFunctions

func RegisterStringFunctions()

Types

type JsonFunction

type JsonFunction struct {
	Name       string
	Args       []reflect.Type
	Body       interface{}
	WithError  bool
	IsInstance bool
	IsUnsafe   bool
	Deprecated bool
}

Jump to

Keyboard shortcuts

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