Documentation ¶
Index ¶
- func AnyJSONToCtyValue(jsonStr []byte) (cty.Value, error)
- func ConvertCtyValueToInterface(val cty.Value) (interface{}, error)
- func EventBundleToCty(eventBundle map[string][]byte, pathDelim string) (map[string]cty.Value, error)
- func ParseEventVar(evalVars map[string]cty.Value, metaKey string) (string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyJSONToCtyValue ¶
AnyJSONToCtyValue converts an aribitrary json byte slice and converts to a corresponding cty.Value
NOTE: This method effectively parses the JSON string twice. Once via unmarshal called directly, then again via ctyjson.ImpliedType which runs a decoder. It is likely worth the time to write a decoder that directly takes the unmarshalled json and manually maps to cty values. This function is quite expensive as an overall portion of the runtime. Taking around 200-250µs for a single change event (around 20-25% of hops parsing time).
func ConvertCtyValueToInterface ¶
ConvertCtyValueToInterface converts a cty.Value to an interface{}.
Calls itself recursively to convert nested values. Does not cover all possible cty types, such as unknown, capsule, empty object, and empty tuple.
func EventBundleToCty ¶
Types ¶
This section is empty.