Documentation
¶
Index ¶
- func Base64Decode(_ context.Context, arg runtime.Value) (runtime.Value, error)
- func Base64Encode(_ context.Context, arg runtime.Value) (runtime.Value, error)
- func HTMLEscape(_ context.Context, arg runtime.Value) (runtime.Value, error)
- func HTMLUnescape(_ context.Context, arg runtime.Value) (runtime.Value, error)
- func JSONParse(ctx context.Context, arg runtime.Value) (runtime.Value, error)
- func JSONStringify(ctx context.Context, arg runtime.Value) (runtime.Value, error)
- func QueryEscape(_ context.Context, arg runtime.Value) (runtime.Value, error)
- func QueryUnescape(_ context.Context, arg runtime.Value) (runtime.Value, error)
- func RegisterLib(ns runtime.Namespace)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
base64_decode decodes standard padded Base64, preserving arbitrary bytes. Invalid encoding returns an error. @param text {String} The encoded data. @return {Binary} The decoded bytes.
func Base64Encode ¶
base64_encode encodes raw bytes using standard padded Base64. Strings supply their UTF-8 bytes. @param value {String | Binary} The input data. @return {String} Standard padded Base64 text.
func HTMLEscape ¶
html_escape escapes the five HTML-sensitive characters: ampersand, angle brackets, and quotes. @param text {String} The input string. @return {String} The converted string.
func HTMLUnescape ¶
html_unescape decodes HTML character references. @param text {String} The input string. @return {String} The converted string.
func JSONParse ¶
json_parse returns a value described by the JSON-encoded input string. @param str {String} The string to parse as JSON. @return {Any} Parsed value.
func JSONStringify ¶
json_stringify returns a JSON string representation of the input value. @param str {Any} The input value to serialize. @return {String} JSON string.
func QueryEscape ¶
query_escape escapes query-form data: spaces become + and literal plus signs become %2B. @param text {String} The input string. @return {String} The converted string.
func QueryUnescape ¶
query_unescape decodes query-form data, including + as a space. Malformed percent escapes return an error. @param text {String} The input string. @return {String} The converted string.
func RegisterLib ¶
RegisterLib registers serialization and escaping operations in the encoding namespace.
Types ¶
This section is empty.