bitpeace

package bitpeace

Type members

Classlikes

trait Bitpeace[F[_]]

A store for binary data.

A store for binary data.

Binary data is given as a stream of bytes. The stream is saved in chunks, where each chunk is stored into a blob object (in contrast to use one blob for the whole data). This makes it possible to effectively retrieve partial content.

Companion
object
object Bitpeace
Companion
class
case class BitpeaceConfig[F[_]](metaTable: String, chunkTable: String, mimetypeDetect: MimetypeDetect, randomIdGen: F[String])
Companion
object
Companion
class
case class BitpeaceTables[F[_]](cfg: BitpeaceConfig[F])
object Compat
final case class FileChunk(fileId: String, chunkNr: Long, chunkData: ByteVector)

A chunk of data.

A chunk of data.

The first chunk has chunkNr = 0

final case class FileMeta(id: String, timestamp: Instant, mimetype: Mimetype, length: Long, checksum: String, chunks: Int, chunksize: Int)
case class Mimetype(primary: String, sub: String, params: Map[String, String])

Utility around `javax.activation.Mimetype'.

Utility around `javax.activation.Mimetype'.

Companion
object
object Mimetype
Companion
class

Detect content type given bytes and optionally some hints like filename or advertised mimetype.

Detect content type given bytes and optionally some hints like filename or advertised mimetype.

Companion
object
Companion
class
case class MimetypeHint(filename: Option[String], advertised: Option[String])
Companion
object
object MimetypeHint
Companion
class
sealed trait Outcome[A]
Companion
object
object Outcome
Companion
class
sealed trait Range

A range for a chunk query.

A range for a chunk query.

Specifies how many chunks and how many bytes of selected chunks have to be skipped.

Companion
object
object Range
Companion
class
trait RangeDef extends FileMeta => Validated[String, Range]

When requsting a specific range of data, the offsets must be calculated given the total size and chunksize.

When requsting a specific range of data, the offsets must be calculated given the total size and chunksize.

Companion
object
object RangeDef
Companion
class

Use Tika for content type detection.

Use Tika for content type detection.

Remember to add a dependency to tika, as this is an optional feature.