Documentation
¶
Overview ¶
Package time GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE
Index ¶
- Variables
- func AddSupportedLayout(layout string, location *time.Location)
- func IsDuration(str string) bool
- func ParseDuration(cand string) (time.Duration, error)
- func SetOutputLayout(layout string, location *time.Location)
- func Sub(t Timestamp, u Timestamp) time.Duration
- type CreationModificationTime
- type CreationTime
- type CreationUpdationDeletionTime
- type CreationUpdationTime
- type Duration
- type Timestamp
- func (Timestamp) DataType(engine string) string
- func (dt Timestamp) Date() (int, time.Month, int)
- func (dt Timestamp) Day() int
- func (dt Timestamp) Format(layout string) string
- func (dt Timestamp) In(loc *time.Location) Timestamp
- func (dt Timestamp) IsZero() bool
- func (dt Timestamp) MarshalText() ([]byte, error)
- func (dt Timestamp) Month() time.Month
- func (Timestamp) OpenAPISchemaFormat() string
- func (dt *Timestamp) Scan(value interface{}) error
- func (dt Timestamp) String() string
- func (dt Timestamp) Unix() int64
- func (dt *Timestamp) UnmarshalText(data []byte) (err error)
- func (dt Timestamp) Value() (driver.Value, error)
- func (dt Timestamp) Year() int
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UTC = time.UTC TimestampZero = Timestamp(time.Time{}) TimestampUnixZero = Timestamp(time.Unix(0, 0)) )
View Source
var CST = time.UTC
Functions ¶
func AddSupportedLayout ¶
func IsDuration ¶
func SetOutputLayout ¶
Types ¶
type CreationModificationTime ¶
type CreationModificationTime struct { CreationTime // 更新时间 UpdatedAt Timestamp `db:"f_updated_at,default='0'" json:"updatedAt"` }
func (*CreationModificationTime) RuntimeDoc ¶
func (v *CreationModificationTime) RuntimeDoc(names ...string) ([]string, bool)
type CreationTime ¶
type CreationTime struct { // 创建时间 CreatedAt Timestamp `db:"f_created_at,default='0'" json:"createdAt"` }
func (*CreationTime) MarkCreatedAt ¶
func (times *CreationTime) MarkCreatedAt()
func (*CreationTime) RuntimeDoc ¶
func (v *CreationTime) RuntimeDoc(names ...string) ([]string, bool)
type CreationUpdationDeletionTime ¶
type CreationUpdationDeletionTime struct { CreationUpdationTime // 删除时间 DeletedAt Timestamp `db:"f_deleted_at,default='0'" json:"deletedAt,omitempty"` }
func (*CreationUpdationDeletionTime) MarkDeletedAt ¶
func (times *CreationUpdationDeletionTime) MarkDeletedAt()
func (*CreationUpdationDeletionTime) RuntimeDoc ¶
func (v *CreationUpdationDeletionTime) RuntimeDoc(names ...string) ([]string, bool)
func (CreationUpdationDeletionTime) SoftDeleteFieldAndZeroValue ¶
func (CreationUpdationDeletionTime) SoftDeleteFieldAndZeroValue() (string, driver.Value)
type CreationUpdationTime ¶
type CreationUpdationTime = CreationModificationTime
func (*CreationUpdationTime) MarkCreatedAt ¶
func (times *CreationUpdationTime) MarkCreatedAt()
func (*CreationUpdationTime) MarkModifiedAt ¶
func (times *CreationUpdationTime) MarkModifiedAt()
type Duration ¶
func (Duration) MarshalText ¶
func (Duration) OpenAPISchemaFormat ¶
func (*Duration) UnmarshalText ¶
type Timestamp ¶
func (Timestamp) MarshalText ¶
func (Timestamp) OpenAPISchemaFormat ¶
func (*Timestamp) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.