github.com/hernad/nomad@v1.6.112/helper/pluginutils/hclspecutils/spec_funcs.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 package hclspecutils 5 6 import ( 7 "github.com/zclconf/go-cty/cty/function" 8 "github.com/zclconf/go-cty/cty/function/stdlib" 9 ) 10 11 // specFuncs exposes the stdlib functions. 12 var specFuncs = map[string]function.Function{ 13 "abs": stdlib.AbsoluteFunc, 14 "coalesce": stdlib.CoalesceFunc, 15 "concat": stdlib.ConcatFunc, 16 "hasindex": stdlib.HasIndexFunc, 17 "int": stdlib.IntFunc, 18 "jsondecode": stdlib.JSONDecodeFunc, 19 "jsonencode": stdlib.JSONEncodeFunc, 20 "length": stdlib.LengthFunc, 21 "lower": stdlib.LowerFunc, 22 "max": stdlib.MaxFunc, 23 "min": stdlib.MinFunc, 24 "reverse": stdlib.ReverseFunc, 25 "strlen": stdlib.StrlenFunc, 26 "substr": stdlib.SubstrFunc, 27 "upper": stdlib.UpperFunc, 28 }