ip

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBlockList

func AddBlockList(ip string, path string, duration time.Duration, ever bool)

AddBlockList to add some ip for blocking with expire time

func Middleware

func Middleware(config map[string]interface{}) func(next http.Handler) http.Handler

Middleware this must not use like this must implement

func RegisterNewPlugin

func RegisterNewPlugin() (string, bool, map[string]interface{}, func(config map[string]interface{}) func(handler http.Handler) http.Handler)

RegisterNewPlugin for add this plugin to plugin center

func UpdateBlockList

func UpdateBlockList()

UpdateBlockList for update all block list for delete expired

Types

type APIIP

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

APIIP this struct fill with all values receive from ip-api and the method are for

type BlockIPList

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

BlockIPList struct for all ips that banned from service

Jump to

Keyboard shortcuts

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