cli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClamdParams

type ClamdParams struct {
	Address     string
	NetworkType string
	ConnTimeout time.Duration
	ReadTimeout time.Duration
	Out         OutType
}

func (*ClamdParams) GetAddress

func (c *ClamdParams) GetAddress() string

func (*ClamdParams) GetConnTimeout

func (c *ClamdParams) GetConnTimeout() time.Duration

func (*ClamdParams) GetNetworkType

func (c *ClamdParams) GetNetworkType() string

func (*ClamdParams) GetOut

func (c *ClamdParams) GetOut() OutType

func (*ClamdParams) GetReadTimeout

func (c *ClamdParams) GetReadTimeout() time.Duration

func (*ClamdParams) SetAddress

func (c *ClamdParams) SetAddress(address string)

func (*ClamdParams) SetConnTimeout

func (c *ClamdParams) SetConnTimeout(timeout time.Duration)

func (*ClamdParams) SetNetworkType

func (c *ClamdParams) SetNetworkType(netWorkType string)

func (*ClamdParams) SetOut

func (c *ClamdParams) SetOut(out OutType)

func (*ClamdParams) SetReadTimeout

func (c *ClamdParams) SetReadTimeout(timeout time.Duration)

type ClamdStats

type ClamdStats struct {
	Pools         int
	ThreadsLive   int
	ThreadsIdle   int
	ThreadsMax    int
	IdleTimeout   int
	QueueItems    int
	MemHeap       float64
	MemMmap       float64
	MemUsed       float64
	MemFree       float64
	MemReleasable float64
	MemPoolsUsed  float64
	MemPoolsTotal float64
}

func ParseStatStr

func ParseStatStr(statStr string) *ClamdStats

type NetworkType

type NetworkType string
const (
	Unix NetworkType = "unix"
	TCP  NetworkType = "tcp"
)

func (NetworkType) String

func (t NetworkType) String() string

type OutType

type OutType string
const (
	Json OutType = "json"
	Text OutType = "text"
)

func (OutType) String

func (o OutType) String() string

type Params

type Params interface {
	SetAddress(address string)
	SetNetworkType(netWorkType string)
	SetConnTimeout(timeout time.Duration)
	SetReadTimeout(timeout time.Duration)
	SetOut(out OutType)
	GetAddress() string
	GetNetworkType() string
	GetConnTimeout() time.Duration
	GetReadTimeout() time.Duration
	GetOut() OutType
}

type ScanResult

type ScanResult struct {
	Path   string `json:"path"`
	Virus  string `json:"virus"`
	Status string `json:"status"`
}

func FormatScanResult

func FormatScanResult(result string) ([]ScanResult, error)

Jump to

Keyboard shortcuts

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