package
Version:
v1.1.1-alpha17
Opens a new window with list of versions in this module.
Published: Dec 27, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 14
Opens a new window with list of known importers.
Documentation
¶
- Constants
-
func Fail(ctx *gin.Context)
-
func FailWithDetailed(data interface{}, message string, ctx *gin.Context)
-
func FailWithMessage(message string, ctx *gin.Context)
-
func ForbiddenFailWithMessage(message string, ctx *gin.Context)
-
func Ok(ctx *gin.Context)
-
func OkWithData(data interface{}, ctx *gin.Context)
-
func OkWithDetailed(data interface{}, message string, ctx *gin.Context)
-
func OkWithMessage(message string, ctx *gin.Context)
-
func Result(code int, data interface{}, msg string, ctx *gin.Context)
-
func UnauthorizedFailWithDetailed(data interface{}, message string, ctx *gin.Context)
-
func UnauthorizedFailWithMessage(message string, ctx *gin.Context)
-
type BaseResponse
-
type PageResult
-
type Response
-
type SelectOption
View Source
const (
ResponseOkMessage = "操作成功"
ResponseErrorMessage = "操作失败"
)
func OkWithData(data interface{}, ctx *gin.Context)
func UnauthorizedFailWithDetailed(data interface{}, message string, ctx *gin.Context)
type BaseResponse struct {
Id uint `json:"id"`
CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"`
}
type PageResult struct {
}
type Response struct {
Code int `json:"status"`
Data interface{} `json:"data"`
Msg string `json:"message"`
}
type SelectOption struct {
Id uint `json:"id"`
Name string `json:"name"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.