Documentation ¶
Index ¶
- Constants
- type CommonList
- type CommonResp
- type PaginationParams
- 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 = http.StatusOK ErrorCode = http.StatusBadRequest InternalErrorCode = http.StatusInternalServerError ForbiddenCode = http.StatusForbidden ExpireCode = http.StatusUnauthorized NotFoundCode = http.StatusNotFound )
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,omitempty"` }
CommonResp - api common response type success - {"code": 200, "msg": "", "data": {}} error - {"code": 400, "msg": "", "data": {}} forbidden - {"code": 403, "msg": "", "data": {}} expire - {"code": 401, "msg": "", "data": {}}
type PaginationParams ¶
type UnixTime ¶
func NewUnixTime ¶
func NewUnixTimeFromUnix ¶
func (UnixTime) MarshalJSON ¶
func (*UnixTime) UnmarshalJSON ¶
func (*UnixTime) YearMonthDate ¶
Click to show internal directories.
Click to hide internal directories.