Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultTimeLayout DefaultTimeLayout DefaultTimeLayout string = "2006年01月02日 15:04:05" )
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array []string
Array json传数组类型 Array => sql text "1,2,3,4" field
func (*Array) MarshalJSON ¶
MarshalJSON 对象到json转换 接口展示
func (*Array) UnmarshalJSON ¶
UnmarshalJSON req.body []byte=>对象,记得调用json.Unmarshal要新建原始类型进行绑定,不如会死循环
type JSONObject ¶
type JSONObject struct {
JSON map[string]interface{} `gorm:"type:text"`
}
JSONObject json => sql text field
func (*JSONObject) MarshalJSON ¶
func (j *JSONObject) MarshalJSON() (b []byte, err error)
MarshalJSON MarshalJSON
func (*JSONObject) UnmarshalJSON ¶
func (j *JSONObject) UnmarshalJSON(b []byte) error
UnmarshalJSON UnmarshalJSON
type LocalTime ¶
LocalTime LocalTime
func (LocalTime) MarshalJSON ¶
MarshalJSON json格式化时间的方法
func (*LocalTime) UnmarshalJSON ¶
UnmarshalJSON UnmarshalJSON
type Money ¶
type Money float64
Money Moneytype StrictFloat64 float64
func (Money) MarshalJSON ¶
MarshalJSON json格式化时间的方法
func (*Money) UnmarshalJSON ¶
UnmarshalJSON UnmarshalJSON
type NumberTime ¶
NumberTime 时间戳
func (NumberTime) MarshalJSON ¶
func (t NumberTime) MarshalJSON() ([]byte, error)
MarshalJSON json格式化时间的方法
func (*NumberTime) UnmarshalJSON ¶
func (t *NumberTime) UnmarshalJSON(b []byte) error
UnmarshalJSON UnmarshalJSON
Click to show internal directories.
Click to hide internal directories.