Skip to content
This repository was archived by the owner on Dec 28, 2024. It is now read-only.

Latest commit

 

History

History
47 lines (28 loc) · 987 Bytes

spring-gin.md

File metadata and controls

47 lines (28 loc) · 987 Bytes
description
spring-gin

封装 github.com/gin-gonic/gin 实现的 Web 框架。

创建 Web 容器

NewContainer

创建 gin 实现的 WebContainer。

func NewContainer(config SpringWeb.ContainerConfig) *Container {}

适配 gin 框架

Handler

适配 gin 形式的处理函数。

func Handler(fn gin.HandlerFunc) SpringWeb.Handler {}

Filter

适配 gin 形式的中间件函数。

func Filter(fn gin.HandlerFunc) SpringWeb.Filter {}

GinContext

将 SpringWeb.WebContext 转换为 *gin.Context。

func GinContext(webCtx SpringWeb.WebContext) *gin.Context {}

WebContext

将 *gin.Context 转换为 SpringWeb.WebContext。

func WebContext(ginCtx *gin.Context) SpringWeb.WebContext {}