host

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2019 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CIDR

type CIDR struct {
	Patterns []string
	// contains filtered or unexported fields
}

CIDR matches http host with CIDR

func NewCIDR

func NewCIDR(pattern ...string) CIDR

NewCIDR creates new CIDR host matcher

func (CIDR) ServeHandler

func (host CIDR) ServeHandler(h http.Handler) http.Handler

ServeHandler implements middleware interface

func (*CIDR) Use

func (host *CIDR) Use(m parapet.Middleware)

Use uses middleware

type Host

type Host struct {
	Hosts []string
	// contains filtered or unexported fields
}

Host middleware

func New

func New(host ...string) Host

New creates new host middleware

func (Host) ServeHandler

func (host Host) ServeHandler(h http.Handler) http.Handler

ServeHandler implements middleware interface

func (*Host) Use

func (host *Host) Use(m parapet.Middleware)

Use uses middleware

Jump to

Keyboard shortcuts

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