funcs

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package funcs contains custom functions used for the HCL eval context.

Index

Constants

This section is empty.

Variables

View Source
var TimestampFunc = function.New(&function.Spec{
	Description: `Returns the current timestamp in RFC 3339 format.`,
	Params:      []function.Parameter{},
	Type:        function.StaticReturnType(cty.String),
	Impl: func(_ []cty.Value, _ cty.Type) (cty.Value, error) {
		return cty.StringVal(time.Now().Format(time.RFC3339)), nil
	},
})

TimestampFunc returns the current timestamp in RFC 3339 format.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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