Documentation ¶
Index ¶
- type Banning
- type Config
- type Limits
- type PolicyServer
- func (s *PolicyServer) ApplyLimitPolicy(ip string) bool
- func (s *PolicyServer) ApplyLoginPolicy(addy, ip string) bool
- func (s *PolicyServer) ApplyLoginWalletPolicy(login string) bool
- func (s *PolicyServer) ApplyMalformedPolicy(ip string) bool
- func (s *PolicyServer) ApplySharePolicy(ip string, validShare bool) bool
- func (s *PolicyServer) BanClient(ip string)
- func (s *PolicyServer) Get(ip string) *Stats
- func (s *PolicyServer) GetWalletBlacklist() ([]string, error)
- func (s *PolicyServer) GetWalletWhitelist() ([]string, error)
- func (s *PolicyServer) InBlackList(addy string) bool
- func (s *PolicyServer) InWalletBlackList(addy string) bool
- func (s *PolicyServer) InWalletWhiteList(addy string) bool
- func (s *PolicyServer) InWhiteList(ip string) bool
- func (s *PolicyServer) IsBanned(ip string) bool
- func (s *PolicyServer) NewStats() *Stats
- type Stats
- type Whitemode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Workers int `json:"workers"` Banning Banning `json:"banning"` Limits Limits `json:"limits"` Whitemode Whitemode `json:"whitemode"` ResetInterval string `json:"resetInterval"` RefreshInterval string `json:"refreshInterval"` Walletblacklist string `json:"blacklist_file"` Walletwhitelist string `json:"whitelist_file"` }
type PolicyServer ¶
func Start ¶
func Start(cfg *Config, storage *storage.RedisClient) *PolicyServer
func (*PolicyServer) ApplyLimitPolicy ¶
func (s *PolicyServer) ApplyLimitPolicy(ip string) bool
func (*PolicyServer) ApplyLoginPolicy ¶
func (s *PolicyServer) ApplyLoginPolicy(addy, ip string) bool
func (*PolicyServer) ApplyLoginWalletPolicy ¶
func (s *PolicyServer) ApplyLoginWalletPolicy(login string) bool
func (*PolicyServer) ApplyMalformedPolicy ¶
func (s *PolicyServer) ApplyMalformedPolicy(ip string) bool
func (*PolicyServer) ApplySharePolicy ¶
func (s *PolicyServer) ApplySharePolicy(ip string, validShare bool) bool
func (*PolicyServer) BanClient ¶
func (s *PolicyServer) BanClient(ip string)
func (*PolicyServer) Get ¶
func (s *PolicyServer) Get(ip string) *Stats
func (*PolicyServer) GetWalletBlacklist ¶
func (s *PolicyServer) GetWalletBlacklist() ([]string, error)
loads up blacklist of wallets if file is present
func (*PolicyServer) GetWalletWhitelist ¶
func (s *PolicyServer) GetWalletWhitelist() ([]string, error)
loads up whitelist of wallets if file is present
func (*PolicyServer) InBlackList ¶
func (s *PolicyServer) InBlackList(addy string) bool
func (*PolicyServer) InWalletBlackList ¶
func (s *PolicyServer) InWalletBlackList(addy string) bool
func (*PolicyServer) InWalletWhiteList ¶
func (s *PolicyServer) InWalletWhiteList(addy string) bool
func (*PolicyServer) InWhiteList ¶
func (s *PolicyServer) InWhiteList(ip string) bool
func (*PolicyServer) IsBanned ¶
func (s *PolicyServer) IsBanned(ip string) bool
func (*PolicyServer) NewStats ¶
func (s *PolicyServer) NewStats() *Stats
Click to show internal directories.
Click to hide internal directories.