malwarescan

package
v1.413.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Scan(candidate io.Reader) (*ScanResult, error)
	Info() (*Info, error)
}

Client : Interface for the malwarescan api provided by SAP CP (see https://api.sap.com/api/MalwareScanAPI/overview)

type ClientImpl

type ClientImpl struct {
	HTTPClient piperhttp.Sender
	Host       string
}

ClientImpl : Client implementation of the malwarescan api provided by SAP CP (see https://api.sap.com/api/MalwareScanAPI/overview)

func (*ClientImpl) Info

func (c *ClientImpl) Info() (*Info, error)

Info : Returns some information about the scanengine used by the malwarescan service.

func (*ClientImpl) Scan

func (c *ClientImpl) Scan(candidate io.Reader) (*ScanResult, error)

Scan : Triggers a malwarescan in SAP CP for the given content.

type Info

type Info struct {
	MaxScanSize        int
	SignatureTimestamp string
	EngineVersion      string
}

Info : Returned by the info endpoint of the malwarescan api of SAP CP

type ScanError

type ScanError struct {
	Message string
}

ScanError : Returned by the malwarescan api of SAP CP in case of an error

type ScanResult

type ScanResult struct {
	MalwareDetected          bool   `json:"malwareDetected"`
	EncryptedContentDetected bool   `json:"encryptedContentDetected"`
	ScanSize                 int    `json:"scanSize"`
	Finding                  string `json:"finding,omitempty"`
	MimeType                 string `json:"mimeType"`
	SHA256                   string `json:"SHA256"`
}

ScanResult : Returned by the scan endpoint of the malwarescan api of SAP CP

Jump to

Keyboard shortcuts

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