Documentation ¶
Index ¶
- func CubeResponse(c *gin.Context, code int, message string, data any)
- func CubeResponseError(c *gin.Context, code int, message string)
- func CubeResponseErrorForServerErr(c *gin.Context, message string)
- func CubeResponseSuccess(c *gin.Context, obj any)
- type CubeContext
- type CubeError
- type PageForm
- type PageVO
- type Response
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CubeResponse ¶
CubeResponse 统一返回结构
func CubeResponseSuccess ¶
Types ¶
type CubeContext ¶ added in v1.0.3
type PageForm ¶ added in v1.0.4
type PageForm struct { PageIndex int64 `json:"pageIndex" binding:"required" label:"分页页码"` PageSize int64 `json:"pageSize" binding:"required" label:"每页大小"` Draw interface{} `json:"draw"` }
func (*PageForm) GetPageIndex ¶ added in v1.0.4
func (*PageForm) GetPageSize ¶ added in v1.0.4
func (*PageForm) GetStartRow ¶ added in v1.0.4
type PageVO ¶ added in v1.0.6
type PageVO struct { Rows []interface{} `json:"rows"` Draw interface{} `json:"draw"` Total int64 `json:"total"` }
type Response ¶
type Response struct { Code int `json:"code"` Message string `json:"message"` Data any `json:"data"` }
Response 统一返回结构
type UserInfo ¶ added in v1.0.3
type UserInfo struct { ID int64 `json:"id"` AccountName string `json:"account_name"` AccountNickname *string `json:"account_nickname"` EmployeeName string `json:"employee_name"` EmployeeCode string `json:"employee_code"` RoleIds pg.Int64Array `json:"role_ids"` Remark sql.NullString `json:"remark"` IsDelete sql.NullBool `json:"is_delete"` IsCreate sql.NullBool `json:"is_create"` }
Click to show internal directories.
Click to hide internal directories.