httpc

package
v0.0.0-...-79403da Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JwtUnauthorizedResult

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

func RespError

func RespError(ctx context.Context, w http.ResponseWriter, r *http.Request, err error)

RespError 错误响应

func RespSuccess

func RespSuccess(ctx context.Context, w http.ResponseWriter, resp interface{})

RespSuccess 正常响应的返回

Types

type Response

type Response struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data any    `json:"data"`
}

Response 基本响应结构

Jump to

Keyboard shortcuts

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