Documentation ¶
Index ¶
- Variables
- type Bool
- func (b Bool) IsSet() bool
- func (b Bool) IsValid() bool
- func (b Bool) IsZero() bool
- func (b Bool) MarshalJSON() ([]byte, error)
- func (b Bool) MarshalText() ([]byte, error)
- func (b Bool) Ptr() *bool
- func (b *Bool) Scan(value interface{}) error
- func (b *Bool) SetValid(v bool)
- func (b *Bool) UnmarshalJSON(data []byte) error
- func (b *Bool) UnmarshalText(text []byte) error
- func (b Bool) Value() (driver.Value, error)
- func (b Bool) ValueOrZero() bool
- type Byte
- func (b Byte) IsSet() bool
- func (b Byte) IsValid() bool
- func (b Byte) IsZero() bool
- func (b Byte) MarshalJSON() ([]byte, error)
- func (b Byte) MarshalText() ([]byte, error)
- func (b Byte) Ptr() *byte
- func (b *Byte) Scan(value interface{}) error
- func (b *Byte) SetValid(n byte)
- func (b *Byte) UnmarshalJSON(data []byte) error
- func (b *Byte) UnmarshalText(text []byte) error
- func (b Byte) Value() (driver.Value, error)
- func (b Byte) ValueOrZero() byte
- type Bytes
- func (b Bytes) IsSet() bool
- func (b Bytes) IsValid() bool
- func (b Bytes) IsZero() bool
- func (b Bytes) MarshalJSON() ([]byte, error)
- func (b Bytes) MarshalText() ([]byte, error)
- func (b Bytes) Ptr() *[]byte
- func (b *Bytes) Scan(value interface{}) error
- func (b *Bytes) SetValid(n []byte)
- func (b *Bytes) UnmarshalJSON(data []byte) error
- func (b *Bytes) UnmarshalText(text []byte) error
- func (b Bytes) Value() (driver.Value, error)
- func (b Bytes) ValueOrZero() []byte
- type Float32
- func (f Float32) IsSet() bool
- func (f Float32) IsValid() bool
- func (f Float32) IsZero() bool
- func (f Float32) MarshalJSON() ([]byte, error)
- func (f Float32) MarshalText() ([]byte, error)
- func (f Float32) Ptr() *float32
- func (f *Float32) Scan(value interface{}) error
- func (f *Float32) SetValid(n float32)
- func (f *Float32) UnmarshalJSON(data []byte) error
- func (f *Float32) UnmarshalText(text []byte) error
- func (f Float32) Value() (driver.Value, error)
- func (f Float32) ValueOrZero() float32
- type Float64
- func (f Float64) IsSet() bool
- func (f Float64) IsValid() bool
- func (f Float64) IsZero() bool
- func (f Float64) MarshalJSON() ([]byte, error)
- func (f Float64) MarshalText() ([]byte, error)
- func (f Float64) Ptr() *float64
- func (f *Float64) Scan(value interface{}) error
- func (f *Float64) SetValid(n float64)
- func (f *Float64) UnmarshalJSON(data []byte) error
- func (f *Float64) UnmarshalText(text []byte) error
- func (f Float64) Value() (driver.Value, error)
- func (f Float64) ValueOrZero() float64
- type Int
- func (i Int) IsSet() bool
- func (i Int) IsValid() bool
- func (i Int) IsZero() bool
- func (i Int) MarshalJSON() ([]byte, error)
- func (i Int) MarshalText() ([]byte, error)
- func (i Int) Ptr() *int
- func (i *Int) Scan(value interface{}) error
- func (i *Int) SetValid(n int)
- func (i *Int) UnmarshalJSON(data []byte) error
- func (i *Int) UnmarshalText(text []byte) error
- func (i Int) Value() (driver.Value, error)
- func (i Int) ValueOrZero() int
- type Int16
- func (i Int16) IsSet() bool
- func (i Int16) IsValid() bool
- func (i Int16) IsZero() bool
- func (i Int16) MarshalJSON() ([]byte, error)
- func (i Int16) MarshalText() ([]byte, error)
- func (i Int16) Ptr() *int16
- func (i *Int16) Scan(value interface{}) error
- func (i *Int16) SetValid(n int16)
- func (i *Int16) UnmarshalJSON(data []byte) error
- func (i *Int16) UnmarshalText(text []byte) error
- func (i Int16) Value() (driver.Value, error)
- func (i Int16) ValueOrZero() int16
- type Int32
- func (i Int32) IsSet() bool
- func (i Int32) IsValid() bool
- func (i Int32) IsZero() bool
- func (i Int32) MarshalJSON() ([]byte, error)
- func (i Int32) MarshalText() ([]byte, error)
- func (i Int32) Ptr() *int32
- func (i *Int32) Scan(value interface{}) error
- func (i *Int32) SetValid(n int32)
- func (i *Int32) UnmarshalJSON(data []byte) error
- func (i *Int32) UnmarshalText(text []byte) error
- func (i Int32) Value() (driver.Value, error)
- func (i Int32) ValueOrZero() int32
- type Int64
- func (i Int64) IsSet() bool
- func (i Int64) IsValid() bool
- func (i Int64) IsZero() bool
- func (i Int64) MarshalJSON() ([]byte, error)
- func (i Int64) MarshalText() ([]byte, error)
- func (i Int64) Ptr() *int64
- 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)
- func (i Int64) ValueOrZero() int64
- type Int8
- func (i Int8) IsSet() bool
- func (i Int8) IsValid() bool
- func (i Int8) IsZero() bool
- func (i Int8) MarshalJSON() ([]byte, error)
- func (i Int8) MarshalText() ([]byte, error)
- func (i Int8) Ptr() *int8
- func (i *Int8) Scan(value interface{}) error
- func (i *Int8) SetValid(n int8)
- func (i *Int8) UnmarshalJSON(data []byte) error
- func (i *Int8) UnmarshalText(text []byte) error
- func (i Int8) Value() (driver.Value, error)
- func (i Int8) ValueOrZero() int8
- type JSON
- func (j JSON) IsSet() bool
- func (j JSON) IsValid() bool
- func (j JSON) IsZero() bool
- func (j *JSON) Marshal(obj interface{}) error
- func (j JSON) MarshalJSON() ([]byte, error)
- func (j JSON) MarshalText() ([]byte, error)
- func (j JSON) Ptr() *[]byte
- func (j *JSON) Scan(value interface{}) error
- func (j *JSON) SetValid(n []byte)
- func (j JSON) Unmarshal(dest interface{}) error
- func (j *JSON) UnmarshalJSON(data []byte) error
- func (j *JSON) UnmarshalText(text []byte) error
- func (j JSON) Value() (driver.Value, error)
- func (j JSON) ValueOrZero() []byte
- type String
- func (s String) IsSet() bool
- func (s String) IsValid() bool
- func (s String) IsZero() bool
- func (s String) MarshalJSON() ([]byte, error)
- func (s String) MarshalText() ([]byte, error)
- func (s String) Ptr() *string
- func (s *String) Scan(value interface{}) error
- func (s *String) SetValid(v string)
- func (s *String) UnmarshalJSON(data []byte) error
- func (s *String) UnmarshalText(text []byte) error
- func (s String) Value() (driver.Value, error)
- func (s String) ValueOrZero() string
- type Time
- func (t Time) IsSet() bool
- func (t Time) IsValid() bool
- func (t Time) IsZero() bool
- func (t Time) MarshalJSON() ([]byte, error)
- func (t Time) MarshalText() ([]byte, error)
- func (t Time) Ptr() *time.Time
- func (t *Time) Scan(value interface{}) error
- func (t *Time) SetValid(v time.Time)
- func (t *Time) UnmarshalJSON(data []byte) error
- func (t *Time) UnmarshalText(text []byte) error
- func (t Time) Value() (driver.Value, error)
- func (t Time) ValueOrZero() time.Time
- type Uint
- func (u Uint) IsSet() bool
- func (u Uint) IsValid() bool
- func (u Uint) IsZero() bool
- func (u Uint) MarshalJSON() ([]byte, error)
- func (u Uint) MarshalText() ([]byte, error)
- func (u Uint) Ptr() *uint
- func (u *Uint) Scan(value interface{}) error
- func (u *Uint) SetValid(n uint)
- func (u *Uint) UnmarshalJSON(data []byte) error
- func (u *Uint) UnmarshalText(text []byte) error
- func (u Uint) Value() (driver.Value, error)
- func (u Uint) ValueOrZero() uint
- type Uint16
- func (u Uint16) IsSet() bool
- func (u Uint16) IsValid() bool
- func (u Uint16) IsZero() bool
- func (u Uint16) MarshalJSON() ([]byte, error)
- func (u Uint16) MarshalText() ([]byte, error)
- func (u Uint16) Ptr() *uint16
- func (u *Uint16) Scan(value interface{}) error
- func (u *Uint16) SetValid(n uint16)
- func (u *Uint16) UnmarshalJSON(data []byte) error
- func (u *Uint16) UnmarshalText(text []byte) error
- func (u Uint16) Value() (driver.Value, error)
- func (u Uint16) ValueOrZero() uint16
- type Uint32
- func (u Uint32) IsSet() bool
- func (u Uint32) IsValid() bool
- func (u Uint32) IsZero() bool
- func (u Uint32) MarshalJSON() ([]byte, error)
- func (u Uint32) MarshalText() ([]byte, error)
- func (u Uint32) Ptr() *uint32
- func (u *Uint32) Scan(value interface{}) error
- func (u *Uint32) SetValid(n uint32)
- func (u *Uint32) UnmarshalJSON(data []byte) error
- func (u *Uint32) UnmarshalText(text []byte) error
- func (u Uint32) Value() (driver.Value, error)
- func (u Uint32) ValueOrZero() uint32
- type Uint64
- func (u Uint64) IsSet() bool
- func (u Uint64) IsValid() bool
- func (u Uint64) IsZero() bool
- func (u Uint64) MarshalJSON() ([]byte, error)
- func (u Uint64) MarshalText() ([]byte, error)
- func (u Uint64) Ptr() *uint64
- func (u *Uint64) Scan(value interface{}) error
- func (u *Uint64) SetValid(n uint64)
- func (u *Uint64) UnmarshalJSON(data []byte) error
- func (u *Uint64) UnmarshalText(text []byte) error
- func (u Uint64) Value() (driver.Value, error)
- func (u Uint64) ValueOrZero() uint64
- type Uint8
- func (u Uint8) IsSet() bool
- func (u Uint8) IsValid() bool
- func (u Uint8) IsZero() bool
- func (u Uint8) MarshalJSON() ([]byte, error)
- func (u Uint8) MarshalText() ([]byte, error)
- func (u Uint8) Ptr() *uint8
- func (u *Uint8) Scan(value interface{}) error
- func (u *Uint8) SetValid(n uint8)
- func (u *Uint8) UnmarshalJSON(data []byte) error
- func (u *Uint8) UnmarshalText(text []byte) error
- func (u Uint8) Value() (driver.Value, error)
- func (u Uint8) ValueOrZero() uint8
- type Value
Constants ¶
This section is empty.
Variables ¶
var NullBytes = []byte("null")
NullBytes is a global byte slice of JSON null
Functions ¶
This section is empty.
Types ¶
type Bool ¶
Bool is a nullable bool.
func BoolFromPtr ¶
BoolFromPtr creates a new Bool that will be null if f is nil.
func (Bool) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Bool) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Bool) Ptr ¶
Ptr returns a pointer to this Bool's value, or a nil pointer if this Bool is null.
func (*Bool) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Bool) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Bool) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise false.
type Byte ¶
Byte is an nullable int.
func ByteFromPtr ¶
ByteFromPtr creates a new Byte that be null if i is nil.
func (Byte) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Byte) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Byte) Ptr ¶
Ptr returns a pointer to this Byte's value, or a nil pointer if this Byte is null.
func (*Byte) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Byte) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Byte) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type Bytes ¶
Bytes is a nullable []byte.
func BytesFromPtr ¶
BytesFromPtr creates a new Bytes that will be invalid if nil.
func (Bytes) IsZero ¶
IsZero returns true for null or zero Bytes's, for future omitempty support (Go 1.4?)
func (Bytes) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Bytes) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Bytes) Ptr ¶
Ptr returns a pointer to this Bytes's value, or a nil pointer if this Bytes is null.
func (*Bytes) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Bytes) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Bytes) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type Float32 ¶
Float32 is a nullable float32.
func Float32From ¶
Float32From creates a new Float32 that will always be valid.
func Float32FromPtr ¶
Float32FromPtr creates a new Float32 that be null if f is nil.
func (Float32) IsZero ¶
IsZero returns true for invalid Float32s, for future omitempty support (Go 1.4?)
func (Float32) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Float32) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Float32) Ptr ¶
Ptr returns a pointer to this Float32's value, or a nil pointer if this Float32 is null.
func (*Float32) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Float32) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Float32) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise zero.
type Float64 ¶
Float64 is a nullable float64.
func Float64From ¶
Float64From creates a new Float64 that will always be valid.
func Float64FromPtr ¶
Float64FromPtr creates a new Float64 that be null if f is nil.
func (Float64) IsZero ¶
IsZero returns true for invalid Float64s, for future omitempty support (Go 1.4?)
func (Float64) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Float64) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Float64) Ptr ¶
Ptr returns a pointer to this Float64's value, or a nil pointer if this Float64 is null.
func (*Float64) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Float64) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Float64) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise zero.
type Int ¶
Int is an nullable int.
func IntFromPtr ¶
IntFromPtr creates a new Int that be null if i is nil.
func (Int) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Int) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*Int) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Int) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Int) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type Int16 ¶
Int16 is an nullable int16.
func Int16FromPtr ¶
Int16FromPtr creates a new Int16 that be null if i is nil.
func (Int16) IsZero ¶
IsZero returns true for invalid Int16's, for future omitempty support (Go 1.4?)
func (Int16) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Int16) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Int16) Ptr ¶
Ptr returns a pointer to this Int16's value, or a nil pointer if this Int16 is null.
func (*Int16) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Int16) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Int16) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type Int32 ¶
Int32 is an nullable int32.
func Int32FromPtr ¶
Int32FromPtr creates a new Int32 that be null if i is nil.
func (Int32) IsZero ¶
IsZero returns true for invalid Int32's, for future omitempty support (Go 1.4?)
func (Int32) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Int32) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Int32) Ptr ¶
Ptr returns a pointer to this Int32's value, or a nil pointer if this Int32 is null.
func (*Int32) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Int32) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Int32) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type Int64 ¶
Int64 is an nullable int64.
func Int64FromPtr ¶
Int64FromPtr creates a new Int64 that be null if i is nil.
func (Int64) IsZero ¶
IsZero returns true for invalid Int64's, for future omitempty support (Go 1.4?)
func (Int64) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Int64) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Int64) Ptr ¶
Ptr returns a pointer to this Int64's value, or a nil pointer if this Int64 is null.
func (*Int64) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Int64) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Int64) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type Int8 ¶
Int8 is an nullable int8.
func Int8FromPtr ¶
Int8FromPtr creates a new Int8 that be null if i is nil.
func (Int8) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Int8) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Int8) Ptr ¶
Ptr returns a pointer to this Int8's value, or a nil pointer if this Int8 is null.
func (*Int8) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Int8) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Int8) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type JSON ¶
JSON is a nullable []byte that contains JSON.
You might want to use this in the case where you have say a nullable JSON column in postgres for instance, where there is one layer of null for the postgres column, and then you also have the opportunity to have null as a value contained in the json. When unmarshalling json however you cannot set 'null' as a value.
func JSONFromPtr ¶
JSONFromPtr creates a new JSON that will be invalid if nil.
func (JSON) IsZero ¶
IsZero returns true for null or zero JSON's, for future omitempty support (Go 1.4?)
func (*JSON) Marshal ¶
Marshal will marshal the passed in object, and store it in the JSON member on the JSON object.
func (JSON) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (JSON) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (JSON) Ptr ¶
Ptr returns a pointer to this JSON's value, or a nil pointer if this JSON is null.
func (JSON) Unmarshal ¶
Unmarshal will unmarshal your JSON stored in your JSON object and store the result in the value pointed to by dest.
func (*JSON) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
Example if you have a struct with a null.JSON called v:
{} -> does not call unmarshaljson: !set & !valid {"v": null} -> calls unmarshaljson, set & !valid {"v": {}} -> calls unmarshaljson, set & valid (json value is '{}')
That's to say if 'null' is passed in at the json level we do not capture that value - instead we set the value-level null flag so that an sql value will turn out null.
func (*JSON) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (JSON) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type String ¶
String is a nullable string. It supports SQL and JSON serialization.
func StringFrom ¶
StringFrom creates a new String that will never be blank.
func StringFromPtr ¶
StringFromPtr creates a new String that be null if s is nil.
func (String) IsZero ¶
IsZero returns true for null strings, for potential future omitempty support.
func (String) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (String) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (String) Ptr ¶
Ptr returns a pointer to this String's value, or a nil pointer if this String is null.
func (*String) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*String) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (String) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type Time ¶
Time is a nullable time.Time. It supports SQL and JSON serialization.
func TimeFromPtr ¶
TimeFromPtr creates a new Time that will be null if t is nil.
func (Time) IsZero ¶
IsZero returns true for an invalid Time's value, for potential future omitempty support.
func (Time) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Time) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Time) Ptr ¶
Ptr returns a pointer to this Time's value, or a nil pointer if this Time is null.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Time) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Time) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type Uint ¶
Uint is an nullable uint.
func UintFromPtr ¶
UintFromPtr creates a new Uint that be null if i is nil.
func (Uint) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Uint) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Uint) Ptr ¶
Ptr returns a pointer to this Uint's value, or a nil pointer if this Uint is null.
func (*Uint) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Uint) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Uint) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type Uint16 ¶
Uint16 is an nullable uint16.
func Uint16From ¶
Uint16From creates a new Uint16 that will always be valid.
func Uint16FromPtr ¶
Uint16FromPtr creates a new Uint16 that be null if i is nil.
func (Uint16) IsZero ¶
IsZero returns true for invalid Uint16's, for future omitempty support (Go 1.4?)
func (Uint16) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Uint16) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Uint16) Ptr ¶
Ptr returns a pointer to this Uint16's value, or a nil pointer if this Uint16 is null.
func (*Uint16) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Uint16) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Uint16) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type Uint32 ¶
Uint32 is an nullable uint32.
func Uint32From ¶
Uint32From creates a new Uint32 that will always be valid.
func Uint32FromPtr ¶
Uint32FromPtr creates a new Uint32 that be null if i is nil.
func (Uint32) IsZero ¶
IsZero returns true for invalid Uint32's, for future omitempty support (Go 1.4?)
func (Uint32) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Uint32) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Uint32) Ptr ¶
Ptr returns a pointer to this Uint32's value, or a nil pointer if this Uint32 is null.
func (*Uint32) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Uint32) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Uint32) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type Uint64 ¶
Uint64 is an nullable uint64.
func Uint64From ¶
Uint64From creates a new Uint64 that will always be valid.
func Uint64FromPtr ¶
Uint64FromPtr creates a new Uint64 that be null if i is nil.
func (Uint64) IsZero ¶
IsZero returns true for invalid Uint64's, for future omitempty support (Go 1.4?)
func (Uint64) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Uint64) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Uint64) Ptr ¶
Ptr returns a pointer to this Uint64's value, or a nil pointer if this Uint64 is null.
func (*Uint64) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Uint64) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Uint64) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.
type Uint8 ¶
Uint8 is an nullable uint8.
func Uint8FromPtr ¶
Uint8FromPtr creates a new Uint8 that be null if i is nil.
func (Uint8) IsZero ¶
IsZero returns true for invalid Uint8's, for future omitempty support (Go 1.4?)
func (Uint8) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (Uint8) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (Uint8) Ptr ¶
Ptr returns a pointer to this Uint8's value, or a nil pointer if this Uint8 is null.
func (*Uint8) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Uint8) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
func (Uint8) ValueOrZero ¶
ValueOrZero returns the inner value if valid, otherwise default.