Versions in this module Expand all Collapse all v0 v0.2.0 Mar 16, 2022 Changes in this version + type Optional optional[T] + func Empty() Optional[T] + func Of(value T) Optional[T] + func OfPtr(ptr *T) Optional[T] + func (o *Optional[T]) UnmarshalJSON(data []byte) error + func (o *Optional[T]) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Optional[T]) Else(elseValue T) (value T) + func (o Optional[T]) ElseFunc(f func() T) (value T) + func (o Optional[T]) ElseZero() (value T) + func (o Optional[T]) Get() (value T, ok bool) + func (o Optional[T]) If(f func(value T)) + func (o Optional[T]) IsPresent() bool + func (o Optional[T]) MarshalJSON() (data []byte, err error) + func (o Optional[T]) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Optional[T]) String() string v0.1.0 Apr 16, 2021 Changes in this version + type Bool optionalBool + func EmptyBool() Bool + func OfBool(value bool) Bool + func OfBoolPtr(ptr *bool) Bool + func (o *Bool) UnmarshalJSON(data []byte) error + func (o *Bool) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Bool) Else(elseValue bool) (value bool) + func (o Bool) ElseFunc(f func() bool) (value bool) + func (o Bool) ElseZero() (value bool) + func (o Bool) Get() (value bool, ok bool) + func (o Bool) If(f func(value bool)) + func (o Bool) IsPresent() bool + func (o Bool) MarshalJSON() (data []byte, err error) + func (o Bool) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Bool) String() string + type Byte optionalByte + func EmptyByte() Byte + func OfByte(value byte) Byte + func OfBytePtr(ptr *byte) Byte + func (o *Byte) UnmarshalJSON(data []byte) error + func (o *Byte) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Byte) Else(elseValue byte) (value byte) + func (o Byte) ElseFunc(f func() byte) (value byte) + func (o Byte) ElseZero() (value byte) + func (o Byte) Get() (value byte, ok bool) + func (o Byte) If(f func(value byte)) + func (o Byte) IsPresent() bool + func (o Byte) MarshalJSON() (data []byte, err error) + func (o Byte) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Byte) String() string + type Complex128 optionalComplex128 + func EmptyComplex128() Complex128 + func OfComplex128(value complex128) Complex128 + func OfComplex128Ptr(ptr *complex128) Complex128 + func (o *Complex128) UnmarshalJSON(data []byte) error + func (o *Complex128) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Complex128) Else(elseValue complex128) (value complex128) + func (o Complex128) ElseFunc(f func() complex128) (value complex128) + func (o Complex128) ElseZero() (value complex128) + func (o Complex128) Get() (value complex128, ok bool) + func (o Complex128) If(f func(value complex128)) + func (o Complex128) IsPresent() bool + func (o Complex128) MarshalJSON() (data []byte, err error) + func (o Complex128) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Complex128) String() string + type Complex64 optionalComplex64 + func EmptyComplex64() Complex64 + func OfComplex64(value complex64) Complex64 + func OfComplex64Ptr(ptr *complex64) Complex64 + func (o *Complex64) UnmarshalJSON(data []byte) error + func (o *Complex64) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Complex64) Else(elseValue complex64) (value complex64) + func (o Complex64) ElseFunc(f func() complex64) (value complex64) + func (o Complex64) ElseZero() (value complex64) + func (o Complex64) Get() (value complex64, ok bool) + func (o Complex64) If(f func(value complex64)) + func (o Complex64) IsPresent() bool + func (o Complex64) MarshalJSON() (data []byte, err error) + func (o Complex64) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Complex64) String() string + type Float32 optionalFloat32 + func EmptyFloat32() Float32 + func OfFloat32(value float32) Float32 + func OfFloat32Ptr(ptr *float32) Float32 + func (o *Float32) UnmarshalJSON(data []byte) error + func (o *Float32) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Float32) Else(elseValue float32) (value float32) + func (o Float32) ElseFunc(f func() float32) (value float32) + func (o Float32) ElseZero() (value float32) + func (o Float32) Get() (value float32, ok bool) + func (o Float32) If(f func(value float32)) + func (o Float32) IsPresent() bool + func (o Float32) MarshalJSON() (data []byte, err error) + func (o Float32) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Float32) String() string + type Float64 optionalFloat64 + func EmptyFloat64() Float64 + func OfFloat64(value float64) Float64 + func OfFloat64Ptr(ptr *float64) Float64 + func (o *Float64) UnmarshalJSON(data []byte) error + func (o *Float64) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Float64) Else(elseValue float64) (value float64) + func (o Float64) ElseFunc(f func() float64) (value float64) + func (o Float64) ElseZero() (value float64) + func (o Float64) Get() (value float64, ok bool) + func (o Float64) If(f func(value float64)) + func (o Float64) IsPresent() bool + func (o Float64) MarshalJSON() (data []byte, err error) + func (o Float64) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Float64) String() string + type Int optionalInt + func EmptyInt() Int + func OfInt(value int) Int + func OfIntPtr(ptr *int) Int + func (o *Int) UnmarshalJSON(data []byte) error + func (o *Int) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Int) Else(elseValue int) (value int) + func (o Int) ElseFunc(f func() int) (value int) + func (o Int) ElseZero() (value int) + func (o Int) Get() (value int, ok bool) + func (o Int) If(f func(value int)) + func (o Int) IsPresent() bool + func (o Int) MarshalJSON() (data []byte, err error) + func (o Int) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Int) String() string + type Int16 optionalInt16 + func EmptyInt16() Int16 + func OfInt16(value int16) Int16 + func OfInt16Ptr(ptr *int16) Int16 + func (o *Int16) UnmarshalJSON(data []byte) error + func (o *Int16) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Int16) Else(elseValue int16) (value int16) + func (o Int16) ElseFunc(f func() int16) (value int16) + func (o Int16) ElseZero() (value int16) + func (o Int16) Get() (value int16, ok bool) + func (o Int16) If(f func(value int16)) + func (o Int16) IsPresent() bool + func (o Int16) MarshalJSON() (data []byte, err error) + func (o Int16) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Int16) String() string + type Int32 optionalInt32 + func EmptyInt32() Int32 + func OfInt32(value int32) Int32 + func OfInt32Ptr(ptr *int32) Int32 + func (o *Int32) UnmarshalJSON(data []byte) error + func (o *Int32) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Int32) Else(elseValue int32) (value int32) + func (o Int32) ElseFunc(f func() int32) (value int32) + func (o Int32) ElseZero() (value int32) + func (o Int32) Get() (value int32, ok bool) + func (o Int32) If(f func(value int32)) + func (o Int32) IsPresent() bool + func (o Int32) MarshalJSON() (data []byte, err error) + func (o Int32) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Int32) String() string + type Int64 optionalInt64 + func EmptyInt64() Int64 + func OfInt64(value int64) Int64 + func OfInt64Ptr(ptr *int64) Int64 + func (o *Int64) UnmarshalJSON(data []byte) error + func (o *Int64) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Int64) Else(elseValue int64) (value int64) + func (o Int64) ElseFunc(f func() int64) (value int64) + func (o Int64) ElseZero() (value int64) + func (o Int64) Get() (value int64, ok bool) + func (o Int64) If(f func(value int64)) + func (o Int64) IsPresent() bool + func (o Int64) MarshalJSON() (data []byte, err error) + func (o Int64) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Int64) String() string + type Int8 optionalInt8 + func EmptyInt8() Int8 + func OfInt8(value int8) Int8 + func OfInt8Ptr(ptr *int8) Int8 + func (o *Int8) UnmarshalJSON(data []byte) error + func (o *Int8) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Int8) Else(elseValue int8) (value int8) + func (o Int8) ElseFunc(f func() int8) (value int8) + func (o Int8) ElseZero() (value int8) + func (o Int8) Get() (value int8, ok bool) + func (o Int8) If(f func(value int8)) + func (o Int8) IsPresent() bool + func (o Int8) MarshalJSON() (data []byte, err error) + func (o Int8) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Int8) String() string + type Rune optionalRune + func EmptyRune() Rune + func OfRune(value rune) Rune + func OfRunePtr(ptr *rune) Rune + func (o *Rune) UnmarshalJSON(data []byte) error + func (o *Rune) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Rune) Else(elseValue rune) (value rune) + func (o Rune) ElseFunc(f func() rune) (value rune) + func (o Rune) ElseZero() (value rune) + func (o Rune) Get() (value rune, ok bool) + func (o Rune) If(f func(value rune)) + func (o Rune) IsPresent() bool + func (o Rune) MarshalJSON() (data []byte, err error) + func (o Rune) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Rune) String() string + type String optionalString + func EmptyString() String + func OfString(value string) String + func OfStringPtr(ptr *string) String + func (o *String) UnmarshalJSON(data []byte) error + func (o *String) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o String) Else(elseValue string) (value string) + func (o String) ElseFunc(f func() string) (value string) + func (o String) ElseZero() (value string) + func (o String) Get() (value string, ok bool) + func (o String) If(f func(value string)) + func (o String) IsPresent() bool + func (o String) MarshalJSON() (data []byte, err error) + func (o String) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o String) String() string + type Time optionalTime + func EmptyTime() Time + func OfTime(value time.Time) Time + func OfTimePtr(ptr *time.Time) Time + func (o *Time) UnmarshalJSON(data []byte) error + func (o *Time) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Time) Else(elseValue time.Time) (value time.Time) + func (o Time) ElseFunc(f func() time.Time) (value time.Time) + func (o Time) ElseZero() (value time.Time) + func (o Time) Get() (value time.Time, ok bool) + func (o Time) If(f func(value time.Time)) + func (o Time) IsPresent() bool + func (o Time) MarshalJSON() (data []byte, err error) + func (o Time) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Time) String() string + type Uint optionalUint + func EmptyUint() Uint + func OfUint(value uint) Uint + func OfUintPtr(ptr *uint) Uint + func (o *Uint) UnmarshalJSON(data []byte) error + func (o *Uint) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Uint) Else(elseValue uint) (value uint) + func (o Uint) ElseFunc(f func() uint) (value uint) + func (o Uint) ElseZero() (value uint) + func (o Uint) Get() (value uint, ok bool) + func (o Uint) If(f func(value uint)) + func (o Uint) IsPresent() bool + func (o Uint) MarshalJSON() (data []byte, err error) + func (o Uint) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Uint) String() string + type Uint16 optionalUint16 + func EmptyUint16() Uint16 + func OfUint16(value uint16) Uint16 + func OfUint16Ptr(ptr *uint16) Uint16 + func (o *Uint16) UnmarshalJSON(data []byte) error + func (o *Uint16) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Uint16) Else(elseValue uint16) (value uint16) + func (o Uint16) ElseFunc(f func() uint16) (value uint16) + func (o Uint16) ElseZero() (value uint16) + func (o Uint16) Get() (value uint16, ok bool) + func (o Uint16) If(f func(value uint16)) + func (o Uint16) IsPresent() bool + func (o Uint16) MarshalJSON() (data []byte, err error) + func (o Uint16) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Uint16) String() string + type Uint32 optionalUint32 + func EmptyUint32() Uint32 + func OfUint32(value uint32) Uint32 + func OfUint32Ptr(ptr *uint32) Uint32 + func (o *Uint32) UnmarshalJSON(data []byte) error + func (o *Uint32) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Uint32) Else(elseValue uint32) (value uint32) + func (o Uint32) ElseFunc(f func() uint32) (value uint32) + func (o Uint32) ElseZero() (value uint32) + func (o Uint32) Get() (value uint32, ok bool) + func (o Uint32) If(f func(value uint32)) + func (o Uint32) IsPresent() bool + func (o Uint32) MarshalJSON() (data []byte, err error) + func (o Uint32) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Uint32) String() string + type Uint64 optionalUint64 + func EmptyUint64() Uint64 + func OfUint64(value uint64) Uint64 + func OfUint64Ptr(ptr *uint64) Uint64 + func (o *Uint64) UnmarshalJSON(data []byte) error + func (o *Uint64) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Uint64) Else(elseValue uint64) (value uint64) + func (o Uint64) ElseFunc(f func() uint64) (value uint64) + func (o Uint64) ElseZero() (value uint64) + func (o Uint64) Get() (value uint64, ok bool) + func (o Uint64) If(f func(value uint64)) + func (o Uint64) IsPresent() bool + func (o Uint64) MarshalJSON() (data []byte, err error) + func (o Uint64) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Uint64) String() string + type Uint8 optionalUint8 + func EmptyUint8() Uint8 + func OfUint8(value uint8) Uint8 + func OfUint8Ptr(ptr *uint8) Uint8 + func (o *Uint8) UnmarshalJSON(data []byte) error + func (o *Uint8) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Uint8) Else(elseValue uint8) (value uint8) + func (o Uint8) ElseFunc(f func() uint8) (value uint8) + func (o Uint8) ElseZero() (value uint8) + func (o Uint8) Get() (value uint8, ok bool) + func (o Uint8) If(f func(value uint8)) + func (o Uint8) IsPresent() bool + func (o Uint8) MarshalJSON() (data []byte, err error) + func (o Uint8) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Uint8) String() string + type Uintptr optionalUintptr + func EmptyUintptr() Uintptr + func OfUintptr(value uintptr) Uintptr + func OfUintptrPtr(ptr *uintptr) Uintptr + func (o *Uintptr) UnmarshalJSON(data []byte) error + func (o *Uintptr) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (o Uintptr) Else(elseValue uintptr) (value uintptr) + func (o Uintptr) ElseFunc(f func() uintptr) (value uintptr) + func (o Uintptr) ElseZero() (value uintptr) + func (o Uintptr) Get() (value uintptr, ok bool) + func (o Uintptr) If(f func(value uintptr)) + func (o Uintptr) IsPresent() bool + func (o Uintptr) MarshalJSON() (data []byte, err error) + func (o Uintptr) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (o Uintptr) String() string