reply

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(ctx *gin.Context, opts ...Option)

ReplyData 定义数据返回格式

Types

type JsonMsg

type JsonMsg struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Err  string `json:"err"`
	// contains filtered or unexported fields
}

JsonMsg 通用返回格式

type Option

type Option func(JsonMsg)

Option 函数选项式

func WithCode

func WithCode(code int) Option

WithCode 返回状态码

func WithErr

func WithErr(err string) Option

WithErr 返回错误

func WithMsg

func WithMsg(msg string) Option

WithMsg 返回数据

Jump to

Keyboard shortcuts

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