Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WhiteBlackList ¶
type WhiteBlackList struct {
// contains filtered or unexported fields
}
WhiteBlackList encapsulates the logic needed to filter based on a string.
func New ¶
func New(w, b map[string]struct{}) (*WhiteBlackList, error)
New constructs a new WhtieBlackList based on a white- and a blacklist. Only one of them can be not empty.
func (*WhiteBlackList) Exclude ¶
func (l *WhiteBlackList) Exclude(items []string)
Exclude excludes the given items from the list.
func (*WhiteBlackList) Include ¶
func (l *WhiteBlackList) Include(items []string)
Include includes the given items in the list.
func (*WhiteBlackList) IsExcluded ¶
func (l *WhiteBlackList) IsExcluded(item string) bool
IsExcluded returns if the given item is excluded.
func (*WhiteBlackList) IsIncluded ¶
func (l *WhiteBlackList) IsIncluded(item string) bool
IsIncluded returns if the given item is included.
func (*WhiteBlackList) Status ¶
func (l *WhiteBlackList) Status() string
Status returns the status of the WhtieBlackList that can e.g. be passed into a logger.
Click to show internal directories.
Click to hide internal directories.