resp

package
v0.0.0-...-742e869 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeserializationResp

func DeserializationResp(ctx context.Context, response *http.Response, entity interface{}) error

DeserializationResp DeserializationResp

Types

type R

type R struct {
	Code int64  `json:"code"`
	Msg  string `json:"msg,omitempty"`
	Data resp   `json:"data"`
	// contains filtered or unexported fields
}

R 返回值

func Format

func Format(resp resp, err error) *R

Format 统一返回值格式

func (*R) Context

func (r *R) Context(c *gin.Context, code ...int)

Context context

Jump to

Keyboard shortcuts

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