types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DateFormat = "2006-01-02"
View Source
const DateTimeFormat = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date struct {
	time.Time
}

func NewDate

func NewDate(value string) *Date

NewDate 构建 Date 方法 Author SliverHorn

func NewDateByLayout

func NewDateByLayout(layout, value string) *Date

NewDateByLayout 构建 Date by layout Author SliverHorn

func (*Date) CostMonth

func (d *Date) CostMonth() string

CostMonth 获取时间所属月份 2021-05-13 17:48:00 => May-21 Author SliverHorn

func (Date) GormDataType

func (d Date) GormDataType() string

GormDataType gorm 定义数据库字段类型 Author SliverHorn

func (*Date) MarshalJSON

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

MarshalJSON 序列化 Author SliverHorn

func (*Date) Scan

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

Scan 扫描 Author SliverHorn

func (*Date) ToDatetime

func (d *Date) ToDatetime() *Datetime

ToDatetime Date to Datetime Author SliverHorn

func (*Date) UnmarshalJSON

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

UnmarshalJSON 反序列化 Author SliverHorn

func (Date) Value

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

Value 值 Author SliverHorn

type Datetime

type Datetime struct {
	time.Time
}

func NewDatetime

func NewDatetime(value string) *Datetime

NewDatetime 构建 Datetime 方法 Author SliverHorn

func NewDatetimeByLayout

func NewDatetimeByLayout(layout, value string) *Datetime

NewDatetimeByLayout 构建 Datetime by layout Author SliverHorn

func (*Datetime) CostMonth

func (d *Datetime) CostMonth() string

CostMonth 获取时间所属月份 2021-05-13 17:48:00 => May-21 Author SliverHorn

func (*Datetime) GormDataType

func (d *Datetime) GormDataType() string

GormDataType gorm 定义数据库字段类型 Author SliverHorn

func (*Datetime) MarshalJSON

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

MarshalJSON 序列化 Author SliverHorn

func (*Datetime) Scan

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

Scan 扫描 Author SliverHorn

func (*Datetime) ToDate

func (d *Datetime) ToDate() *Date

ToDate Datetime 2 Date Author SliverHorn

func (*Datetime) ToTime

func (d *Datetime) ToTime() *time.Time

ToTime Datetime 2 *time.Time Author SliverHorn

func (*Datetime) UnmarshalJSON

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

UnmarshalJSON 反序列化 Author SliverHorn

func (Datetime) Value

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

Value 值 Author SliverHorn

type UintSlice

type UintSlice struct {
	Uints []uint
}

UintSlice uint 切片

Jump to

Keyboard shortcuts

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