Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

agent source pure

Types 1

type Whitelist

struct
1type Whitelist struct {
2	store *avl.Tree
3}
source

Whitelist manages whitelisted agent addresses.

Methods on Whitelist

func AddAddresses

method on Whitelist
1func (m *Whitelist) AddAddresses(addresses []string)
source

AddAddresses adds the given addresses to the whitelist.

func ClearAddresses

method on Whitelist
1func (m *Whitelist) ClearAddresses()
source

ClearAddresses removes all addresses from the whitelist and puts into a state that indicates it is moot and has no whitelist defined.

func HasAddress

method on Whitelist
1func (m Whitelist) HasAddress(address_XXX string) bool
source

HasAddress returns true if the given address is in the whitelist.

func HasDefinition

method on Whitelist
1func (m Whitelist) HasDefinition() bool
source

HasDefinition returns true if the whitelist has a definition. It retuns false if `ClearAddresses` has been called without any subsequent `AddAddresses` calls, or if `AddAddresses` has never been called.

func RemoveAddress

method on Whitelist
1func (m *Whitelist) RemoveAddress(address_XXX string)
source

RemoveAddress removes the given address from the whitelist if it exists.

Imports 1

Source Files 2