DefaultS3Client

class DefaultS3Client(context: Context, sudoUserClient: SudoUserClient, val region: String, val bucket: String, logger: Logger = DefaultLogger.instance, idGenerator: IdGenerator = DefaultIdGenerator()) : S3Client

Default S3 client implementation.

Parameters

context

Android app context.

sudoUserClient

com.sudoplatform.sudouser.SudoUserClient used for authenticating to AWS S3.

Constructors

Link copied to clipboard
constructor(context: Context, sudoUserClient: SudoUserClient, region: String, bucket: String, logger: Logger = DefaultLogger.instance, idGenerator: IdGenerator = DefaultIdGenerator())

Properties

Link copied to clipboard
open override val bucket: String

S3 bucket used by Sudo service for storing users' blobs.

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 blob from AWS S3.

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

Downloads a blob from AWS S3.

Link copied to clipboard
open suspend override fun upload(data: ByteArray, objectId: String): String

Uploads a blob to AWS S3.