null

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

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 NewBool

func NewBool(v interface{}) (*Bool, error)

func (Bool) MarshalJSON

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

MarshalJSON correctly serializes a Bool to JSON

func (*Bool) Scan

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

Scan implements the Scanner interface.

func (*Bool) UnmarshalJSON

func (nb *Bool) UnmarshalJSON(b []byte) error

func (Bool) Value

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

Value implements the driver Valuer interface.

type Date

type Date struct {
	Time  time.Time
	Valid bool // is true if Time is not NULL
}

func NewDate

func NewDate(v interface{}) (*Date, error)

NewDate Создание Date переменной

func (Date) MarshalJSON

func (nd Date) MarshalJSON() ([]byte, error)

func (*Date) Scan

func (nd *Date) Scan(value interface{}) error

Scan implements the Scanner interface for Date

func (*Date) UnmarshalJSON

func (nd *Date) UnmarshalJSON(b []byte) (err error)

func (Date) Value

func (nd Date) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Float64

type Float64 struct {
	Float64   float64
	Valid     bool
	Precision int
}

func NewFloat64

func NewFloat64(value interface{}, prc int) (*Float64, error)

func (Float64) MarshalJSON

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

func (*Float64) Scan

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

func (*Float64) UnmarshalJSON

func (nf *Float64) UnmarshalJSON(b []byte) error

func (Float64) Value

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

type Int64

type Int64 struct {
	Int64 int64
	Valid bool
}

Int64 Реализация Int64

func NewInt64

func NewInt64(v interface{}) (*Int64, error)

func (Int64) MarshalJSON

func (ni Int64) MarshalJSON() (b []byte, err error)

MarshalJSON correctly serializes a Int64 to JSON

func (*Int64) Scan

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

func (*Int64) UnmarshalJSON

func (ni *Int64) UnmarshalJSON(b []byte) (err error)

func (Int64) Value

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

Value implements the driver Valuer interface.

type String

type String struct {
	String string
	Valid  bool // is true if String is not NULL
}

String Реализация String

func NewString

func NewString(v interface{}) (*String, error)

NewString Создание String переменной

func NewStringf

func NewStringf(format string, a ...interface{}) (*String, error)

NewStringf Создание String переменной по текстовому формату с аргументами

func (String) MarshalJSON

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

MarshalJSON correctly serializes a String to JSON

func (*String) Scan

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

Scan implements the Scanner interface.

func (*String) UnmarshalJSON

func (ns *String) UnmarshalJSON(b []byte) error

MarshalJSON correctly serializes a String to JSON

func (String) Value

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

Value implements the driver Valuer interface.

type Time

type Time struct {
	Time  time.Time
	Valid bool // isValid is true if Time is not NULL
}

func NewTime

func NewTime(v interface{}) (*Time, error)

NewTime Создание Time переменной

func (Time) MarshalJSON

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

func (*Time) Scan

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

Scan implements the Scanner interface for Time

func (*Time) UnmarshalJSON

func (nt *Time) UnmarshalJSON(b []byte) (err error)

func (Time) Value

func (nt 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