Documentation ¶
Index ¶
- type Int64
- func (i Int64) MarshalJSON() ([]byte, error)
- func (i Int64) MarshalText() ([]byte, error)
- func (i *Int64) Scan(value interface{}) error
- func (i *Int64) SetValid(n int64)
- func (i *Int64) UnmarshalJSON(data []byte) error
- func (i *Int64) UnmarshalText(text []byte) error
- func (i Int64) Value() (driver.Value, error)
- type Uint32
- func (i Uint32) MarshalJSON() ([]byte, error)
- func (i Uint32) MarshalText() ([]byte, error)
- func (i *Uint32) Scan(value interface{}) error
- func (i *Uint32) SetValid(n uint32)
- func (i *Uint32) UnmarshalJSON(data []byte) error
- func (i *Uint32) UnmarshalText(text []byte) error
- func (i Uint32) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Int64 ¶
Int64 encapsulates the value and validity (not null) of a int64 value, to differentiate nil from 0 in json and sql.
func (Int64) MarshalJSON ¶
MarshalJSON implements json.Marshaler. It will encode null if this Int64 is null.
func (Int64) MarshalText ¶
MarshalText implements encoding.TextMarshaler. It will encode a blank string if this Int64 is null.
func (*Int64) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler. It supports number and null input. 0 will not be considered a null Int.
func (*Int64) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler. It will unmarshal to a null Int64 if the input is a blank or not an integer. It will return an error if the input is not an integer, blank, or "null".
type Uint32 ¶
Uint32 encapsulates the value and validity (not null) of a uint32 value, to differentiate nil from 0 in json and sql.
func Uint32From ¶
Uint32From creates a new Uint32 that will always be valid.
func (Uint32) MarshalJSON ¶
MarshalJSON implements json.Marshaler. It will encode null if this Uint32 is null.
func (Uint32) MarshalText ¶
MarshalText implements encoding.TextMarshaler. It will encode a blank string if this Uint32 is null.
func (*Uint32) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler. It supports number and null input. 0 will not be considered a null Int.
func (*Uint32) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler. It will unmarshal to a null Uint32 if the input is a blank or not an integer. It will return an error if the input is not an integer, blank, or "null".