Versions in this module Expand all Collapse all v0 v0.12.3 Dec 1, 2021 Changes in this version + const TypeEmail + const TypeIP + func CreateServerRuntime(confpath string) + func StartDaemon(confpath string) + type Client struct + func NewClient(url, token string, httpClient *http.Client) (*Client, error) + func (c *Client) ApplyViolation(vr *ViolationRequest) error + func (c *Client) BatchApplyViolation(typ string, vrs []ViolationRequest) error + func (c *Client) DeleteReputation(objectType, object string) error + func (c *Client) Dump() ([]Reputation, error) + func (c *Client) GetReputation(objectType, object string) (*Reputation, error) + func (c *Client) GetViolations() ([]Violation, error) + func (c *Client) Heartbeat() (bool, error) + func (c *Client) LBHeartbeat() (bool, error) + func (c *Client) SetReputation(r *Reputation) error + func (c *Client) Version() (*VersionResponse, error) + type Reputation struct + DecayAfter time.Time + LastUpdated time.Time + Object string + Reputation int + Reviewed bool + Type string + func RepDump() (ret []Reputation, err error) + func (r *Reputation) Validate() error + type ServerCfg struct + Auth struct{ ... } + Decay struct{ ... } + Exceptions struct{ ... } + IP6Prefix int + Listen string + Redis struct{ ... } + Statsd struct{ ... } + Sync struct{ ... } + VersionResponse string + Violations []Violation + func LoadCfg(confpath string) (ret ServerCfg, err error) + type VersionResponse struct + Build string + Commit string + Source string + Version string + type Violation struct + DecreaseLimit int + Name string + Penalty int + type ViolationRequest struct + IP string + Object string + SuppressRecovery int + Type string + Violation string + func (v *ViolationRequest) Fixup(typestr string) + func (v *ViolationRequest) Validate() error