av

package
v0.0.0-...-7690095 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidFileName = errors.New("Invalid filename")

Functions

This section is empty.

Types

type ClamAVScanner

type ClamAVScanner struct {
	// contains filtered or unexported fields
}

func (ClamAVScanner) ScanBytes

func (av ClamAVScanner) ScanBytes(d []byte) (res Result, err error)

func (ClamAVScanner) ScanBytesAsync

func (av ClamAVScanner) ScanBytesAsync(d []byte) <-chan ResultErr

func (ClamAVScanner) ScanFile

func (av ClamAVScanner) ScanFile(filename string) (res Result, err error)

func (ClamAVScanner) ScanFileAsync

func (av ClamAVScanner) ScanFileAsync(filename string) <-chan ResultErr

func (ClamAVScanner) ScanStream

func (av ClamAVScanner) ScanStream(r io.Reader) (res Result, err error)

func (ClamAVScanner) ScanStreamAsync

func (av ClamAVScanner) ScanStreamAsync(r io.Reader) <-chan ResultErr

type Result

type Result struct {
	FileName string
	Status   bool
	Virus    string
}

type ResultErr

type ResultErr struct {
	Result
	Error error
}

type Scanner

type Scanner interface {
	ScanFile(string) (Result, error)
	ScanBytes([]byte) (Result, error)
	ScanStream(io.Reader) (Result, error)
	ScanFileAsync(string) <-chan ResultErr
	ScanBytesAsync([]byte) <-chan ResultErr
	ScanStreamAsync(io.Reader) <-chan ResultErr
}

func NewClamAVScanner

func NewClamAVScanner(network, address string) Scanner

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL