httphelper

package
v0.0.0-...-8a48855 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const SUCCESS = 0

Variables

This section is empty.

Functions

func ReadRequestBody

func ReadRequestBody(c *gin.Context, v interface{}) error

ReadRequestBody 读取请求数据

func RestfullResponse

func RestfullResponse(c *gin.Context, code int, v interface{})

RestfullResponse 返回restful风格

Types

type ResponseMessage

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

ResponseMessage 返回信息

Jump to

Keyboard shortcuts

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