null

package module
v0.0.0-...-89f02b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2020 License: MIT Imports: 4 Imported by: 0

README

NULL

Extension of sql.Null* types that implemets also json.Marshaler and json.Unmarshaler interfaces.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool struct {
	Bool  bool
	Valid bool
}

func (Bool) MarshalJSON

func (n Bool) MarshalJSON() ([]byte, error)

func (Bool) Ptr

func (n Bool) Ptr() *bool

func (*Bool) Scan

func (n *Bool) Scan(value interface{}) error

Scan implements the Scanner interface.

func (*Bool) UnmarshalJSON

func (n *Bool) UnmarshalJSON(data []byte) error

func (Bool) Value

func (n Bool) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Float64

type Float64 struct {
	Float64 float64
	Valid   bool
}

func (Float64) MarshalJSON

func (n Float64) MarshalJSON() ([]byte, error)

func (Float64) Ptr

func (n Float64) Ptr() *float64

func (*Float64) Scan

func (n *Float64) Scan(value interface{}) error

Scan implements the Scanner interface.

func (*Float64) UnmarshalJSON

func (n *Float64) UnmarshalJSON(data []byte) error

func (Float64) Value

func (n Float64) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Int32

type Int32 struct {
	Int32 int32
	Valid bool
}

func (Int32) MarshalJSON

func (n Int32) MarshalJSON() ([]byte, error)

func (Int32) Ptr

func (n Int32) Ptr() *int32

func (*Int32) Scan

func (n *Int32) Scan(value interface{}) error

Scan implements the Scanner interface.

func (*Int32) UnmarshalJSON

func (n *Int32) UnmarshalJSON(data []byte) error

func (Int32) Value

func (n Int32) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Int64

type Int64 struct {
	Int64 int64
	Valid bool
}

func (Int64) MarshalJSON

func (n Int64) MarshalJSON() ([]byte, error)

func (Int64) Ptr

func (n Int64) Ptr() *int64

func (*Int64) Scan

func (n *Int64) Scan(value interface{}) error

Scan implements the Scanner interface.

func (*Int64) UnmarshalJSON

func (n *Int64) UnmarshalJSON(data []byte) error

func (Int64) Value

func (n Int64) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type String

type String struct {
	String string
	Valid  bool
}

func (String) MarshalJSON

func (n String) MarshalJSON() ([]byte, error)

func (String) Ptr

func (n String) Ptr() *string

func (*String) Scan

func (n *String) Scan(value interface{}) error

Scan implements the Scanner interface.

func (*String) UnmarshalJSON

func (n *String) UnmarshalJSON(data []byte) error

func (String) Value

func (n String) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Time

type Time struct {
	Time  time.Time
	Valid bool
}

func (Time) MarshalJSON

func (n Time) MarshalJSON() ([]byte, error)

func (Time) Ptr

func (n Time) Ptr() *time.Time

func (*Time) Scan

func (n *Time) Scan(value interface{}) error

Scan implements the Scanner interface.

func (*Time) UnmarshalJSON

func (n *Time) UnmarshalJSON(data []byte) error

func (Time) Value

func (n Time) Value() (driver.Value, error)

Value implements the driver Valuer interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL