blacklist

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlackListedItem

type BlackListedItem struct {
	ID     string
	Reason string
}

func (BlackListedItem) TableName

func (BlackListedItem) TableName() string

type List

type List interface {
	InList(ID string) (reason string, ok bool)
}

func NewListRefresher

func NewListRefresher(config RefresherConfig, updater Updater, stop chan struct{}) List

type RefresherConfig

type RefresherConfig struct {
	UpdateInterval time.Duration
	Logger         log.Logger
}

type SyncList

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

func NewEmptySyncList

func NewEmptySyncList() SyncList

func (*SyncList) InList

func (m *SyncList) InList(ID string) (string, bool)

func (*SyncList) UpdateList

func (m *SyncList) UpdateList(data []BlackListedItem)

type Updater

type Updater interface {
	GetBlacklist() ([]BlackListedItem, error)
}

Jump to

Keyboard shortcuts

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