hostlist

package
v0.0.0-...-c08393c Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2017 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DownloadLocation = "/tmp/myipms_full.zip"

Location to download list

View Source
const MyIpMsUrl = "https://myip.ms/files/blacklist/general/full_blacklist_database.zip"

URL to retrieve this list

Variables

This section is empty.

Functions

func AddHostList

func AddHostList(newHostList HostList)

Add source to list of blacklist sources

Types

type HostList

type HostList interface {
	UpdateList(c chan datatypes.BlacklistHost) error
	ValidList(MetaData) bool
	Name() string
	MetaData() MetaData
}

Interface for processing blacklist sources

func GetAvailableHostLists

func GetAvailableHostLists() []HostList

Return a list of available blacklist sources

func NewMyIpMs

func NewMyIpMs() HostList

Return a new instance of this source

type MetaData

type MetaData struct {
	Name       string
	Url        string
	LastUpdate int64
	FileHash   string
}

Information about a blacklist source

type MyIpMs

type MyIpMs struct {
}

func (*MyIpMs) MetaData

func (m *MyIpMs) MetaData() MetaData

Return meta data about this source (to be stored in database)

func (*MyIpMs) Name

func (m *MyIpMs) Name() string

Return the name of this source.

func (*MyIpMs) UpdateList

func (m *MyIpMs) UpdateList(c chan datatypes.BlacklistHost) error

Update the list of blacklisted sources.

func (*MyIpMs) ValidList

func (m *MyIpMs) ValidList(mdata MetaData) bool

Check if the metadata passed in is still considered valid.

Jump to

Keyboard shortcuts

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