types

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 11 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decode

type Decode struct {
	// contains filtered or unexported fields
}

Decode структура для декодирования jsoniter.API

func (*Decode) Decode

func (d *Decode) Decode(r io.Reader, val interface{}) error

Decode метод для декодирования

func (*Decode) Encode

func (d *Decode) Encode(w io.Writer, value interface{}) error

Encode метод для кодирования

type Decoder

type Decoder interface {
	Decode(r io.Reader, val interface{}) error
	Encode(w io.Writer, value interface{}) error
}

Decoder интерфейс для декодирования

func NewDecoder

func NewDecoder(args ...jsoniter.Config) Decoder

NewDecoder конструктор

type NullBool

type NullBool struct {
	sql.NullBool
}

func NewNullBool

func NewNullBool(b bool) NullBool

func (*NullBool) MarshalJSON

func (x *NullBool) MarshalJSON() ([]byte, error)

MarshalJSON method is called by json.Marshal, whenever it is of type NullString

func (*NullBool) UnmarshalJSON

func (x *NullBool) UnmarshalJSON(data []byte) error

type NullFloat64

type NullFloat64 struct {
	sql.NullFloat64
}

func NewNullFloat64

func NewNullFloat64(n float64) NullFloat64

func (*NullFloat64) MarshalJSON

func (x *NullFloat64) MarshalJSON() ([]byte, error)

MarshalJSON method is called by json.Marshal, whenever it is of type NullFloat64

func (*NullFloat64) UnmarshalJSON

func (x *NullFloat64) UnmarshalJSON(data []byte) error

type NullInt64

type NullInt64 struct {
	sql.NullInt64
}

func NewNullInt64

func NewNullInt64(n int64) NullInt64

func (*NullInt64) MarshalJSON

func (x *NullInt64) MarshalJSON() ([]byte, error)

MarshalJSON method is called by json.Marshal, whenever it is of type NullString

func (*NullInt64) UnmarshalJSON

func (x *NullInt64) UnmarshalJSON(data []byte) error

type NullString

type NullString struct {
	sql.NullString
}

NullString is a wrapper around sql.NullString

func NewNullString

func NewNullString(s string) NullString

func (*NullString) MarshalJSON

func (x *NullString) MarshalJSON() ([]byte, error)

MarshalJSON method is called by json.Marshal, whenever it is of type NullString

func (*NullString) UnmarshalJSON

func (x *NullString) UnmarshalJSON(data []byte) error

type NullTime

type NullTime struct {
	null.Time
}

func NewNullTime

func NewNullTime(t time.Time) NullTime

type NullUUID

type NullUUID struct {
	Binary []byte
	Valid  bool
	String string
}

func NewNullUUID

func NewNullUUID(s ...string) NullUUID

func (*NullUUID) MarshalJSON

func (x *NullUUID) MarshalJSON() ([]byte, error)

func (*NullUUID) Scan

func (x *NullUUID) Scan(value interface{}) error

Scan implements the Scanner interface.

func (*NullUUID) UnmarshalJSON

func (x *NullUUID) UnmarshalJSON(data []byte) error

func (*NullUUID) Value

func (x *NullUUID) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullUint64

type NullUint64 struct {
	null.Uint64
}

func NewNullUint64

func NewNullUint64(n uint64) NullUint64

Jump to

Keyboard shortcuts

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