bucket

Types

pub type Bucket {
  Bucket(name: String, creation_date: String)
}

Constructors

  • Bucket(name: String, creation_date: String)
pub type BucketError {
  InvalidXmlSyntaxError(String)
  UnexpectedXmlFormatError(String)
  UnexpectedResponseError(Response(BitArray))
  S3Error(http_status: Int, error: ErrorObject)
}

Constructors

  • InvalidXmlSyntaxError(String)
  • UnexpectedXmlFormatError(String)
  • UnexpectedResponseError(Response(BitArray))
  • S3Error(http_status: Int, error: ErrorObject)

The creds used to connect to an S3 API.

pub type Credentials {
  Credentials(
    scheme: Scheme,
    port: Option(Int),
    host: String,
    region: String,
    access_key_id: String,
    secret_access_key: String,
  )
}

Constructors

  • Credentials(
      scheme: Scheme,
      port: Option(Int),
      host: String,
      region: String,
      access_key_id: String,
      secret_access_key: String,
    )

An error from S3.

pub type ErrorObject {
  ErrorObject(
    code: String,
    message: String,
    resource: String,
    request_id: String,
  )
}

Constructors

  • ErrorObject(
      code: String,
      message: String,
      resource: String,
      request_id: String,
    )

Functions

pub fn credentials(
  host: String,
  access_key_id: String,
  secret_access_key: String,
) -> Credentials
pub fn with_port(creds: Credentials, port: Int) -> Credentials

Set the port for the credentials.

pub fn with_region(
  creds: Credentials,
  region: String,
) -> Credentials

Set the region for the credentials.

pub fn with_scheme(
  creds: Credentials,
  scheme: Scheme,
) -> Credentials

Set the scheme for the credentials. You should use HTTPS unless not possible.

Search Document