Documentation ¶ Index ¶ type JSON func NewJSON(v interface{}) JSON func (j JSON) Equals(j1 JSON) bool func (j JSON) IsNull() bool func (j JSON) MarshalJSON() ([]byte, error) func (j *JSON) Scan(value interface{}) error func (j *JSON) UnmarshalJSON(data []byte) error func (j JSON) Value() (driver.Value, error) type Time func Now() Time func NowPointer() *Time func (t *Time) Scan(v interface{}) error func (t Time) Value() (driver.Value, error) func (t *Time) YmdHis() string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type JSON ¶ type JSON []byte func NewJSON ¶ added in v0.0.4 func NewJSON(v interface{}) JSON func (JSON) Equals ¶ func (j JSON) Equals(j1 JSON) bool func (JSON) IsNull ¶ func (j JSON) IsNull() bool func (JSON) MarshalJSON ¶ func (j JSON) MarshalJSON() ([]byte, error) func (*JSON) Scan ¶ func (j *JSON) Scan(value interface{}) error func (*JSON) UnmarshalJSON ¶ func (j *JSON) UnmarshalJSON(data []byte) error func (JSON) Value ¶ func (j JSON) Value() (driver.Value, error) type Time ¶ type Time struct { time.Time } func Now ¶ func Now() Time func NowPointer ¶ func NowPointer() *Time func (*Time) Scan ¶ func (t *Time) Scan(v interface{}) error Scan 读取数据库时会调用该方法将时间数据转换成自定义时间类型 func (Time) Value ¶ func (t Time) Value() (driver.Value, error) Value 写入数据库时会调用该方法将自定义时间类型转换并写入数据库 func (*Time) YmdHis ¶ func (t *Time) YmdHis() string Source Files ¶ View all Source files json.go time.go Click to show internal directories. Click to hide internal directories.