result

package
v0.3.43 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthHttpResult

func AuthHttpResult(r *http.Request, w http.ResponseWriter, resp interface{}, err error)

AuthHttpResult 授权的http方法

func HttpResult

func HttpResult(r *http.Request, w http.ResponseWriter, resp interface{}, err error)

HttpResult http返回

func JobResult

func JobResult(ctx context.Context, resp interface{}, err error)

JobResult job返回

func ParamErrorResult

func ParamErrorResult(r *http.Request, w http.ResponseWriter, err error)

ParamErrorResult http 参数错误返回

Types

type CodeError

type CodeError struct {
	// contains filtered or unexported fields
}

func NewErrCodeMsg

func NewErrCodeMsg(errCode uint32, errMsg string) *CodeError

func (*CodeError) Error

func (e *CodeError) Error() string

func (*CodeError) GetErrCode

func (e *CodeError) GetErrCode() uint32

GetErrCode 返回给前端的错误码

func (*CodeError) GetErrMsg

func (e *CodeError) GetErrMsg() string

GetErrMsg 返回给前端显示端错误信息

type NullJson

type NullJson struct{}

type ResponseErrorBean

type ResponseErrorBean struct {
	Code uint32 `json:"code"`
	Msg  string `json:"msg"`
}

func Error

func Error(errCode uint32, errMsg string) *ResponseErrorBean

type ResponseSuccessBean

type ResponseSuccessBean struct {
	Code uint32      `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data,omitempty"`
}

func Success

func Success(data interface{}) *ResponseSuccessBean

Jump to

Keyboard shortcuts

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