ipfilter

package
v1.10.6 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultConfig is the default ipfilter middleware config.
	DefaultConfig = Config{
		Skipper: echo.DefaultSkipper,
		Options: ipfilter.Options{},
	}
)

Functions

func IPFilter

func IPFilter(config Config) echo.MiddlewareFuncd

IPFilter returns a IPFilter middleware with config.

Types

type Config

type Config struct {
	// Skipper defines a function to skip middleware.
	Skipper echo.Skipper `json:"-"`
	Options ipfilter.Options
	// contains filtered or unexported fields
}

func (*Config) Filter

func (c *Config) Filter() *ipfilter.IPFilter

func (*Config) Init

func (c *Config) Init()

Jump to

Keyboard shortcuts

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