AssetDataSource

internal class AssetDataSource(assetApi: <Error class: unknown class>, assetDao: <Error class: unknown class>, assetMapper: AssetMapper = MapperProvider.assetMapper(), kaliumFileSystem: KaliumFileSystem) : AssetRepository

Constructors

Link copied to clipboard
constructor(assetApi: <Error class: unknown class>, assetDao: <Error class: unknown class>, assetMapper: AssetMapper = MapperProvider.assetMapper(), kaliumFileSystem: KaliumFileSystem)

Functions

Link copied to clipboard
open suspend override fun deleteAsset(assetId: String, assetDomain: String?, assetToken: String?): Either<CoreFailure, Unit>

Method used to delete asset locally and externally

Link copied to clipboard
open suspend override fun deleteAssetLocally(assetId: String): Either<CoreFailure, Unit>

Method used to delete asset only locally

Link copied to clipboard
open suspend override fun downloadPublicAsset(assetId: String, assetDomain: String?): Either<CoreFailure, <Error class: unknown class>>

Method used to download and persist to local memory a public asset

Link copied to clipboard
open suspend override fun fetchDecodedAsset(assetId: String): Either<CoreFailure, <Error class: unknown class>>
Link copied to clipboard
open suspend override fun fetchPrivateDecodedAsset(assetId: String, assetDomain: String?, assetName: String, mimeType: String?, assetToken: String?, encryptionKey: <Error class: unknown class>, assetSHA256Key: <Error class: unknown class>, downloadIfNeeded: Boolean): Either<CoreFailure, <Error class: unknown class>>

Method used to fetch the Path of a decoded private asset

Link copied to clipboard
open suspend override fun persistAsset(assetId: String, assetDomain: String?, decodedDataPath: <Error class: unknown class>, assetDataSize: Long, extension: String?): Either<CoreFailure, <Error class: unknown class>>

Method used to persist to local memory the decoded asset

Link copied to clipboard
open suspend override fun uploadAndPersistPrivateAsset(mimeType: String, assetDataPath: <Error class: unknown class>, otrKey: <Error class: unknown class>, extension: String?): Either<CoreFailure, <Error class: unknown class><<Error class: unknown class>, <Error class: unknown class>>>

Method used to upload the encrypted data and persist to local memory the already decoded asset

Link copied to clipboard
open suspend override fun uploadAndPersistPublicAsset(mimeType: String, assetDataPath: <Error class: unknown class>, assetDataSize: Long): Either<CoreFailure, <Error class: unknown class>>

Method used to upload and persist to local memory a public asset