middleware

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2019 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostsForIP

func GetHostsForIP(ip string) ([]string, bool)

GetHostsForIP returns all host names for the given IP (if cached).

func HTTPSRedirect added in v1.2.1

func HTTPSRedirect(next aero.Handler) aero.Handler

HTTPSRedirect middleware redirects to HTTPS if needed.

func Layout added in v1.2.0

func Layout(next aero.Handler) aero.Handler

Layout middleware modifies the response body to be wrapped around the general layout.

func Log

func Log(next aero.Handler) aero.Handler

Log middleware logs every request into logs/request.log and errors into logs/error.log.

func OpenGraph added in v1.2.0

func OpenGraph(next aero.Handler) aero.Handler

OpenGraph middleware modifies the context to be an OpenGraphContext.

func Recover added in v1.2.0

func Recover(next aero.Handler) aero.Handler

Recover recovers from panics and shows them as the response body.

func Session

func Session(next aero.Handler) aero.Handler

Session middleware saves an existing session if it has been modified.

func UserInfo

func UserInfo(next aero.Handler) aero.Handler

UserInfo updates user related information after each request.

Types

type OpenGraphContext added in v1.2.0

type OpenGraphContext struct {
	aero.Context
	*arn.OpenGraph
}

OpenGraphContext is a context with open graph data.

Jump to

Keyboard shortcuts

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