Documentation ¶
Overview ¶
package helmette implements golang analogs for the constructs present within the helm template rendering environment. See also: - https://helm.sh/docs/chart_template_guide/function_list/ - http://masterminds.github.io/sprig/ - https://pkg.go.dev/text/template
Index ¶
- func Atoi(in string) (int, error)
- func Coalesce[T any](values ...T) T
- func Concat[T any](lists ...[]T) []T
- func Default[T any](default_, value T) T
- func DictTest[K comparable, V any](m map[K]V, key K) (V, bool)
- func Dig(m map[string]any, fallback any, path ...string) any
- func Empty(value any) bool
- func Fail(msg string)
- func Float64(in string) (float64, error)
- func FromJSON(data string) any
- func HasKey[K comparable, V any](m map[K]V, key K) bool
- func Keys[K comparable, V any](m map[K]V) []K
- func KindIs(kind string, v any) bool
- func KindOf(v any) string
- func Len(in any) int
- func Lower(in string) string
- func Merge[K comparable, V any](sources ...map[K]V) map[K]V
- func MustDuration(duration string) *metav1.Duration
- func MustFromJSON(data string) any
- func MustRegexMatch(pattern, s string) bool
- func MustToJSON(value any) string
- func Printf(format string, a ...any) string
- func RegexMatch(pattern, s string) bool
- func Required(msg string, value any)
- func SortAlpha(x []string)
- func ToJSON(value any) string
- func Tpl(tpl string, context any) string
- func TrimPrefix(prefix, s string) string
- func Trunc(length int, in string) string
- func TypeAssertion[T any](val any) T
- func TypeIs(typ string, v any) bool
- func TypeOf(v any) string
- func TypeTest[T any](val any) (T, bool)
- func Unset[K comparable, V any](d map[K]V, key K)
- func Unwrap[T any](from Values) T
- func Upper(in string) string
- type Chart
- type Dot
- type Release
- type Tuple2
- type Tuple3
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Coalesce ¶
func Coalesce[T any](values ...T) T
Coalesce is the go equivalent of sprig's `coalesce`. +gotohelm:builtin=coalesce
func Concat ¶
func Concat[T any](lists ...[]T) []T
Concat is the go equivalent of sprig's `concat`. +gotohelm:builtin=concat
func Default ¶
func Default[T any](default_, value T) T
Default is a go equivalent of sprig's `default`. +gotohelm:builtin=default
func DictTest ¶
func DictTest[K comparable, V any](m map[K]V, key K) (V, bool)
DictTest is an equivalent of `val, ok := map[key]` that is exercised as a function call rather than a special form of syntax. See also: "_shims.dicttest". func DictTest[K comparable, V any](m map[K]V, key K) TestResult[V] {
func Fail ¶
func Fail(msg string)
Fail is the go equivalent of sprig's `fail`. +gotohelm:builtin=fail
func HasKey ¶
func HasKey[K comparable, V any](m map[K]V, key K) bool
HasKey is the go equivalent of sprig's `hasKey`. +gotohelm:builtin=hasKey
func Keys ¶
func Keys[K comparable, V any](m map[K]V) []K
Keys is the go equivalent of sprig's `keys`. +gotohelm:builtin=keys
func Merge ¶
func Merge[K comparable, V any](sources ...map[K]V) map[K]V
Merge is a go equivalent of sprig's `merge`.
func MustDuration ¶
func MustFromJSON ¶
MustFromJSON is the go equivalent of sprig's `mustFromJson`. +gotohelm:builtin=mustFromJson
func MustRegexMatch ¶
MustRegexMatch is the go equivalent of sprig's `mustRegexMatch`. +gotohelm:builtin=mustRegexMatch
func MustToJSON ¶
MustToJSON is the go equivalent of sprig's `mustToJson`. +gotohelm:builtin=mustToJson
func RegexMatch ¶
RegexMatch is the go equivalent of sprig's `regexMatch`. +gotohelm:builtin=regexMatch
func SortAlpha ¶
func SortAlpha(x []string)
SortAlpha is the go equivalent of sprig's `sortAlpha` +gotohelm:builtin=sortAlpha
func TrimPrefix ¶
TrimPrefix is the go equivalent of sprig's `trimPrefix` +gotohelm:builtin=trimPrefix
func TypeAssertion ¶
TypeAssertion is an equivalent of `x.(type)` that is exercised as a function call rather than a special form of syntax. See also: "_shims.typeassertion".
func TypeTest ¶
TypeTest is an equivalent of `val, ok := x.(type)` that is exercised as a function call rather than a special form of syntax. See also: "_shims.typetest".
func Unset ¶
func Unset[K comparable, V any](d map[K]V, key K)
Unset is the go equivalent of sprig's `unset`. +gotohelm:builtin=unset
Types ¶
type Dot ¶
Dot is a representation of the "global" context or `.` in the execution of a helm template. See also: https://github.com/helm/helm/blob/3764b483b385a12e7d3765bff38eced840362049/pkg/chartutil/values.go#L137-L166