Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NullInt ¶
NullInt represents an int that may be null. NullInt implements the Scanner interface so it can be used as a scan destination, similar to NullString.
func (NullInt) MarshalJSON ¶
MarshalJSON implements the encoding/json.Marshaler interface.
func (*NullInt) UnmarshalJSON ¶
UnmarshalJSON implements the encoding/json.Unmarshaler interface.
type NullTime ¶
func Now ¶
func Now() NullTime
Now returns a valid NullTime with the time set to now, in UTC and rounded to the nearest millisecond. It does this so that JSON- and SQL-serialization and deserialization yields the same time as passed in. If the time is not UTC or has sub-millisecond accuracy, the time retrieved from an SQL DB or JSON object might not be equal to the original object due to rounding and automatic timezone conversion.
func (NullTime) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*NullTime) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type StringSlice ¶
type StringSlice struct {
Slice []string
}
func NewSlice ¶
func NewSlice(goslice []string) *StringSlice
func (*StringSlice) Scan ¶
func (s *StringSlice) Scan(v interface{}) error