Documentation ¶
Index ¶
- 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 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".