logstruct

package module
v0.0.0-...-37756f1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 8 Imported by: 0

README

Простая библиотека для логирования структур через тэг log. Создана для logrus.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fields

func Fields(str interface{}) logrus.Fields

Types

type NullBool

type NullBool sql.NullBool

NullBool is an alias for sql.NullBool data type

func (NullBool) MarshalJSON

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

MarshalJSON for NullBool

func (*NullBool) Scan

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

Scan implements the Scanner interface for NullBool

func (*NullBool) UnmarshalJSON

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

UnmarshalJSON for NullBool

func (NullBool) Value

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

Value implements the driver Valuer interface.

type NullFloat64

type NullFloat64 sql.NullFloat64

NullFloat64 is an alias for sql.NullFloat64 data type

func NewFloat64

func NewFloat64(f float64) NullFloat64

NewFloat64 конструктор Float64

func (NullFloat64) MarshalJSON

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

MarshalJSON for NullFloat64

func (*NullFloat64) Scan

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

Scan implements the Scanner interface for NullFloat64

func (*NullFloat64) UnmarshalJSON

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

UnmarshalJSON for NullFloat64

func (NullFloat64) Value

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

Value implements the driver Valuer interface.

type NullInt64

type NullInt64 sql.NullInt64

NullInt64 is an alias for sql.NullInt64 data type

func NewInt64

func NewInt64(i int) NullInt64

NewInt64 конструктор Int64

func (*NullInt64) GetInt

func (ni *NullInt64) GetInt() int

GetInt get int

func (NullInt64) MarshalJSON

func (ni NullInt64) MarshalJSON() ([]byte, error)

MarshalJSON for NullInt64

func (*NullInt64) Scan

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

Scan implements the Scanner interface for NullInt64

func (*NullInt64) UnmarshalJSON

func (ni *NullInt64) UnmarshalJSON(b []byte) error

UnmarshalJSON for NullInt64

func (NullInt64) Value

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

Value implements the driver Valuer interface.

type NullString

type NullString sql.NullString

NullString is an alias for sql.NullString data type

func NewString

func NewString(s string) NullString

NewString конструктор String

func (NullString) MarshalJSON

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

MarshalJSON for NullString

func (*NullString) OptionalResult

func (ns *NullString) OptionalResult() string

OptionalResult опциональный результат

func (*NullString) Scan

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

Scan implements the Scanner interface for NullString

func (*NullString) UnmarshalJSON

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

UnmarshalJSON for NullString

func (NullString) Value

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

Value implements the driver Valuer interface.

type NullTime

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

NullTime дата-время которое может быть null

func NewNullTime

func NewNullTime(d time.Time) NullTime

NewNullTime конструктор NullTime

func (NullTime) Format

func (nt NullTime) Format(layout string) string

Format implements the driver Formatr interface.

func (NullTime) MarshalJSON

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

MarshalJSON try to marshalize to json

func (*NullTime) Scan

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

Scan implements the Scanner interface.

func (*NullTime) UnmarshalJSON

func (nt *NullTime) UnmarshalJSON(b []byte) error

UnmarshalJSON try to unmarshal data from input

func (NullTime) Value

func (nt NullTime) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type SqlNullValue

type SqlNullValue interface {
	Value() (driver.Value, error)
}

Jump to

Keyboard shortcuts

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