middleware

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	// contains filtered or unexported fields
}

Middleware represents middleware handlers.

func New

func New(l log.Logger) *Middleware

New returns a new Middleware.

func (*Middleware) Authenticate

func (m *Middleware) Authenticate(next http.Handler) http.Handler

Authenticate verifies authentication provided in the request's Authorization header if the request uses HTTP Basic Authentication.

func (*Middleware) Logging

func (m *Middleware) Logging(next http.Handler) http.Handler

Logging logs all requests with its information and the time it took to process

func (*Middleware) RestrictDomain

func (m *Middleware) RestrictDomain(next http.Handler) http.Handler

RestrictDomain checks whehter request's remote address was matched a defined host pattern or not.

Jump to

Keyboard shortcuts

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