net.scalytica.clammyscan

ClammyBodyParsers

trait ClammyBodyParsers extends ClammyParserConfig

Enables streaming upload of files/attachments with custom metadata to GridFS

Self Type
ClammyBodyParsers with Controller
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ClammyBodyParsers
  2. ClammyParserConfig
  3. ConfigKeys
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type ClamResponse = Either[ClamError, FileOk]

  2. type ClammyGridFSBody = (Future[(ClammyBodyParsers.this)#ClamResponse], Future[ReadFile[BSONValue]])

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. def allowDuplicateFiles: Boolean

    Indicates whether or not to allow storing duplicate file names...

    Indicates whether or not to allow storing duplicate file names... default value is true

    Definition Classes
    ClammyParserConfig
  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def canRemoveInfectedFiles: Boolean

    Remove file if it is infected...

    Remove file if it is infected... defaults value is true

    Definition Classes
    ClammyParserConfig
  7. def canRemoveOnError: Boolean

    Remove file if an error occurred during scanning...

    Remove file if an error occurred during scanning... defaults to true, but will be overridden and set to false if shouldFailOnError = false

    Definition Classes
    ClammyParserConfig
  8. val cbpLogger: Logger

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. val disabled: String

    Definition Classes
    ConfigKeys
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. val failOnErrorKey: String

    Definition Classes
    ConfigKeys
  14. val filenameRegex: String

    Definition Classes
    ConfigKeys
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def futureGridFSFile(implicit request: Request[MultipartFormData[(ClammyBodyParsers.this)#ClammyGridFSBody]]): Future[ReadFile[BSONValue]]

    Convenience function for retrieving the actual FilePart from the request, after scanning and saving has been completed.

    Convenience function for retrieving the actual FilePart from the request, after scanning and saving has been completed.

    Since the scan results have been validated as part of the parsing, we can be sure that the it passed through successfully.

  17. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  18. val gridfsDuplicateFilesKey: String

    Definition Classes
    ConfigKeys
  19. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  20. val hostKey: String

    Definition Classes
    ConfigKeys
  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. val portKey: String

    Definition Classes
    ConfigKeys
  26. val removeInfectedKey: String

    Definition Classes
    ConfigKeys
  27. val removeOnErrorKey: String

    Definition Classes
    ConfigKeys
  28. def scanAndParseAsGridFS[S, R[_], W[_], Id <: BSONValue](gfs: GridFS[S, R, W], fileName: Option[String] = None, metaData: Option[BSONDocument], allowDuplicates: Boolean = allowDuplicateFiles)(fileExists: (String) ⇒ Boolean)(implicit readFileReader: R[ReadFile[BSONValue]], sWriter: W[BSONDocument], ec: ExecutionContext): BodyParser[MultipartFormData[(ClammyBodyParsers.this)#ClammyGridFSBody]]

    Gets a body parser that will save a file, with specified metadata and filename, sent with multipart/form-data into the given GridFS store.

    Gets a body parser that will save a file, with specified metadata and filename, sent with multipart/form-data into the given GridFS store.

    First the stream is sent to both the ClamScan Iteratee and the GridFS Iteratee using Enumeratee.zip. Then, when both Iteratees are done and none of them ended up in an Error state, the response is validated to check for the presence of a ClamError. If this is found in the result, the file is removed from GridFS and a JSON Result is returned.

    S => Structure R => Reader W => Writer Id => extends BSONValue

  29. def scanAndParseAsTempFile(implicit ec: ExecutionContext): BodyParser[MultipartFormData[(Future[Either[ClamError, FileOk]], TemporaryFile)]]

    Scans file for virus and buffers to a temporary file.

    Scans file for virus and buffers to a temporary file. Temp file is removed if file is infected.

  30. def scanDisabled: Boolean

    Disables all virus scanning...

    Disables all virus scanning... defaults to false

    Definition Classes
    ClammyParserConfig
  31. def scanOnly(implicit ec: ExecutionContext): BodyParser[MultipartFormData[Future[(ClammyBodyParsers.this)#ClamResponse]]]

    Mostly for convenience this.

    Mostly for convenience this. If you need a service for just scanning a file for infections, this is it.

  32. def shouldFailOnError: Boolean

    Whether or not to cause the body parser to stop uploading if we cannot connect to clamd...

    Whether or not to cause the body parser to stop uploading if we cannot connect to clamd... defaults to false

    Definition Classes
    ClammyParserConfig
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  34. val timeoutKey: String

    Definition Classes
    ConfigKeys
  35. def toString(): String

    Definition Classes
    AnyRef → Any
  36. def validFilenameRegex: Option[String]

    Allows defining a regular expression to validate filenames for illegal characters.

    Allows defining a regular expression to validate filenames for illegal characters. A good one could e.g. be: (.[\"\*\\\>\<\?\/\:\|].)|(.[\.]?.[\.]$)|(.*[ ]+$)

    Definition Classes
    ClammyParserConfig
  37. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ClammyParserConfig

Inherited from ConfigKeys

Inherited from AnyRef

Inherited from Any

Ungrouped