gitea: Index | Files

package routes

import ""


Package Files

chi.go macaron.go recovery.go

func DelegateToMacaron Uses

func DelegateToMacaron(r chi.Router)

DelegateToMacaron delegates other routes to macaron

func LoggerHandler Uses

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 NewChi Uses

func NewChi() chi.Router

NewChi creates a chi Router

func NewMacaron Uses

func NewMacaron() *macaron.Macaron

NewMacaron initializes Macaron instance.

func NormalRoutes Uses

func NormalRoutes() http.Handler

NormalRoutes represents non install routes

func Recovery Uses

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. Although similar to macaron.Recovery() the main difference is that this error will be created with the gitea 500 page.

func RegisterInstallRoute Uses

func RegisterInstallRoute(c chi.Router)

RegisterInstallRoute registers the install routes

func RegisterMacaronInstallRoute Uses

func RegisterMacaronInstallRoute(m *macaron.Macaron)

RegisterMacaronInstallRoute registers the install routes

func RegisterMacaronRoutes Uses

func RegisterMacaronRoutes(m *macaron.Macaron)

RegisterMacaronRoutes routes routes to Macaron

func SignedUserName Uses

func SignedUserName(req *http.Request) string

SignedUserName returns signed user's name via context FIXME currently no any data stored on chi.Context but macaron.Context, so this will return "" before we remove macaron totally

Package routes imports 54 packages (graph) and is imported by 3 packages. Updated 2021-01-22. Refresh now. Tools for package owners.