Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NullBool ¶
NullBool replaces sql.NullBool with an implementation that supports proper JSON encoding/decoding.
func NewNullBool ¶
NewNullBool returns a new, properly instantiated NullBoll object.
func (NullBool) MarshalJSON ¶
MarshalJSON marshals the underlying value to a proper JSON representation.
func (*NullBool) UnmarshalJSON ¶
UnmarshalJSON will unmarshal a JSON value into the proper representation of that value. The strings "true" and "t" will be considered "true", "false" and "f" will be treated as "false". All other values will be set to null by Valid = false
type NullByteSlice ¶
type NullByteSlice struct { ByteSlice []byte Valid bool // Valid is true if NullByteSlice is not NULL }
NullByteSlice adds an implementation for []byte that supports proper JSON encoding/decoding.
func NewNullByteSlice ¶
func NewNullByteSlice(b []byte) NullByteSlice
NewNullByteSlice returns a new, properly instantiated NullByteSlice object.
func (NullByteSlice) MarshalJSON ¶
func (ns NullByteSlice) MarshalJSON() ([]byte, error)
MarshalJSON marshals the underlying value to a proper JSON representation.
func (*NullByteSlice) Scan ¶
func (ns *NullByteSlice) Scan(value interface{}) error
Scan implements the Scanner interface.
func (*NullByteSlice) UnmarshalJSON ¶
func (ns *NullByteSlice) UnmarshalJSON(text []byte) error
UnmarshalJSON will unmarshal a JSON value into the propert representation of that value.
type NullFloat32 ¶
NullFloat32 adds an implementation for float32 that supports proper JSON encoding/decoding.
func NewNullFloat32 ¶
func NewNullFloat32(i float32) NullFloat32
NewNullFloat32 returns a new, properly instantiated NullFloat32 object.
func (NullFloat32) MarshalJSON ¶
func (ns NullFloat32) MarshalJSON() ([]byte, error)
MarshalJSON marshals the underlying value to a proper JSON representation.
func (*NullFloat32) Scan ¶
func (ns *NullFloat32) Scan(value interface{}) error
Scan implements the Scanner interface.
func (*NullFloat32) UnmarshalJSON ¶
func (ns *NullFloat32) UnmarshalJSON(text []byte) error
UnmarshalJSON will unmarshal a JSON value into the propert representation of that value.
type NullFloat64 ¶
type NullFloat64 sql.NullFloat64
NullFloat64 replaces sql.NullFloat64 with an implementation that supports proper JSON encoding/decoding.
func NewNullFloat64 ¶
func NewNullFloat64(i float64) NullFloat64
NewNullFloat64 returns a new, properly instantiated NullFloat64 object.
func (NullFloat64) MarshalJSON ¶
func (ns NullFloat64) MarshalJSON() ([]byte, error)
MarshalJSON marshals the underlying value to a proper JSON representation.
func (*NullFloat64) Scan ¶
func (ns *NullFloat64) Scan(value interface{}) error
Scan implements the Scanner interface.
func (*NullFloat64) UnmarshalJSON ¶
func (ns *NullFloat64) UnmarshalJSON(text []byte) error
UnmarshalJSON will unmarshal a JSON value into the propert representation of that value.
type NullInt ¶
NullInt adds an implementation for int that supports proper JSON encoding/decoding.
func NewNullInt ¶
NewNullInt returns a new, properly instantiated NullInt object.
func (NullInt) MarshalJSON ¶
MarshalJSON marshals the underlying value to a proper JSON representation.
func (*NullInt) UnmarshalJSON ¶
UnmarshalJSON will unmarshal a JSON value into the propert representation of that value.
type NullInt32 ¶
NullInt32 adds an implementation for int32 that supports proper JSON encoding/decoding.
func NewNullInt32 ¶
NewNullInt32 returns a new, properly instantiated NullInt object.
func (NullInt32) MarshalJSON ¶
MarshalJSON marshals the underlying value to a proper JSON representation.
func (*NullInt32) UnmarshalJSON ¶
UnmarshalJSON will unmarshal a JSON value into the propert representation of that value.
type NullInt64 ¶
NullInt64 replaces sql.NullInt64 with an implementation that supports proper JSON encoding/decoding.
func NewNullInt64 ¶
NewNullInt64 returns a new, properly instantiated NullInt64 object.
func (NullInt64) MarshalJSON ¶
MarshalJSON marshals the underlying value to a proper JSON representation.
func (*NullInt64) UnmarshalJSON ¶
UnmarshalJSON will unmarshal a JSON value into the propert representation of that value.
type NullString ¶
type NullString sql.NullString
NullString replaces sql.NullString with an implementation that supports proper JSON encoding/decoding.
func NewNullString ¶
func NewNullString(s string) NullString
NewNullString returns a new, properly instantiated NullString object.
func (NullString) MarshalJSON ¶
func (ns NullString) MarshalJSON() ([]byte, error)
MarshalJSON marshals the underlying value to a proper JSON representation.
func (*NullString) Scan ¶
func (ns *NullString) Scan(value interface{}) error
Scan implements the Scanner interface.
func (*NullString) UnmarshalJSON ¶
func (ns *NullString) UnmarshalJSON(text []byte) error
UnmarshalJSON will unmarshal a JSON value into the propert representation of that value.
type NullTime ¶
NullTime replaces sql.NullTime with an implementation that supports proper JSON encoding/decoding.
func NewNullTime ¶
NewNullTime returns a new, properly instantiated NullTime object.
func (NullTime) MarshalJSON ¶
MarshalJSON marshals the underlying value to a proper JSON representation.
func (*NullTime) UnmarshalJSON ¶
UnmarshalJSON will unmarshal a JSON value into the propert representation of that value.
type NullUInt32 ¶
NullUInt32 adds an implementation for int that supports proper JSON encoding/decoding.
func NewNullUInt32 ¶
func NewNullUInt32(i uint32) NullUInt32
NewNullUInt32 returns a new, properly instantiated NullInt object.
func (NullUInt32) MarshalJSON ¶
func (ns NullUInt32) MarshalJSON() ([]byte, error)
MarshalJSON marshals the underlying value to a proper JSON representation.
func (*NullUInt32) Scan ¶
func (ns *NullUInt32) Scan(value interface{}) error
Scan implements the Scanner interface.
func (*NullUInt32) UnmarshalJSON ¶
func (ns *NullUInt32) UnmarshalJSON(text []byte) error
UnmarshalJSON will unmarshal a JSON value into the propert representation of that value.