Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConvertibleBoolean ¶
type ConvertibleBoolean bool
ConvertibleBoolean is a custom boolean struct used for manipulating booleans of string, integer, and boolean to/from JSON and SQL
func (*ConvertibleBoolean) Scan ¶
func (bit *ConvertibleBoolean) Scan(src interface{}) error
Scan re-implements the database/sql Scan() method. It will map the integer found in the response to its boolean equivalent
func (*ConvertibleBoolean) UnmarshalJSON ¶
func (bit *ConvertibleBoolean) UnmarshalJSON(data []byte) error
UnmarshalJSON re-implements the encoding/json Unmarshal method. It will cast the any of the truthy/falsy variants to boolean
type IntString ¶ added in v0.2.0
type IntString int
IntString is a custom int struct used for manipulating ints of string to/from JSON. NOT NEEDED use `json:",string"`
func (IntString) MarshalJSON ¶ added in v0.2.1
MarshalJSON re-implements the encoding/json Marshal method. It will return a quote-enclosed int as []byte
func (*IntString) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON re-implements the encoding/json Unmarshal method. It will cast the string to int type
type URLString ¶ added in v0.2.3
URLString is a custom url.URL struct used for converting URLs to/from string for sql
func (*URLString) Scan ¶ added in v0.2.3
Scan re-implements the database/sql Scan() method. It will convert the url string found in the response to a URLString struct
type UnixTimestamp ¶ added in v0.1.1
UnixTimestamp is a custom time.Time struct used for manipulating unix timestamps to/from JSON, XML, and SQL
func (UnixTimestamp) MarshalJSON ¶ added in v0.1.1
func (t UnixTimestamp) MarshalJSON() ([]byte, error)
MarshalJSON re-implements the encoding/json Marshal method. It will return a quote-enclosed RFC3339 string as []byte
func (*UnixTimestamp) Scan ¶ added in v0.1.1
func (t *UnixTimestamp) Scan(src interface{}) error
Scan re-implements the database/sql Scan() method. It will convert the "almost" RFC3339 string found in the response to a UnixTimestamp struct
func (*UnixTimestamp) String ¶ added in v0.1.1
func (t *UnixTimestamp) String(format ...string) string
String is a convenience function to get a string response based on format. time.RFC3339 is the default
func (*UnixTimestamp) UnmarshalXMLAttr ¶ added in v0.1.1
func (t *UnixTimestamp) UnmarshalXMLAttr(attr xml.Attr) error
UnmarshalXMLAttr re-implements the database/xml Unmarshal() method for attributes. It will map the unix timestamp integer found in the response to a UnixTimestamp struct