block

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Match func(r *http.Request) bool
	// contains filtered or unexported fields
}

Block is middleware block

func New

func New(match func(r *http.Request) bool) *Block

New creates news block

func (*Block) ServeHandler

func (b *Block) ServeHandler(h http.Handler) http.Handler

ServeHandler implements middleware interface

func (*Block) Use

func (b *Block) Use(m parapet.Middleware)

Use uses middleware

func (*Block) UseFunc added in v0.13.2

func (b *Block) UseFunc(m parapet.MiddlewareFunc)

Jump to

Keyboard shortcuts

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