Documentation ¶
Index ¶
- func Attachment(ctx echo.Context, file string, name string) error
- func File(ctx echo.Context, file string) error
- func HTML(ctx echo.Context, html string) error
- func IsAjax(ctx echo.Context) bool
- func JSON(ctx echo.Context, i any) error
- func JSONP(ctx echo.Context, callback string, i any) error
- func JSONString(ctx echo.Context, i any) error
- func Redirect(ctx echo.Context, url string) error
- func Render(ctx echo.Context, name string, data any) error
- func ReturnErrorJson(ctx echo.Context, msg string) error
- func ReturnJson(ctx echo.Context, code int, msg string, data any) error
- func ReturnSuccessJson(ctx echo.Context, msg string, data any) error
- func Stream(ctx echo.Context, contentType string, r io.Reader) error
- func String(ctx echo.Context, str string) error
- func XML(ctx echo.Context, i any) error
- type JSONResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReturnJson ¶
返回 json
func ReturnSuccessJson ¶
返回成功 json
Types ¶
type JSONResult ¶
type JSONResult struct { Code int `json:"code"` Message string `json:"message"` Data any `json:"data"` }
*
- json 返回数据 *
- @create 2022-12-30
- @author deatil
Click to show internal directories.
Click to hide internal directories.