DefaultS3Client

class DefaultS3Client(context: Context, sudoUserClient: SudoUserClient, val region: String, val bucket: String, logger: Logger) : S3Client

Default S3 client implementation.

Parameters

context

Android app context.

sudoUserClient

SudoUserClient used for authenticating to AWS S3.

Constructors

Link copied to clipboard
constructor(context: Context, sudoUserClient: SudoUserClient, region: String, bucket: String, logger: Logger)

Properties

Link copied to clipboard
open override val bucket: String

S3 bucket used by Email Service for storing RFC822 data.

Link copied to clipboard
open override val region: String

AWS region hosting the S3 bucket.

Functions

Link copied to clipboard
open suspend override fun delete(objectId: String)

Deletes a RFC822 data from AWS S3.

Link copied to clipboard
open suspend override fun download(key: String): ByteArray

Downloads a RFC822 data from AWS S3.

Link copied to clipboard
open suspend override fun getObjectMetadata(key: String): ObjectMetadata

Returns the metadata associated with the object with the given key.

Link copied to clipboard
open suspend override fun list(bucketName: String, prefix: String): List<S3ClientListOutput>

Returns a list of objects from AWS S3

Link copied to clipboard
open suspend override fun upload(data: ByteArray, objectId: String, metadata: Map<String, String>?): String

Uploads a RFC822 data to AWS S3.