Documentation ¶
Index ¶
- Constants
- type CommonList
- type CommonResp
- type NormalTime
- func (t *NormalTime) IsEmpty() bool
- func (t NormalTime) MarshalJSON() ([]byte, error)
- func (t *NormalTime) Scan(v interface{}) error
- func (t *NormalTime) String() string
- func (t *NormalTime) UnmarshalJSON(data []byte) error
- func (t NormalTime) Value() (driver.Value, error)
- func (t *NormalTime) YearMonthDate() string
- type PaginationParams
- type ProportionOfSomething
- type UnixTime
- func (t *UnixTime) IsEmpty() bool
- func (t UnixTime) MarshalJSON() ([]byte, error)
- func (t *UnixTime) Scan(v interface{}) error
- func (t *UnixTime) String() string
- func (t *UnixTime) UnmarshalJSON(data []byte) error
- func (t UnixTime) Value() (driver.Value, error)
- func (t *UnixTime) YearMonthDate() string
Constants ¶
View Source
const ( SuccessCode = 0 ErrorCode = 1 ForbiddenCode = 2 ExpireCode = 3 )
code for common response type
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonList ¶
type CommonList struct { Total int `json:"total"` List interface{} `json:"list"` }
type CommonResp ¶
type CommonResp struct { Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` Error interface{} `json:"error"` }
CommonResp - api common response type success - {"code": 0, "msg": "", "data": {}, "error": null} error - {"code": 1, "msg": "", "data": {}, "error": null} forbidden - {"code": 2, "msg": "", "data": {}, "error": null} expire - {"code": 3, "msg": "", "data": {}, "error": null}
type NormalTime ¶
func NewNormalTime ¶
func NewNormalTime(t time.Time) NormalTime
func NewNormalTimeFromUnix ¶
func NewNormalTimeFromUnix(timestamp int64) NormalTime
func NewUnixTime ¶
func NewUnixTime(t time.Time) NormalTime
func NewUnixTimeFromUnix ¶
func NewUnixTimeFromUnix(timestamp int64) NormalTime
func (*NormalTime) IsEmpty ¶
func (t *NormalTime) IsEmpty() bool
func (NormalTime) MarshalJSON ¶
func (t NormalTime) MarshalJSON() ([]byte, error)
func (*NormalTime) Scan ¶
func (t *NormalTime) Scan(v interface{}) error
func (*NormalTime) String ¶
func (t *NormalTime) String() string
func (*NormalTime) UnmarshalJSON ¶
func (t *NormalTime) UnmarshalJSON(data []byte) error
func (*NormalTime) YearMonthDate ¶
func (t *NormalTime) YearMonthDate() string
type PaginationParams ¶
type ProportionOfSomething ¶
type UnixTime ¶
func (UnixTime) MarshalJSON ¶
func (*UnixTime) UnmarshalJSON ¶
func (*UnixTime) YearMonthDate ¶
Click to show internal directories.
Click to hide internal directories.