Documentation ¶
Overview ¶
Package stdlib implements the Terramate language functions.
Index ¶
- func AbspathFunc(basedir string) function.Function
- func Functions(basedir string) map[string]function.Function
- func HCLExpressionFunc() function.Function
- func Name(name string) string
- func NoFS(basedir string) map[string]function.Function
- func Regex() function.Function
- func TernaryFunc() function.Function
- func VendorFunc(basedir, vendordir project.Path, stream chan<- event.VendorRequest) function.Function
- func VersionMatch() function.Function
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbspathFunc ¶
AbspathFunc returns the `tm_abspath()` hcl function.
func Functions ¶
Functions returns all the Terramate default functions. The `basedir` must be an absolute path for an existent directory or it panics.
func HCLExpressionFunc ¶
HCLExpressionFunc returns the tm_hcl_expression function. This function interprets the `expr` argument as a string and returns the parsed expression.
func NoFS ¶ added in v0.4.1
NoFS returns all Terramate functions but excluding fs-related functions.
func Regex ¶
Regex is a copy of Terraform stdlib.RegexFunc but with cached compiled patterns.
func TernaryFunc ¶
TernaryFunc is the `tm_ternary` function implementation. The `tm_ternary(cond, expr1, expr2)` will return expr1 if `cond` evaluates to `true` and `expr2` otherwise.
func VendorFunc ¶
func VendorFunc(basedir, vendordir project.Path, stream chan<- event.VendorRequest) function.Function
VendorFunc returns the `tm_vendor` function. The basedir defines what tm_vendor will use to define the relative paths of vendored dependencies. The vendordir defines where modules are vendored inside the project. The stream defines the event stream for tm_vendor, one event is produced per successful function call.
func VersionMatch ¶
VersionMatch returns the `tm_version_match` function spec, which checks if the provided version matches the constraint. If the third argument is provided, then it uses the flags to customize the version matcher. At the moment, only the propery `allow_prereleases` is supported, which enables matchs against prereleases using default Semver ordering semantics.
Types ¶
This section is empty.