middleware

package
v0.0.0-...-91c01a0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Head(next http.Handler) http.Handler

Head will return a 200 for the uptimerobot.

Types

type Handler

type Handler struct {
	Router     *router.Mux
	Render     *htmltemplate.Engine
	Sess       *websession.Session
	SiteURL    string
	SiteScheme string
}

Handler -

func NewHandler

func NewHandler(te *htmltemplate.Engine, sess *websession.Session, mux *router.Mux, siteURL string, siteScheme string) *Handler

NewHandler -

func (*Handler) DisallowAnon

func (c *Handler) DisallowAnon(h http.Handler) http.Handler

DisallowAnon does not allow anonymous users to access the page.

func (*Handler) DisallowAuth

func (c *Handler) DisallowAuth(h http.Handler) http.Handler

DisallowAuth does not allow authenticated users to access the page.

func (*Handler) LogRequest

func (c *Handler) LogRequest(next http.Handler) http.Handler

LogRequest will log the HTTP requests.

func (*Handler) Redirect

func (c *Handler) Redirect(next http.Handler) http.Handler

Redirect will handle all redirects required.

Jump to

Keyboard shortcuts

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