Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GzipCompress ¶
GzipCompress compresses the given content with gzip and returns a base64-encoded string.
func GzipDecompress ¶
GzipDecompress decompresses the given base64-encoded string with GZIP.
func MarshalCanonical ¶
MarshalCanonical marshals and encodes the given object using the given media type and returns a data URI with the encoded data. For example: 'data:application/gzip;base64,H4sIAbAAvAAA...'.
Types ¶
type MediaType ¶
type MediaType = string
MediaType defines a type of encoding for content embedded within a data URI.
const ( // MediaTypeDataURIJSON indicates that the contents of the data URL is a plain JSON string. MediaTypeDataURIJSON MediaType = "application/json" // MediaTypeDataURIGzipBase64 indicates that the contents of the data URL is compressed with gzip and base64-encoded. MediaTypeDataURIGzipBase64 MediaType = "application/gzip;base64" )
Click to show internal directories.
Click to hide internal directories.