Documentation
¶
Index ¶
Constants ¶
View Source
const ( BlockFunction = "function" BlockArg = "arg" )
View Source
const (
InvokeFunctionName = "invoke"
)
Variables ¶
This section is empty.
Functions ¶
func FunctionSchema ¶
func FunctionSchema() *hcl.BodySchema
FunctionSchema is the schema for function blocks.
Types ¶
type Arg ¶
type Arg struct {
Name string // argument name
Description string // optional description
HasDefault bool // true if it has a default value
Default cty.Value // the default value
}
Arg represents an argument for a user-defined function.
type DynamicObject ¶
type Processor ¶
type Processor struct {
Functions map[string]*UserFunction
// contains filtered or unexported fields
}
Processor loads user functions and provides mechanisms to provide a root context. capable of invoking these functions.
func (*Processor) CheckUserFunctionRefs ¶
func (e *Processor) CheckUserFunctionRefs(expr hclsyntax.Node) hcl.Diagnostics
func (*Processor) Process ¶
func (e *Processor) Process(content *hcl.BodyContent) hcl.Diagnostics
Process processes the supplied body for function definitions.
func (*Processor) RootContext ¶
func (e *Processor) RootContext(values DynamicObject) *hcl.EvalContext
RootContext provides a root context with the supplied variables and functions that have the standard functions as well as the special `invoke` function to invoke user-defined functions.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
funcs/ipaddr
Package ipaddr is a fork of a subset of the Go standard "net" package which retains parsing behaviors from Go 1.16 or earlier.
|
Package ipaddr is a fork of a subset of the Go standard "net" package which retains parsing behaviors from Go 1.16 or earlier. |
Click to show internal directories.
Click to hide internal directories.