ihttp

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MulanPSL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIException

type APIException struct {
	Code      int         `json:"code"`
	Success   bool        `json:"success"`
	Msg       string      `json:"msg"`
	Timestamp int64       `json:"timestamp"`
	Result    interface{} `json:"result"`
}

APIException 结构体

func AuthError

func AuthError(message string) *APIException

AuthError 授权错误

func NotFound

func NotFound() *APIException

NotFound 404 错误

func ParameterError

func ParameterError(message string) *APIException

ParameterError 参数错误

func ResponseJson

func ResponseJson(message string, data interface{}, success bool) *APIException

ResponseJson 200 返回

func ServerError

func ServerError() *APIException

ServerError 500 错误处理

func UnknownError

func UnknownError(message string) *APIException

UnknownError 未知错误

func (*APIException) Error

func (e *APIException) Error() string

Error 实现接口

Jump to

Keyboard shortcuts

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