router

package
v0.0.0-...-4a12623 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Param

func Param(ctx context.Context, key string) string

Param returns the beego router param by a given key from the context

Types

type ContextKeyInput

type ContextKeyInput struct{}

ContextKeyInput ...

type Route

type Route struct {
	// contains filtered or unexported fields
}

Route stores the information that matches a request

func NewRoute

func NewRoute() *Route

NewRoute creates a new route

func (*Route) Handler

func (r *Route) Handler(handler http.Handler)

Handler sets the handler that handles the request

func (*Route) HandlerFunc

func (r *Route) HandlerFunc(f http.HandlerFunc)

HandlerFunc sets the handler function that handles the request

func (*Route) Method

func (r *Route) Method(method string) *Route

Method sets the method that the route matches

func (*Route) Middleware

func (r *Route) Middleware(middleware middleware.Middleware) *Route

Middleware sets the middleware that executed when handling the request

func (*Route) NewRoute

func (r *Route) NewRoute() *Route

NewRoute returns a sub route based on the current one

func (*Route) Path

func (r *Route) Path(path string) *Route

Path sets the path that the route matches. Path uses the beego router path pattern

Jump to

Keyboard shortcuts

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