restful

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(code int, err error, log ...bool) mvc.Result

func ErrorFormat added in v1.0.5

func ErrorFormat(err error) (code int, msg string)

func GetErrorMsg added in v1.1.0

func GetErrorMsg(err error) (code int, msg string)

func MethodError

func MethodError(log ...bool) mvc.Result

func OK

func OK(data interface{}, log ...bool) mvc.Result

func ParamsError

func ParamsError(err error, log ...bool) mvc.Result

func Result

func Result(httpCode int, restData RestData, err error, log ...bool) mvc.Result

func UnAuth

func UnAuth(code int, err error, log ...bool) mvc.Result

Types

type RestData

type RestData struct {
	Msg  string
	Code int
	Data interface{}
}

Jump to

Keyboard shortcuts

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