bmiddle

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BambooHandlerResponse

func BambooHandlerResponse(r *ghttp.Request)

BambooHandlerResponse 处理 HTTP 请求的统一响应逻辑。

根据请求的中间件处理结果返回统一的 JSON 格式响应。当存在错误或未定义状态时,会构造适配的错误码和消息返回。

参数:

  • r: 当前 HTTP 请求对象。

功能描述:

  • 检查缓存区内容,若存在则直接返回内容为 JSON 格式。
  • 处理自定义或未定义的错误并返回错误状态码和信息。
  • 在无错误且正常状态下返回标准成功响应。

Types

This section is empty.

Jump to

Keyboard shortcuts

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