location

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: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExactMatcher

type ExactMatcher struct {
	Pattern string
	// contains filtered or unexported fields
}

ExactMatcher matches exact location

func Exact

func Exact(pattern string) ExactMatcher

Exact creates new exact matcher

func (ExactMatcher) ServeHandler

func (l ExactMatcher) ServeHandler(h http.Handler) http.Handler

ServeHandler implements middleware interface

func (*ExactMatcher) Use

func (l *ExactMatcher) Use(m parapet.Middleware)

Use uses middleware

type PrefixMatcher

type PrefixMatcher struct {
	Pattern string
	// contains filtered or unexported fields
}

PrefixMatcher matches location using prefix string

func Prefix

func Prefix(pattern string) PrefixMatcher

Prefix creates new prefix matcher

func (PrefixMatcher) ServeHandler

func (l PrefixMatcher) ServeHandler(h http.Handler) http.Handler

ServeHandler implements middleware interface

func (*PrefixMatcher) Use

func (l *PrefixMatcher) Use(m parapet.Middleware)

Use uses middleware

type RegExpMatcher

type RegExpMatcher struct {
	Pattern string
	// contains filtered or unexported fields
}

RegExpMatcher matches location using regexp

func RegExp

func RegExp(pattern string) RegExpMatcher

RegExp creates new RegExp matcher

func (RegExpMatcher) ServeHandler

func (l RegExpMatcher) ServeHandler(h http.Handler) http.Handler

ServeHandler implements middleware interface

func (*RegExpMatcher) Use

func (l *RegExpMatcher) 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