AMQP communication structures¶
Definitions of the communication structures used in edeposit.amqp.antivirus project.
-
class
antivirus.structures.
ScanFile
[source]¶ Bases:
antivirus.structures.ScanFile
Request to scan file.
Parameters: Returns: Return type: Create new instance of ScanFile(filename, b64_data)
-
class
antivirus.structures.
UpdateDatabase
[source]¶ Bases:
antivirus.structures.UpdateDatabase
Request to update clamav database (= to run
freshclam
program).Returns: DatabaseUpdated
Return type: object Create new instance of UpdateDatabase()
-
class
antivirus.structures.
ScanResult
[source]¶ Bases:
antivirus.structures.ScanResult
Result of the file scan.
Parameters: { "local_path": ("RESULT", "TYPE") }
Where RESULT is “FOUND” or string like that and TYPE is name of the malware.
Note
When no malware is found,
result
is blank dict.Create new instance of ScanResult(filename, result)
-
class
antivirus.structures.
DatabaseUpdated
[source]¶ Bases:
antivirus.structures.DatabaseUpdated
Response to
UpdateDatabase
.- Attr:
- log (str): Log of the
freshclam
run.
Create new instance of DatabaseUpdated(log,)