response

package
v0.0.0-...-18988c4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Overview

Package response ...

Description : response ...

Author : go_developer@163.com<白茶清欢>

Date : 2022-06-25 20:52

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(ctx *gin.Context, httpCode int, data any)

JSON ctx.JSON 的平替, 增加了数据是否已相应的标识

Author : go_developer@163.com<白茶清欢>

Date : 14:51 2023/2/15

func Send

func Send(ctx *gin.Context, code any, httpCode int, data any, extension map[string]any)

Send 基础的发送数据

Author : go_developer@163.com<白茶清欢>

Date : 22:40 2022/6/25

func SendWithException

func SendWithException(ctx *gin.Context, e exception.IException, data map[string]any)

SendWithException 使用exception发送数据

Author : go_developer@163.com<白茶清欢>

Date : 13:08 2022/6/26

func SendWithStatusOK

func SendWithStatusOK(ctx *gin.Context, code any, data any)

SendWithStatusOK ...

Author : go_developer@163.com<白茶清欢>

Date : 22:41 2022/6/25

func SetBusinessSuccessCode

func SetBusinessSuccessCode(code any)

SetBusinessSuccessCode 设置成状态码

Author : go_developer@163.com<白茶清欢>

Date : 17:01 2024/8/17

func Success

func Success(ctx *gin.Context, data any)

Success 成功的响应

Author : go_developer@163.com<白茶清欢>

Date : 22:37 2022/6/25

func SuccessWithExtension

func SuccessWithExtension(ctx *gin.Context, data any, extension map[string]any)

SuccessWithExtension 返回扩展数据

Author : go_developer@163.com<白茶清欢>

Date : 14:52 2024/9/24

Types

This section is empty.

Jump to

Keyboard shortcuts

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