Documentation
¶
Overview ¶
Package fprot Golang F-Prot client Fprot - Golang F-Prot client
Index ¶
- Variables
- type Client
- func (c *Client) Close(ctx context.Context) (err error)
- func (c *Client) Info(ctx context.Context) (i Info, err error)
- func (c *Client) ScanDir(ctx context.Context, d string) (r []*Response, err error)
- func (c *Client) ScanDirStream(ctx context.Context, d string) (r []*Response, err error)
- func (c *Client) ScanFile(ctx context.Context, f string) (r []*Response, err error)
- func (c *Client) ScanFiles(ctx context.Context, f ...string) (r []*Response, err error)
- func (c *Client) ScanReader(ctx context.Context, i io.Reader) (r []*Response, err error)
- func (c *Client) ScanStream(ctx context.Context, f ...string) (r []*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)
- type Command
- type Info
- type Response
- type StatusCode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ZeroTime holds the zero value of time ZeroTime time.Time )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
A Client represents a Fprot client.
func (*Client) ScanDirStream ¶
ScanDirStream submits a directory for scanning as streams
func (*Client) ScanReader ¶
ScanReader submits an io reader via a stream for scanning
func (*Client) ScanStream ¶
ScanStream submits a stream for scanning
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
type Response ¶
type Response struct { Filename string ArchiveItem string Signature string Status string StatusCode StatusCode Infected bool Raw string }
Response is the response from the server
type StatusCode ¶
type StatusCode int
StatusCode represents the returned status code
const ( // NoMatch 0 No signature was matched NoMatch StatusCode = 0 // Infected 1 Atleast one virus-infected object was found Infected StatusCode = 1 // HeuristicMatch 2 Atleast one suspicious (heuristic match) object was found HeuristicMatch StatusCode = 2 // UserError 4 Interrupted by user UserError StatusCode = 4 // RestrictionError 8 Scan restriction caused scan to skip files RestrictionError StatusCode = 8 // SystemError 16 Platform error SystemError StatusCode = 16 // InternalError 32 Internal engine error InternalError StatusCode = 32 // SkipError 64 Atleast one object was not scanned SkipError StatusCode = 64 // DisinfectError 128 Atleast one object was disinfected DisinfectError StatusCode = 128 )
func (StatusCode) String ¶
func (c StatusCode) String() (s string)
Click to show internal directories.
Click to hide internal directories.