result

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Http

func Http(w http.ResponseWriter, r *http.Request, resp any, err error)

Http http返回

func HttpWithoutWrap added in v0.3.1

func HttpWithoutWrap(w http.ResponseWriter, r *http.Request, resp any, err error)

HttpWithoutWrap http返回,无包装

Types

type NullJson

type NullJson struct{}

type ResponseErrorBean

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

func Error

func Error(errCode int64, errMsg string) *ResponseErrorBean

type ResponseSuccessBean

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

func Success

func Success(data any) *ResponseSuccessBean

Jump to

Keyboard shortcuts

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