blacklist

package
v0.0.0-...-b865509 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blacklist

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

Blacklist implements a blacklist wuth support for adding items and checking whether they exist.

func New

func New() *Blacklist

New returns a new Blacklist

func (*Blacklist) Add

func (b *Blacklist) Add(item []byte)

Add adds the given item to the blacklist.

func (*Blacklist) ExportState

func (b *Blacklist) ExportState(w io.Writer) error

ExportState exports the state of the list.

func (*Blacklist) Has

func (b *Blacklist) Has(item []byte) bool

Has returns true if the given item is in the list, otherwise false.

func (*Blacklist) ImportState

func (b *Blacklist) ImportState(r io.Reader) error

ImportState imports the given state.

Jump to

Keyboard shortcuts

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