Documentation ¶
Index ¶
- Constants
- func AutoSet(data interface{}, fields ...string)
- type Timestamp
- func (t Timestamp) GetBSON() (interface{}, error)
- func (t Timestamp) MarshalJSON() ([]byte, error)
- func (t Timestamp) Pointer() *Timestamp
- func (t *Timestamp) Scan(value interface{}) error
- func (t *Timestamp) SetBSON(raw bson.Raw) error
- func (t *Timestamp) UnmarshalJSON(b []byte) error
- func (t Timestamp) Value() (driver.Value, error)
Constants ¶
View Source
const TimestampFormatLayout = "2006-01-02 15:04:05"
TimestampFormatLayout formatlayout, save in mysql
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Timestamp ¶
Timestamp unix timestamp
func NewWithTime ¶
NewWithTime return a specified time's Timestamp
func (Timestamp) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.