SpringEcho

package module
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: Apache-2.0 Imports: 7 Imported by: 4

README

spring-echo

[仅发布] 该项目仅为最终发布,开发请关注 go-spring 项目。

封装 github.com/labstack/echo/v4 实现的 Web 框架。

创建 Web 容器
NewContainer

创建 echo 实现的 Web 容器。

func NewContainer(config SpringWeb.ContainerConfig) *Container {}
适配 echo 框架
Handler

适配 echo 形式的处理函数。

func Handler(fn echo.HandlerFunc) SpringWeb.Handler {}
Filter

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

func Filter(fn echo.MiddlewareFunc) SpringWeb.Filter {}
EchoContext

将 SpringWeb.Context 转换为 echo.Context。

func EchoContext(ctx SpringWeb.Context) echo.Context {}
WebContext

将 echo.Context 转换为 SpringWeb.Context。

func WebContext(echoCtx echo.Context) SpringWeb.Context {}

Documentation

Overview

Package SpringEcho 封装 github.com/labstack/echo/v4 实现的 Web 框架

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EchoContext

func EchoContext(c web.Context) echo.Context

EchoContext 将 web.Context 转换为 echo.Context

func Filter

func Filter(fn echo.MiddlewareFunc) web.Filter

Filter 适配 echo 形式的中间件函数

func Handler added in v1.1.0

func Handler(fn echo.HandlerFunc) web.Handler

Handler 适配 echo 形式的处理函数

func New added in v1.1.0

func New(config web.ServerConfig) web.Server

New 创建 echo 实现的 web 服务器

func WebContext

func WebContext(c echo.Context) web.Context

WebContext 将 echo.Context 转换为 web.Context

Types

type Response added in v1.1.1

type Response struct {
	*echo.Response
}

func (*Response) Get added in v1.1.1

func (resp *Response) Get() http.ResponseWriter

func (*Response) Set added in v1.1.1

func (resp *Response) Set(w http.ResponseWriter)

Jump to

Keyboard shortcuts

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