Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GzippedText ¶
type GzippedText []byte
GzippedText is a []byte which transparently gzips data being submitted to a database and ungzips data being Scanned from a database.
func (*GzippedText) Scan ¶
func (g *GzippedText) Scan(src interface{}) error
Scan implements the sql.Scanner interface, ungzipping the value coming off the wire and storing the raw result in the GzippedText.
type JSONText ¶
type JSONText json.RawMessage
JSONText is a json.RawMessage, which is a []byte underneath. Value() validates the json format in the source, and returns an error if the json is not valid. Scan does no validation. JSONText additionally implements `Unmarshal`, which unmarshals the json within to an interface{}
func (*JSONText) MarshalJSON ¶
MarshalJSON returns the *j as the JSON encoding of j.
func (*JSONText) UnmarshalJSON ¶
UnmarshalJSON sets *j to a copy of data