response

package
v0.0.0-...-94aa108 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fail

func Fail(r *ghttp.Request, message string, data ...interface{}) error

Fail 失败响应

func Ok

func Ok(r *ghttp.Request, message string, data ...interface{}) error

Ok 成功响应

func OkData

func OkData(r *ghttp.Request, data ...interface{}) error

OkData 成功响应

func Send

func Send(r *ghttp.Request, code int, message string, data ...interface{}) error

Send 发送请求

Types

type Response

type Response struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL