Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReplaceJSONPlaceholders ¶
func StringifyJSON ¶
Types ¶
type JSONProperty ¶
type JSONProperty struct { Name string Value expressions.Value }
JSONProperty represents a name-value pair for a JSON property where the value can be a static value or a pattern for a value fetched dynamically from the authorization JSON
type JSONValue ¶
type JSONValue struct { // Static value of the JSON property. Static interface{} // Resolves the value of the JSON property by fetching the pattern from the authorization JSON. Pattern string }
func (*JSONValue) IsTemplate ¶
IsTemplate tells whether a pattern is as a simple pattern or a template that mixes static value with variable placeholders that resolve to patterns. In case of a template that mixes no variable placeholder, but it contains nothing but a static string value, users should use `JSONValue.Static` instead of `JSONValue.Pattern`.
func (*JSONValue) ResolveFor ¶
ResolveFor resolves a value for a given input JSON. For static values, it returns the value right away; for patterns, it magically decides whether to process as a simple pattern or as a template that mixes static value with variable placeholders that resolve to patterns. In case of a template that mixes no variable placeholder, but it contains nothing but a static string value, users should use `JSONValue.Static` instead of `JSONValue.Pattern`.