MCPcopy Create free account
hub / github.com/devfeel/dotweb / Router

Interface Router

router.go:58–78  ·  view source on GitHub ↗

Router is the interface that wraps the router method.

Source from the content-addressed store, hash-verified

56type (
57 // Router is the interface that wraps the router method.
58 Router interface {
59 ServeHTTP(ctx Context)
60 ServerFile(path string, fileRoot string) RouterNode
61 RegisterServerFile(routeMethod string, path string, fileRoot string, excludeExtension []string) RouterNode
62 GET(path string, handle HttpHandle) RouterNode
63 HEAD(path string, handle HttpHandle) RouterNode
64 OPTIONS(path string, handle HttpHandle) RouterNode
65 POST(path string, handle HttpHandle) RouterNode
66 PUT(path string, handle HttpHandle) RouterNode
67 PATCH(path string, handle HttpHandle) RouterNode
68 DELETE(path string, handle HttpHandle) RouterNode
69 HiJack(path string, handle HttpHandle)
70 WebSocket(path string, handle HttpHandle)
71 Any(path string, handle HttpHandle)
72 RegisterHandlerFunc(routeMethod string, path string, handler http.HandlerFunc) RouterNode
73 RegisterRoute(routeMethod string, path string, handle HttpHandle) RouterNode
74 RegisterHandler(name string, handler HttpHandle)
75 GetHandler(name string) (HttpHandle, bool)
76 MatchPath(ctx Context, routePath string) bool
77 GetAllRouterExpress() map[string]struct{}
78 }
79
80 RouterNode interface {
81 Use(m ...Middleware) *Node

Callers 17

ServeHTTPMethod · 0.65
RegisterServerFileMethod · 0.65
HiJackMethod · 0.65
WebSocketMethod · 0.65
mainFunction · 0.65
AnyMethod · 0.65
InitRouteFunction · 0.65
mainFunction · 0.65
RegisterHandlerFuncMethod · 0.65
InitRouteFunction · 0.65

Implementers 1

routerrouter.go

Calls

no outgoing calls

Tested by

no test coverage detected