Documentation
¶
Overview ¶
Package spamdclient Golang Spamd SpamAssassin Client spamd-client - Golang Spamd SpamAssassin Client
Index ¶
- Constants
- type Client
- func (c *Client) Check(ctx context.Context, 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(ctx context.Context, r io.Reader) (rs *response.Response, err error)
- func (c *Client) Learn(ctx context.Context, r io.Reader, l request.MsgType) (rs *response.Response, err error)
- func (c *Client) Ping(ctx context.Context) (s bool, err error)
- func (c *Client) Process(ctx context.Context, r io.Reader) (rs *response.Response, err error)
- func (c *Client) Report(ctx context.Context, r io.Reader) (rs *response.Response, err error)
- func (c *Client) ReportIfSpam(ctx context.Context, r io.Reader) (rs *response.Response, err error)
- func (c *Client) Revoke(ctx context.Context, 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(ctx context.Context, r io.Reader) (rs *response.Response, err error)
- func (c *Client) Tell(ctx context.Context, 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 Spamd-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) Learn ¶
func (c *Client) Learn(ctx context.Context, r io.Reader, l request.MsgType) (rs *response.Response, err error)
Learn instructs the SPAMD service to learn tokens from a message
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 |
---|---|
Package header Golang Spamd SpamAssassin Client spamd-client - Golang Spamd SpamAssassin Client
|
Package header Golang Spamd SpamAssassin Client spamd-client - Golang Spamd SpamAssassin Client |
Package request Golang Spamd SpamAssassin Client spamd-client - Golang Spamd SpamAssassin Client
|
Package request Golang Spamd SpamAssassin Client spamd-client - Golang Spamd SpamAssassin Client |
Package response Golang Spamd SpamAssassin Client spamd-client - Golang Spamd SpamAssassin Client
|
Package response Golang Spamd SpamAssassin Client spamd-client - Golang Spamd SpamAssassin Client |