response

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EchoResponse

func EchoResponse(ctx *gin.Context, resp *Response)

Types

type Response

type Response struct {
	Errno  int         `json:"code"`
	Msg    string      `json:"message"`
	Data   interface{} `json:"data"`
	IsSucc bool        `json:"is_succ"`
}

func NewResponse

func NewResponse() *Response

func (*Response) WithData

func (r *Response) WithData(data interface{}) *Response

func (*Response) WithDefaultMsg

func (r *Response) WithDefaultMsg(errno int) *Response

func (*Response) WithMsg

func (r *Response) WithMsg(errno int, msg string) *Response

Jump to

Keyboard shortcuts

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