routes

package
v1.14.7 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: MIT Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GzipMinSize represents min size to compress for the body size of response
	GzipMinSize = 1400
)

Variables

This section is empty.

Functions

func InstallRoutes added in v1.14.0

func InstallRoutes() *web.Route

InstallRoutes registers the install routes

func LoggerHandler added in v1.14.0

func LoggerHandler(level log.Level) func(next http.Handler) http.Handler

LoggerHandler is a handler that will log the routing to the default gitea log

func NormalRoutes added in v1.14.0

func NormalRoutes() *web.Route

NormalRoutes represents non install routes

func Recovery added in v1.14.0

func Recovery() func(next http.Handler) http.Handler

Recovery returns a middleware that recovers from any panics and writes a 500 and a log if so. This error will be created with the gitea 500 page.

func RegisterRoutes

func RegisterRoutes(m *web.Route)

RegisterRoutes register routes

func WebRoutes added in v1.14.0

func WebRoutes() *web.Route

WebRoutes returns all web routes

Types

This section is empty.

Jump to

Keyboard shortcuts

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