2019-01-15 19:12:26 +00:00
|
|
|
package hclspecutils
|
2018-08-07 05:27:47 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/zclconf/go-cty/cty/function"
|
|
|
|
"github.com/zclconf/go-cty/cty/function/stdlib"
|
|
|
|
)
|
|
|
|
|
|
|
|
// specFuncs exposes the stdlib functions.
|
|
|
|
var specFuncs = map[string]function.Function{
|
|
|
|
"abs": stdlib.AbsoluteFunc,
|
|
|
|
"coalesce": stdlib.CoalesceFunc,
|
|
|
|
"concat": stdlib.ConcatFunc,
|
|
|
|
"hasindex": stdlib.HasIndexFunc,
|
|
|
|
"int": stdlib.IntFunc,
|
|
|
|
"jsondecode": stdlib.JSONDecodeFunc,
|
|
|
|
"jsonencode": stdlib.JSONEncodeFunc,
|
|
|
|
"length": stdlib.LengthFunc,
|
|
|
|
"lower": stdlib.LowerFunc,
|
|
|
|
"max": stdlib.MaxFunc,
|
|
|
|
"min": stdlib.MinFunc,
|
|
|
|
"reverse": stdlib.ReverseFunc,
|
|
|
|
"strlen": stdlib.StrlenFunc,
|
|
|
|
"substr": stdlib.SubstrFunc,
|
|
|
|
"upper": stdlib.UpperFunc,
|
|
|
|
}
|