Client

uk.gov.nationalarchives.dp.client.Client
object Client

Case classes common to several clients

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Client.type

Members list

Type members

Classlikes

case class BitStreamInfo(name: String, fileSize: Long, url: String, fixity: Fixity, generationVersion: Int, generationType: GenerationType, potentialCoTitle: Option[String], parentRef: Option[UUID])

Represents bitstream information from a content object

Represents bitstream information from a content object

Value parameters

fileSize

The size of the bitstream

fixity

The fixity of the bitstream

generationVersion

The version of the generation

name

The name of the bitstream

parentRef

The parent ref of the CO

potentialCoTitle

The title of the CO

url

The url to download the bitstream

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ClientConfig[F[_], S](apiBaseUrl: String, secretName: String, backend: SttpBackend[F, S], duration: FiniteDuration, secretsManagerEndpointUri: String)

Configuration for the clients

Configuration for the clients

Type parameters

F

The effect type for the client

S

The type of the Stream for the client.

Value parameters

apiBaseUrl

The Preservica service url

backend

The STTP backend used to send the API requests

duration

The timeout of the cache. Defaults to 15 minutes

secretName

The name of the AWS secret storing the API username and password

secretsManagerEndpointUri

The endpoint for communicating with secrets manager

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Fixity(algorithm: String, value: String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def apply[F[_], S](clientConfig: ClientConfig[F, S])(using me: MonadError[F, Throwable], sync: Sync[F]): Client[F, S]

Creates a new Client instance.

Creates a new Client instance.

Type parameters

F

The type of the effect

S

The type of the Stream to be used for the streaming methods.

Value parameters

clientConfig

Configuration parameters needed to create the client

me

An implicit instance of cats.MonadError

sync

An implicit instance of cats.Sync

Attributes