PlayObjectStoreClientEither

uk.gov.hmrc.objectstore.client.play.PlayObjectStoreClientEither
@Singleton
class PlayObjectStoreClientEither(wsClient: WSClient, config: ObjectStoreClientConfig)(implicit m: Materializer, ec: ExecutionContext) extends ObjectStoreClient[FutureEither, Request, Response, ResBody]

Client which returns responses within Future[Either[PlayObjectStoreException, *]].

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Inherited methods

def deleteObject(path: File, owner: String)(implicit hc: HeaderCarrier): FutureEither[Unit]

Delete object

Delete object

Value parameters

owner

Owner service of this object

path

Path of the object in object-store under owner

Attributes

Returns

Unit wrapped in the effect F

Inherited from:
ObjectStoreClient
def getObject[CONTENT](path: File, owner: String)(implicit cr: ObjectStoreContentRead[FutureEither, ResBody, CONTENT], hc: HeaderCarrier): FutureEither[Option[Object[CONTENT]]]

Get object

Get object

Type parameters

CONTENT

@see https://github.com/hmrc/object-store-client#get-object

Value parameters

owner

Owner service of this object

path

Path of the object in object-store under owner

Attributes

Returns

optional Object[CONTENT] wrapped in the effect F

Inherited from:
ObjectStoreClient
def listObjects(path: Directory, owner: String)(implicit hc: HeaderCarrier): FutureEither[ObjectListing]

List objects

List objects

Value parameters

owner

Owner service

path

Path of the object in object-store under owner

Attributes

Returns

ObjectSummary wrapped in the effect F

Inherited from:
ObjectStoreClient
def putObject[CONTENT](path: File, content: CONTENT, retentionPeriod: RetentionPeriod, contentType: Option[String], contentMd5: Option[Md5Hash], owner: String)(implicit w: ObjectStoreContentWrite[FutureEither, CONTENT, Request], hc: HeaderCarrier): FutureEither[ObjectSummaryWithMd5]

Put object

Put object

Type parameters

CONTENT

@see https://github.com/hmrc/object-store-client#put-object

Value parameters

content

Content to upload

contentMd5

Optional MD5 hash of content

contentType

Optional Content-Type

owner

Owner service of this object

path

Path of the object in object-store under owner

retentionPeriod

Retention period of the object in object-store

Attributes

Returns

ObjectSummaryWithMd5 wrapped in the effect F

Note

Storing an object on an existing path will overwrite the previously stored object on that path.

Inherited from:
ObjectStoreClient
def uploadFromUrl(from: URL, to: File, retentionPeriod: RetentionPeriod, contentType: Option[String], contentMd5: Option[Md5Hash], owner: String)(implicit hc: HeaderCarrier): FutureEither[ObjectSummaryWithMd5]

Upload object from a url

Upload object from a url

Value parameters

contentMd5

Optional MD5 hash of content

contentType

Optional Content-Type

from

Path of the object in object-store under owner

owner

Owner service of this object

retentionPeriod

Retention period of the object in object-store

to

Url of content to upload

Attributes

Returns

ObjectSummaryWithMd5 wrapped in the effect F

Note

Storing an object on an existing path will overwrite the previously stored object on that path.

Inherited from:
ObjectStoreClient
def zip(from: Directory, to: File, retentionPeriod: RetentionPeriod, fromOwner: String, toOwner: String)(implicit hc: HeaderCarrier): FutureEither[ObjectSummaryWithMd5]

Zip objects in a directory

Zip objects in a directory

Value parameters

from

Path of the directory to be zipped

fromOwner

Owner service of the directory to be zipped

retentionPeriod

Retention period of the object in object-store

to

Path of the target zip file

toOwner

Owner service of the target zip file

Attributes

Returns

ObjectSummaryWithMd5 wrapped in the effect F

Inherited from:
ObjectStoreClient