datetime

package
v0.0.0-...-a172071 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date struct {
	time.Time
}

日期

func (Date) MarshalJSON

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

编码为自定义的Json格式

func (*Date) Scan

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

数据库值转换为Date

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(data []byte) error

将Json格式解码

func (Date) Value

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

转换为数据库值

type Datetime

type Datetime struct {
	time.Time
}

日期时间

func (Datetime) MarshalJSON

func (d Datetime) MarshalJSON() ([]byte, error)

编码为自定义的Json格式

func (*Datetime) Scan

func (d *Datetime) Scan(value interface{}) error

数据库值转换为Datetime

func (*Datetime) UnmarshalJSON

func (d *Datetime) UnmarshalJSON(data []byte) error

将Json格式解码

func (Datetime) Value

func (d Datetime) Value() (driver.Value, error)

转换为数据库值

type Time

type Time struct {
	time.Time
}

时间

func (Time) MarshalJSON

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

编码为自定义的Json格式

func (*Time) Scan

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

数据库值转换为Time

func (*Time) UnmarshalJSON

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

将Json格式解码

func (Time) Value

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

转换为数据库值

Jump to

Keyboard shortcuts

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