1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-24 08:22:21 +02:00
echo/group.go

58 lines
1.0 KiB
Go
Raw Normal View History

package echo
type (
Group struct {
echo Echo
}
)
func (g *Group) Use(m ...Middleware) {
for _, h := range m {
g.echo.middleware = append(g.echo.middleware, wrapMiddleware(h))
}
}
func (g *Group) Connect(path string, h Handler) {
g.echo.Connect(path, h)
}
func (g *Group) Delete(path string, h Handler) {
g.echo.Delete(path, h)
}
func (g *Group) Get(path string, h Handler) {
g.echo.Get(path, h)
}
func (g *Group) Head(path string, h Handler) {
g.echo.Head(path, h)
}
func (g *Group) Options(path string, h Handler) {
g.echo.Options(path, h)
}
func (g *Group) Patch(path string, h Handler) {
g.echo.Patch(path, h)
}
func (g *Group) Post(path string, h Handler) {
g.echo.Post(path, h)
}
func (g *Group) Put(path string, h Handler) {
g.echo.Put(path, h)
}
func (g *Group) Trace(path string, h Handler) {
g.echo.Trace(path, h)
}
func (g *Group) WebSocket(path string, h HandlerFunc) {
g.echo.WebSocket(path, h)
}
func (g *Group) Group(prefix string, m ...Middleware) *Group {
return g.echo.Group(prefix, m...)
}