route

package
v3.5.7 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Handlers       map[string][]func(echo.RouteRegister)
	Namers         []func(string) string
	Middlewares    map[string][]interface{}
	PreMiddlewares map[string][]interface{}
}

func NewGroup

func NewGroup(groupNamers ...func(string) string) *Group

func (*Group) AddNamer

func (g *Group) AddNamer(namers ...func(string) string)

func (*Group) Apply

func (g *Group) Apply(e echo.RouteRegister, rootGroup string)

func (*Group) Register

func (g *Group) Register(groupName string, fn func(echo.RouteRegister), middlewares ...interface{})

func (*Group) SetNamer

func (g *Group) SetNamer(namers ...func(string) string)

func (*Group) Use

func (g *Group) Use(groupName string, middlewares ...interface{})

type Host

type Host struct {
	Name        string
	Middlewares []interface{}
	Group       *Group
}

func (*Host) Register

func (h *Host) Register(groupName string, fn func(echo.RouteRegister), middlewares ...interface{})

func (*Host) Use

func (h *Host) Use(middlewares ...interface{})

type Register

type Register struct {
	Echo      *echo.Echo
	RootGroup string
	Handlers  []func(echo.RouteRegister)
	Group     *Group
	Hosts     map[string]*Host
}

func NewRegister

func NewRegister(e *echo.Echo, groupNamers ...func(string) string) *Register

func (*Register) AddGroupNamer

func (r *Register) AddGroupNamer(namers ...func(string) string)

func (*Register) Apply

func (r *Register) Apply()

func (*Register) Host

func (r *Register) Host(hostName string, middlewares ...interface{}) *Host

func (*Register) Register

func (r *Register) Register(fn func(echo.RouteRegister))

func (*Register) RegisterToGroup

func (r *Register) RegisterToGroup(groupName string, fn func(echo.RouteRegister), middlewares ...interface{})

func (*Register) SetGroupNamer

func (r *Register) SetGroupNamer(namers ...func(string) string)

func (*Register) Use

func (r *Register) Use(groupName string, middlewares ...interface{})

Jump to

Keyboard shortcuts

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