Documentation ¶
Overview ¶
Package spamc Golang spamc client Spamc - Golang spamc client
Index ¶
- Constants
- type Client
- func (c *Client) Check(r io.Reader) (rs *response.Response, err error)
- func (c *Client) DisableCompression()
- func (c *Client) DisableRawBody()
- func (c *Client) DisableTLS()
- func (c *Client) DisableTLSVerification()
- func (c *Client) EnableCompression()
- func (c *Client) EnableRawBody()
- func (c *Client) EnableTLS()
- func (c *Client) EnableTLSVerification()
- func (c *Client) Headers(r io.Reader) (rs *response.Response, err error)
- func (c *Client) Learn(r io.Reader, l request.MsgType) (rs *response.Response, err error)
- func (c *Client) Ping() (s bool, err error)
- func (c *Client) Process(r io.Reader) (rs *response.Response, err error)
- func (c *Client) Report(r io.Reader) (rs *response.Response, err error)
- func (c *Client) ReportIfSpam(r io.Reader) (rs *response.Response, err error)
- func (c *Client) Revoke(r io.Reader) (rs *response.Response, err error)
- func (c *Client) SetCmdTimeout(t time.Duration)
- func (c *Client) SetConnRetries(s int)
- func (c *Client) SetConnSleep(s time.Duration)
- func (c *Client) SetConnTimeout(t time.Duration)
- func (c *Client) SetRootCA(p string) (err error)
- func (c *Client) SetUser(u string)
- func (c *Client) Symbols(r io.Reader) (rs *response.Response, err error)
- func (c *Client) Tell(r io.Reader, l request.MsgType, a request.TellAction) (rs *response.Response, err error)
Constants ¶
const (
// ClientVersion supported protocol version
ClientVersion = "1.5"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
A Client represents a Spamc client.
func (*Client) DisableCompression ¶
func (c *Client) DisableCompression()
DisableCompression disables compression
func (*Client) DisableRawBody ¶
func (c *Client) DisableRawBody()
DisableRawBody enables returning the raw body
func (*Client) DisableTLSVerification ¶
func (c *Client) DisableTLSVerification()
DisableTLSVerification disables verification of the server certificate
func (*Client) EnableCompression ¶
func (c *Client) EnableCompression()
EnableCompression enables compression
func (*Client) EnableRawBody ¶
func (c *Client) EnableRawBody()
EnableRawBody enables returning the raw body
func (*Client) EnableTLSVerification ¶
func (c *Client) EnableTLSVerification()
EnableTLSVerification enables verification of the server certificate
func (*Client) Headers ¶
Headers requests the SPAMD service to check a message with a HEADERS request.
func (*Client) Ping ¶
Ping sends a ping request to the SPAMD service and will receive a response if the service is alive.
func (*Client) Process ¶
Process requests the SPAMD service to check a message with a PROCESS request.
func (*Client) ReportIfSpam ¶
ReportIfSpam requests the SPAMD service to check a message with a REPORT_IFSPAM request.
func (*Client) SetCmdTimeout ¶
SetCmdTimeout sets the cmd timeout
func (*Client) SetConnRetries ¶
SetConnRetries sets the number of times connection is retried
func (*Client) SetConnSleep ¶
SetConnSleep sets the connection retry sleep duration in seconds
func (*Client) SetConnTimeout ¶
SetConnTimeout sets the connection timeout
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
spamc
Package main Spamc - Golang spamc client Package main Spamc - Golang spamc client
|
Package main Spamc - Golang spamc client Package main Spamc - Golang spamc client |
Package main Spamc - Golang spamc client
|
Package main Spamc - Golang spamc client |
Package header Golang spamc client Spamc - Golang spamc client
|
Package header Golang spamc client Spamc - Golang spamc client |
Package request Golang spamc client Spamc - Golang spamc client
|
Package request Golang spamc client Spamc - Golang spamc client |
Package response Golang spamc client Spamc - Golang spamc client
|
Package response Golang spamc client Spamc - Golang spamc client |