Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MatchedRoute ¶
MatchedRoute is provided in the context to Gemini handlers that use the router.
func GetMatchedRoute ¶
func GetMatchedRoute(ctx context.Context) (mr MatchedRoute, ok bool)
GetMatchedRoute returns the route that was matched by the router, along with any path variables extracted from the URL.
type Mux ¶
type Mux struct { RouteHandlers []*RouteHandler NotFoundHandler gemini.Handler }
Mux routes Gemini requests to the appropriate handler.
func (*Mux) ServeGemini ¶
func (m *Mux) ServeGemini(w gemini.ResponseWriter, r *gemini.Request)
type Route ¶
Route is an array of segments.
type RouteHandler ¶
RouteHandler is the Handler to use for a given Route.
Click to show internal directories.
Click to hide internal directories.