router

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router interface {
	Redirect(*http.Request, http.ResponseWriter, string)
	Route(string, func(r Router) http.HandlerFunc)
	AuthorizedRoute(string, func(r Router) http.HandlerFunc)
	Handle(pattern string, handler http.Handler)
	HandleWithCacheControl(pattern string, handler http.Handler)
	APIRoute(string, func(r Router) http.HandlerFunc)
	APIAuthorizedRoute(pattern string, handler func(r Router) http.HandlerFunc)

	Context() context.Context
	Renderer() renderer.Renderer
}

func New

func New(
	mux *http.ServeMux,
	paths conf.Paths,
	svcs services.Services,
	types content.Types) (Router, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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