Documentation
¶
Overview ¶
Package nan - Zero allocation Nullable structures in one library with handy conversion functions, marshallers and unmarshallers.
Features: - short name "nan" - handy conversion functions - select which marshalers you want and limit dependencies to only those you actually need - ability to convert your custom structs to nan compatible type with Valid field and all requested encoders/decoders
Supported types: - bool - float32 - float64 - int - int8 - int16 - int32 - int64 - string - time.Time - more types will be added as necessary
Supported marshallers: - Standart JSON - encoding.TextMarshaler/TextUnmarshaler. Reuses standard JSON logic and format - jsoniter - easyjson - go-json - Scylla and Cassandra. Compatible with gocql - SQL
Usage ¶
Simply create struct field or variable with one of the exported types and use it without any changes to external API.
JSON input/output will be converted to null or non null values. Scylla and Cassandra will use wire format compatible with gocql.
var data struct {
Code nan.NullString `json:"code"`
}
b, err := jsoniter.Marshal(data)
if err != nil {
panic(err)
}
// {"code":null}
println(string(b))
data.Code = nan.String("1")
// Equals to
// data.Code = nan.NullString{String: "1", Valid: true}
b, err = jsoniter.Marshal(data)
if err != nil {
panic(err)
}
// {"code":"1"}
println(string(b))
code := "2"
// From addr. Can has value or be nil
data.Code = nan.StringAddr(&code)
b, err = jsoniter.Marshal(data)
if err != nil {
panic(err)
}
// {"code":"2"}
println(string(b))
// To usual value from nan
codeVal := data.Code.String
// 2
println(codeVal)
// To value addr from nan
codeAddr := data.Code.Addr()
// 2
println(*codeAddr)
Index ¶
- Variables
- type NullBool
- func (n NullBool) Addr() *bool
- func (n NullBool) IsDefined() bool
- func (n NullBool) IsValid() bool
- func (n NullBool) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
- func (n NullBool) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullBool) MarshalJSON() ([]byte, error)
- func (n NullBool) MarshalText() ([]byte, error)
- func (n *NullBool) Scan(value interface{}) error
- func (n *NullBool) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
- func (n *NullBool) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullBool) UnmarshalJSON(data []byte) error
- func (n *NullBool) UnmarshalText(text []byte) error
- func (n NullBool) Value() (driver.Value, error)
- type NullFloat32
- func (n NullFloat32) Addr() *float32
- func (n NullFloat32) IsDefined() bool
- func (n NullFloat32) IsValid() bool
- func (n NullFloat32) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
- func (n NullFloat32) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullFloat32) MarshalJSON() ([]byte, error)
- func (n NullFloat32) MarshalText() ([]byte, error)
- func (n *NullFloat32) Scan(value interface{}) error
- func (n *NullFloat32) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
- func (n *NullFloat32) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullFloat32) UnmarshalJSON(data []byte) error
- func (n *NullFloat32) UnmarshalText(text []byte) error
- func (n NullFloat32) Value() (driver.Value, error)
- type NullFloat64
- func (n NullFloat64) Addr() *float64
- func (n NullFloat64) IsDefined() bool
- func (n NullFloat64) IsValid() bool
- func (n NullFloat64) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
- func (n NullFloat64) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullFloat64) MarshalJSON() ([]byte, error)
- func (n NullFloat64) MarshalText() ([]byte, error)
- func (n *NullFloat64) Scan(value interface{}) error
- func (n *NullFloat64) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
- func (n *NullFloat64) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullFloat64) UnmarshalJSON(data []byte) error
- func (n *NullFloat64) UnmarshalText(text []byte) error
- func (n NullFloat64) Value() (driver.Value, error)
- type NullInt
- func (n NullInt) Addr() *int
- func (n NullInt) IsDefined() bool
- func (n NullInt) IsValid() bool
- func (n NullInt) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
- func (n NullInt) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullInt) MarshalJSON() ([]byte, error)
- func (n NullInt) MarshalText() ([]byte, error)
- func (n *NullInt) Scan(value interface{}) error
- func (n *NullInt) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
- func (n *NullInt) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullInt) UnmarshalJSON(data []byte) error
- func (n *NullInt) UnmarshalText(text []byte) error
- func (n NullInt) Value() (driver.Value, error)
- type NullInt8
- func (n NullInt8) Addr() *int8
- func (n NullInt8) IsDefined() bool
- func (n NullInt8) IsValid() bool
- func (n NullInt8) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
- func (n NullInt8) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullInt8) MarshalJSON() ([]byte, error)
- func (n NullInt8) MarshalText() ([]byte, error)
- func (n *NullInt8) Scan(value interface{}) error
- func (n *NullInt8) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
- func (n *NullInt8) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullInt8) UnmarshalJSON(data []byte) error
- func (n *NullInt8) UnmarshalText(text []byte) error
- func (n NullInt8) Value() (driver.Value, error)
- type NullInt16
- func (n NullInt16) Addr() *int16
- func (n NullInt16) IsDefined() bool
- func (n NullInt16) IsValid() bool
- func (n NullInt16) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
- func (n NullInt16) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullInt16) MarshalJSON() ([]byte, error)
- func (n NullInt16) MarshalText() ([]byte, error)
- func (n *NullInt16) Scan(value interface{}) error
- func (n *NullInt16) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
- func (n *NullInt16) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullInt16) UnmarshalJSON(data []byte) error
- func (n *NullInt16) UnmarshalText(text []byte) error
- func (n NullInt16) Value() (driver.Value, error)
- type NullInt32
- func (n NullInt32) Addr() *int32
- func (n NullInt32) IsDefined() bool
- func (n NullInt32) IsValid() bool
- func (n NullInt32) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
- func (n NullInt32) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullInt32) MarshalJSON() ([]byte, error)
- func (n NullInt32) MarshalText() ([]byte, error)
- func (n *NullInt32) Scan(value interface{}) error
- func (n *NullInt32) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
- func (n *NullInt32) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullInt32) UnmarshalJSON(data []byte) error
- func (n *NullInt32) UnmarshalText(text []byte) error
- func (n NullInt32) Value() (driver.Value, error)
- type NullInt64
- func (n NullInt64) Addr() *int64
- func (n NullInt64) IsDefined() bool
- func (n NullInt64) IsValid() bool
- func (n NullInt64) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
- func (n NullInt64) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullInt64) MarshalJSON() ([]byte, error)
- func (n NullInt64) MarshalText() ([]byte, error)
- func (n *NullInt64) Scan(value interface{}) error
- func (n *NullInt64) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
- func (n *NullInt64) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullInt64) UnmarshalJSON(data []byte) error
- func (n *NullInt64) UnmarshalText(text []byte) error
- func (n NullInt64) Value() (driver.Value, error)
- type NullString
- func (n NullString) Addr() *string
- func (n NullString) IsDefined() bool
- func (n NullString) IsValid() bool
- func (n NullString) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
- func (n NullString) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullString) MarshalJSON() ([]byte, error)
- func (n NullString) MarshalText() ([]byte, error)
- func (ns *NullString) Scan(value interface{}) error
- func (n *NullString) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
- func (n *NullString) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullString) UnmarshalJSON(data []byte) error
- func (n *NullString) UnmarshalText(text []byte) error
- func (ns NullString) Value() (driver.Value, error)
- type NullTime
- func (n NullTime) Addr() *time.Time
- func (n NullTime) IsDefined() bool
- func (n NullTime) IsValid() bool
- func (n NullTime) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
- func (n NullTime) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullTime) MarshalJSON() ([]byte, error)
- func (n NullTime) MarshalText() ([]byte, error)
- func (n *NullTime) Scan(value interface{}) error
- func (n *NullTime) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
- func (n *NullTime) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullTime) UnmarshalJSON(data []byte) error
- func (n *NullTime) UnmarshalText(text []byte) error
- func (n NullTime) Value() (driver.Value, error)
- type NullUint
- func (n NullUint) Addr() *uint
- func (n NullUint) IsDefined() bool
- func (n NullUint) IsValid() bool
- func (n NullUint) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullUint) MarshalJSON() ([]byte, error)
- func (n NullUint) MarshalText() ([]byte, error)
- func (n *NullUint) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullUint) UnmarshalJSON(data []byte) error
- func (n *NullUint) UnmarshalText(text []byte) error
- type NullUint8
- func (n NullUint8) Addr() *uint8
- func (n NullUint8) IsDefined() bool
- func (n NullUint8) IsValid() bool
- func (n NullUint8) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullUint8) MarshalJSON() ([]byte, error)
- func (n NullUint8) MarshalText() ([]byte, error)
- func (n *NullUint8) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullUint8) UnmarshalJSON(data []byte) error
- func (n *NullUint8) UnmarshalText(text []byte) error
- type NullUint16
- func (n NullUint16) Addr() *uint16
- func (n NullUint16) IsDefined() bool
- func (n NullUint16) IsValid() bool
- func (n NullUint16) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullUint16) MarshalJSON() ([]byte, error)
- func (n NullUint16) MarshalText() ([]byte, error)
- func (n *NullUint16) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullUint16) UnmarshalJSON(data []byte) error
- func (n *NullUint16) UnmarshalText(text []byte) error
- type NullUint32
- func (n NullUint32) Addr() *uint32
- func (n NullUint32) IsDefined() bool
- func (n NullUint32) IsValid() bool
- func (n NullUint32) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullUint32) MarshalJSON() ([]byte, error)
- func (n NullUint32) MarshalText() ([]byte, error)
- func (n *NullUint32) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullUint32) UnmarshalJSON(data []byte) error
- func (n *NullUint32) UnmarshalText(text []byte) error
- type NullUint64
- func (n NullUint64) Addr() *uint64
- func (n NullUint64) IsDefined() bool
- func (n NullUint64) IsValid() bool
- func (n NullUint64) MarshalEasyJSON(out *jwriter.Writer)
- func (n NullUint64) MarshalJSON() ([]byte, error)
- func (n NullUint64) MarshalText() ([]byte, error)
- func (n *NullUint64) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (n *NullUint64) UnmarshalJSON(data []byte) error
- func (n *NullUint64) UnmarshalText(text []byte) error
- type Validator
Constants ¶
This section is empty.
Variables ¶
var EmbeddedSources embed.FS
Functions ¶
This section is empty.
Types ¶
type NullBool ¶
NullBool - nullable bool
func BoolToNullBool
deprecated
func (NullBool) MarshalCQL ¶
MarshalCQL - marshaller for cql
func (NullBool) MarshalEasyJSON ¶
MarshalEasyJSON - marshaller for easyjson
func (NullBool) MarshalJSON ¶
MarshalJSON - marshaller for json
func (NullBool) MarshalText ¶
MarshalText - marshaller for text
func (*NullBool) UnmarshalCQL ¶
UnmarshalCQL - unmarshaller for cql
func (*NullBool) UnmarshalEasyJSON ¶
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullBool) UnmarshalJSON ¶
UnmarshalJSON - unmarshaller for json
func (*NullBool) UnmarshalText ¶
UnmarshalText - unmarshaller for text
type NullFloat32 ¶
NullFloat32 - nullable float32
func Float32Addr ¶
func Float32Addr(v *float32) NullFloat32
Float32Addr - converts float32 address to NullFloat32
func Float32ToNullFloat32
deprecated
func Float32ToNullFloat32(v float32) NullFloat32
Float32ToNullFloat32 - converts float32 to NullFloat32
Deprecated: use shorter variant
func (NullFloat32) Addr ¶
func (n NullFloat32) Addr() *float32
func (NullFloat32) IsDefined ¶
func (n NullFloat32) IsDefined() bool
func (NullFloat32) IsValid ¶
func (n NullFloat32) IsValid() bool
func (NullFloat32) MarshalCQL ¶
func (n NullFloat32) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
MarshalCQL - marshaller for cql
func (NullFloat32) MarshalEasyJSON ¶
func (n NullFloat32) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON - marshaller for easyjson
func (NullFloat32) MarshalJSON ¶
func (n NullFloat32) MarshalJSON() ([]byte, error)
MarshalJSON - marshaller for json
func (NullFloat32) MarshalText ¶
func (n NullFloat32) MarshalText() ([]byte, error)
MarshalText - marshaller for text
func (*NullFloat32) Scan ¶
func (n *NullFloat32) Scan(value interface{}) error
Scan - scan value from sql driver
func (*NullFloat32) UnmarshalCQL ¶
func (n *NullFloat32) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
UnmarshalCQL - unmarshaller for cql
func (*NullFloat32) UnmarshalEasyJSON ¶
func (n *NullFloat32) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullFloat32) UnmarshalJSON ¶
func (n *NullFloat32) UnmarshalJSON(data []byte) error
UnmarshalJSON - unmarshaller for json
func (*NullFloat32) UnmarshalText ¶
func (n *NullFloat32) UnmarshalText(text []byte) error
UnmarshalText - unmarshaller for text
type NullFloat64 ¶
NullFloat64 - nullable float64
func Float64Addr ¶
func Float64Addr(v *float64) NullFloat64
Float64Addr - converts float64 address to NullFloat64
func Float64ToNullFloat64
deprecated
func Float64ToNullFloat64(v float64) NullFloat64
Float64ToNullFloat64 - converts float64 to NullFloat64
Deprecated: use shorter variant
func (NullFloat64) Addr ¶
func (n NullFloat64) Addr() *float64
func (NullFloat64) IsDefined ¶
func (n NullFloat64) IsDefined() bool
func (NullFloat64) IsValid ¶
func (n NullFloat64) IsValid() bool
func (NullFloat64) MarshalCQL ¶
func (n NullFloat64) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
MarshalCQL - marshaller for cql
func (NullFloat64) MarshalEasyJSON ¶
func (n NullFloat64) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON - marshaller for easyjson
func (NullFloat64) MarshalJSON ¶
func (n NullFloat64) MarshalJSON() ([]byte, error)
MarshalJSON - marshaller for json
func (NullFloat64) MarshalText ¶
func (n NullFloat64) MarshalText() ([]byte, error)
MarshalText - marshaller for text
func (*NullFloat64) Scan ¶
func (n *NullFloat64) Scan(value interface{}) error
Scan - scan value from sql driver
func (*NullFloat64) UnmarshalCQL ¶
func (n *NullFloat64) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
UnmarshalCQL - unmarshaller for cql
func (*NullFloat64) UnmarshalEasyJSON ¶
func (n *NullFloat64) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullFloat64) UnmarshalJSON ¶
func (n *NullFloat64) UnmarshalJSON(data []byte) error
UnmarshalJSON - unmarshaller for json
func (*NullFloat64) UnmarshalText ¶
func (n *NullFloat64) UnmarshalText(text []byte) error
UnmarshalText - unmarshaller for text
type NullInt ¶
NullInt - nullable int
func IntToNullInt
deprecated
func (NullInt) MarshalCQL ¶
MarshalCQL - marshaller for cql
func (NullInt) MarshalEasyJSON ¶
MarshalEasyJSON - marshaller for easyjson
func (NullInt) MarshalJSON ¶
MarshalJSON - marshaller for json
func (NullInt) MarshalText ¶
MarshalText - marshaller for text
func (*NullInt) UnmarshalCQL ¶
UnmarshalCQL - unmarshaller for cql
func (*NullInt) UnmarshalEasyJSON ¶
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullInt) UnmarshalJSON ¶
UnmarshalJSON - unmarshaller for json
func (*NullInt) UnmarshalText ¶
UnmarshalText - unmarshaller for text
type NullInt8 ¶
NullInt8 - nullable int8
func Int8ToNullInt8
deprecated
func (NullInt8) MarshalCQL ¶
MarshalCQL - marshaller for cql
func (NullInt8) MarshalEasyJSON ¶
MarshalEasyJSON - marshaller for easyjson
func (NullInt8) MarshalJSON ¶
MarshalJSON - marshaller for json
func (NullInt8) MarshalText ¶
MarshalText - marshaller for text
func (*NullInt8) UnmarshalCQL ¶
UnmarshalCQL - unmarshaller for cql
func (*NullInt8) UnmarshalEasyJSON ¶
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullInt8) UnmarshalJSON ¶
UnmarshalJSON - unmarshaller for json
func (*NullInt8) UnmarshalText ¶
UnmarshalText - unmarshaller for text
type NullInt16 ¶
NullInt16 - nullable int16
func Int16ToNullInt16
deprecated
func (NullInt16) MarshalCQL ¶
MarshalCQL - marshaller for cql
func (NullInt16) MarshalEasyJSON ¶
MarshalEasyJSON - marshaller for easyjson
func (NullInt16) MarshalJSON ¶
MarshalJSON - marshaller for json
func (NullInt16) MarshalText ¶
MarshalText - marshaller for text
func (*NullInt16) UnmarshalCQL ¶
UnmarshalCQL - unmarshaller for cql
func (*NullInt16) UnmarshalEasyJSON ¶
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullInt16) UnmarshalJSON ¶
UnmarshalJSON - unmarshaller for json
func (*NullInt16) UnmarshalText ¶
UnmarshalText - unmarshaller for text
type NullInt32 ¶
NullInt32 - nullable int32
func Int32ToNullInt32
deprecated
func (NullInt32) MarshalCQL ¶
MarshalCQL - marshaller for cql
func (NullInt32) MarshalEasyJSON ¶
MarshalEasyJSON - marshaller for easyjson
func (NullInt32) MarshalJSON ¶
MarshalJSON - marshaller for json
func (NullInt32) MarshalText ¶
MarshalText - marshaller for text
func (*NullInt32) UnmarshalCQL ¶
UnmarshalCQL - unmarshaller for cql
func (*NullInt32) UnmarshalEasyJSON ¶
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullInt32) UnmarshalJSON ¶
UnmarshalJSON - unmarshaller for json
func (*NullInt32) UnmarshalText ¶
UnmarshalText - unmarshaller for text
type NullInt64 ¶
NullInt64 - nullable int64
func Int64ToNullInt64
deprecated
func (NullInt64) MarshalCQL ¶
MarshalCQL - marshaller for cql
func (NullInt64) MarshalEasyJSON ¶
MarshalEasyJSON - marshaller for easyjson
func (NullInt64) MarshalJSON ¶
MarshalJSON - marshaller for json
func (NullInt64) MarshalText ¶
MarshalText - marshaller for text
func (*NullInt64) UnmarshalCQL ¶
UnmarshalCQL - unmarshaller for cql
func (*NullInt64) UnmarshalEasyJSON ¶
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullInt64) UnmarshalJSON ¶
UnmarshalJSON - unmarshaller for json
func (*NullInt64) UnmarshalText ¶
UnmarshalText - unmarshaller for text
type NullString ¶
NullString - nullable string
func StringAddr ¶
func StringAddr(v *string) NullString
StringAddr - converts string address to NullString
func StringToNullString
deprecated
func StringToNullString(v string) NullString
StringToNullString - converts string to NullString
Deprecated: use shorter variant
func (NullString) Addr ¶
func (n NullString) Addr() *string
func (NullString) IsDefined ¶
func (n NullString) IsDefined() bool
func (NullString) IsValid ¶
func (n NullString) IsValid() bool
func (NullString) MarshalCQL ¶
func (n NullString) MarshalCQL(info gocql.TypeInfo) ([]byte, error)
MarshalCQL - marshaller for cql
func (NullString) MarshalEasyJSON ¶
func (n NullString) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON - marshaller for easyjson
func (NullString) MarshalJSON ¶
func (n NullString) MarshalJSON() ([]byte, error)
MarshalJSON - marshaller for json
func (NullString) MarshalText ¶
func (n NullString) MarshalText() ([]byte, error)
MarshalText - marshaller for text
func (*NullString) Scan ¶
func (ns *NullString) Scan(value interface{}) error
Scan - scan value from sql driver
func (*NullString) UnmarshalCQL ¶
func (n *NullString) UnmarshalCQL(info gocql.TypeInfo, data []byte) error
UnmarshalCQL - unmarshaller for cql
func (*NullString) UnmarshalEasyJSON ¶
func (n *NullString) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullString) UnmarshalJSON ¶
func (n *NullString) UnmarshalJSON(data []byte) error
UnmarshalJSON - unmarshaller for json
func (*NullString) UnmarshalText ¶
func (n *NullString) UnmarshalText(text []byte) error
UnmarshalText - unmarshaller for text
type NullTime ¶
NullTime - nullable time.Time
func TimeToNullTime
deprecated
func (NullTime) MarshalCQL ¶
MarshalCQL - marshaller for cql
func (NullTime) MarshalEasyJSON ¶
MarshalEasyJSON - marshaller for easyjson
func (NullTime) MarshalJSON ¶
MarshalJSON - marshaller for json
func (NullTime) MarshalText ¶
MarshalText - marshaller for text
func (*NullTime) UnmarshalCQL ¶
UnmarshalCQL - unmarshaller for cql
func (*NullTime) UnmarshalEasyJSON ¶
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullTime) UnmarshalJSON ¶
UnmarshalJSON - unmarshaller for json
func (*NullTime) UnmarshalText ¶
UnmarshalText - unmarshaller for text
type NullUint ¶
NullUint - nullable uint
func (NullUint) MarshalEasyJSON ¶
MarshalEasyJSON - marshaller for easyjson
func (NullUint) MarshalJSON ¶
MarshalJSON - marshaller for json
func (NullUint) MarshalText ¶
MarshalText - marshaller for text
func (*NullUint) UnmarshalEasyJSON ¶
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullUint) UnmarshalJSON ¶
UnmarshalJSON - unmarshaller for json
func (*NullUint) UnmarshalText ¶
UnmarshalText - unmarshaller for text
type NullUint8 ¶
NullUint8 - nullable uint8
func (NullUint8) MarshalEasyJSON ¶
MarshalEasyJSON - marshaller for easyjson
func (NullUint8) MarshalJSON ¶
MarshalJSON - marshaller for json
func (NullUint8) MarshalText ¶
MarshalText - marshaller for text
func (*NullUint8) UnmarshalEasyJSON ¶
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullUint8) UnmarshalJSON ¶
UnmarshalJSON - unmarshaller for json
func (*NullUint8) UnmarshalText ¶
UnmarshalText - unmarshaller for text
type NullUint16 ¶
NullUint16 - nullable uint16
func Uint16Addr ¶
func Uint16Addr(v *uint16) NullUint16
Uint16Addr - converts uint16 address to NullUint16
func (NullUint16) Addr ¶
func (n NullUint16) Addr() *uint16
func (NullUint16) IsDefined ¶
func (n NullUint16) IsDefined() bool
func (NullUint16) IsValid ¶
func (n NullUint16) IsValid() bool
func (NullUint16) MarshalEasyJSON ¶
func (n NullUint16) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON - marshaller for easyjson
func (NullUint16) MarshalJSON ¶
func (n NullUint16) MarshalJSON() ([]byte, error)
MarshalJSON - marshaller for json
func (NullUint16) MarshalText ¶
func (n NullUint16) MarshalText() ([]byte, error)
MarshalText - marshaller for text
func (*NullUint16) UnmarshalEasyJSON ¶
func (n *NullUint16) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullUint16) UnmarshalJSON ¶
func (n *NullUint16) UnmarshalJSON(data []byte) error
UnmarshalJSON - unmarshaller for json
func (*NullUint16) UnmarshalText ¶
func (n *NullUint16) UnmarshalText(text []byte) error
UnmarshalText - unmarshaller for text
type NullUint32 ¶
NullUint32 - nullable uint32
func Uint32Addr ¶
func Uint32Addr(v *uint32) NullUint32
Uint32Addr - converts uint32 address to NullUint32
func (NullUint32) Addr ¶
func (n NullUint32) Addr() *uint32
func (NullUint32) IsDefined ¶
func (n NullUint32) IsDefined() bool
func (NullUint32) IsValid ¶
func (n NullUint32) IsValid() bool
func (NullUint32) MarshalEasyJSON ¶
func (n NullUint32) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON - marshaller for easyjson
func (NullUint32) MarshalJSON ¶
func (n NullUint32) MarshalJSON() ([]byte, error)
MarshalJSON - marshaller for json
func (NullUint32) MarshalText ¶
func (n NullUint32) MarshalText() ([]byte, error)
MarshalText - marshaller for text
func (*NullUint32) UnmarshalEasyJSON ¶
func (n *NullUint32) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullUint32) UnmarshalJSON ¶
func (n *NullUint32) UnmarshalJSON(data []byte) error
UnmarshalJSON - unmarshaller for json
func (*NullUint32) UnmarshalText ¶
func (n *NullUint32) UnmarshalText(text []byte) error
UnmarshalText - unmarshaller for text
type NullUint64 ¶
NullUint64 - nullable uint64
func Uint64Addr ¶
func Uint64Addr(v *uint64) NullUint64
Uint64Addr - converts uint64 address to NullUint64
func (NullUint64) Addr ¶
func (n NullUint64) Addr() *uint64
func (NullUint64) IsDefined ¶
func (n NullUint64) IsDefined() bool
func (NullUint64) IsValid ¶
func (n NullUint64) IsValid() bool
func (NullUint64) MarshalEasyJSON ¶
func (n NullUint64) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON - marshaller for easyjson
func (NullUint64) MarshalJSON ¶
func (n NullUint64) MarshalJSON() ([]byte, error)
MarshalJSON - marshaller for json
func (NullUint64) MarshalText ¶
func (n NullUint64) MarshalText() ([]byte, error)
MarshalText - marshaller for text
func (*NullUint64) UnmarshalEasyJSON ¶
func (n *NullUint64) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON - unmarshaller for easyjson
func (*NullUint64) UnmarshalJSON ¶
func (n *NullUint64) UnmarshalJSON(data []byte) error
UnmarshalJSON - unmarshaller for json
func (*NullUint64) UnmarshalText ¶
func (n *NullUint64) UnmarshalText(text []byte) error
UnmarshalText - unmarshaller for text