billstclair/elm-s3/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

S3.Types

Types for S3 module

Types

type Error
= HttpError Error
| MalformedXmlError String
| ParseError DecodeDetails
| DecodeError String

Errors returned from S3 operations

HttpError is from the standard Elm Http module.

MalformedXmlError denotes an error in parsing the raw XML returned by S3.

ParseError denotes an error turning that parsed XML into an Elm object.

DecodeError denotes a Decoder error in parsing S3 account info.

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

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 =
List QueryElement

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

aclToString : CannedAcl -> String

Convert a CannedAcl to a String.