billstclair/elm-s3/2.1.0

NOTE: the latest version is 3.0.0

S3.Types

Types for S3 module

Types

type Error
= HttpError Error
| AWSError AWSAppError
| DecodeError String

Errors returned from S3 operations

HttpError is from the standard Elm Http module.

AWSError is from the AWS.Http module.

DecodeError denotes a Decoder error in parsing S3 account info.

type alias Account =
{ name : String
, region : Maybe String
, isDigitalOcean : Bool
, accessKey : String
, secretKey : String
, buckets : List String
}

Information about an S3 account

type alias Bucket =
String

The name of an S3 bucket.

type alias Key =
String

The name of an S3 key.

type alias Mimetype =
String

An HTTP mimetype, e.g. "text/html".

type alias StorageClass =
String

The StorageClass for a key returned from listing a bucket's contents.

type alias Owner =
{ id : String
, displayName : String
}

The owner of an object returned from listing a bucket's contents.

type alias KeyInfo =
{ key : Key
, lastModified : String
, eTag : String
, size : Int
, storageClass : StorageClass
, owner : Owner
}

Information about a single key returned from listing a bucket's contents.

type alias KeyList =
{ name : String
, prefix : Maybe String
, marker : Maybe String
, nextMarker : Maybe String
, maxKeys : Int
, isTruncated : Bool
, keys : List KeyInfo
}

All the information returned from listing a bucket's contents.

An Elm encoding of the ListBucketResult XML element.

type alias Query =

A list of QueryElements.

= AnyQuery String String
| XAmzAcl CannedAcl
| Delimiter String
| Marker String
| MaxKeys Int
| Prefix String

An element of a Query, used for HTTP headers and query parameters.

AnyQuery allows you to encode any key/value pair.

XAmzAcl is used as a header with S3.putObject.

The others are used as query parameters with S3.listKeys.

= AclPrivate
| AclPublicRead
| AclPublicReadWrite
| AclAwsExecRead
| AclAuthenticatedRead
| AclBucketOwnerRead
| AclBucketOwnerFullControl
| AclLogDeliveryWrite

Values for the XAmzAcl Query type.

Functions

Convert a CannedAcl to a String.