do-spaces-0.2: DigitalOcean Spaces API bindings
Copyright(c) 2021 Rory Tyler Hayford
LicenseBSD-3-Clause
Maintainerrory.hayford@protonmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Network.DO.Spaces.Types

Description

 
Synopsis

Spaces

newtype SpacesT m a Source #

Constructors

SpacesT (ReaderT Spaces m a) 

Instances

Instances details
Monad m => MonadReader Spaces (SpacesT m) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

ask :: SpacesT m Spaces #

local :: (Spaces -> Spaces) -> SpacesT m a -> SpacesT m a #

reader :: (Spaces -> a) -> SpacesT m a #

Monad m => Monad (SpacesT m) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

(>>=) :: SpacesT m a -> (a -> SpacesT m b) -> SpacesT m b #

(>>) :: SpacesT m a -> SpacesT m b -> SpacesT m b #

return :: a -> SpacesT m a #

Functor m => Functor (SpacesT m) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

fmap :: (a -> b) -> SpacesT m a -> SpacesT m b #

(<$) :: a -> SpacesT m b -> SpacesT m a #

Applicative m => Applicative (SpacesT m) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

pure :: a -> SpacesT m a #

(<*>) :: SpacesT m (a -> b) -> SpacesT m a -> SpacesT m b #

liftA2 :: (a -> b -> c) -> SpacesT m a -> SpacesT m b -> SpacesT m c #

(*>) :: SpacesT m a -> SpacesT m b -> SpacesT m b #

(<*) :: SpacesT m a -> SpacesT m b -> SpacesT m a #

MonadIO m => MonadIO (SpacesT m) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

liftIO :: IO a -> SpacesT m a #

MonadUnliftIO m => MonadUnliftIO (SpacesT m) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

withRunInIO :: ((forall a. SpacesT m a -> IO a) -> IO b) -> SpacesT m b #

MonadThrow m => MonadThrow (SpacesT m) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

throwM :: Exception e => e -> SpacesT m a #

MonadCatch m => MonadCatch (SpacesT m) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

catch :: Exception e => SpacesT m a -> (e -> SpacesT m a) -> SpacesT m a #

Generic (SpacesT m a) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep (SpacesT m a) :: Type -> Type #

Methods

from :: SpacesT m a -> Rep (SpacesT m a) x #

to :: Rep (SpacesT m a) x -> SpacesT m a #

type Rep (SpacesT m a) Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep (SpacesT m a) = D1 ('MetaData "SpacesT" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'True) (C1 ('MetaCons "SpacesT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ReaderT Spaces m a))))

runSpacesT :: SpacesT m a -> Spaces -> m a Source #

data Spaces Source #

A client for interacting with the DO Spaces API

Constructors

Spaces 

Fields

Instances

Instances details
Generic Spaces Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep Spaces :: Type -> Type #

Methods

from :: Spaces -> Rep Spaces x #

to :: Rep Spaces x -> Spaces #

HasHttpManager Spaces Source # 
Instance details

Defined in Network.DO.Spaces.Types

Monad m => MonadReader Spaces (SpacesT m) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

ask :: SpacesT m Spaces #

local :: (Spaces -> Spaces) -> SpacesT m a -> SpacesT m a #

reader :: (Spaces -> a) -> SpacesT m a #

type Rep Spaces Source # 
Instance details

Defined in Network.DO.Spaces.Types

type MonadSpaces m = (MonadReader Spaces m, MonadIO m, MonadUnliftIO m, MonadCatch m) Source #

A synonym for the constraints necessary to run SpacesT actions

class Monad m => Action m a where Source #

Associated Types

type ConsumedResponse a :: Type Source #

Instances

Instances details
MonadSpaces m => Action m DeleteObject Source # 
Instance details

Defined in Network.DO.Spaces.Actions.DeleteObject

Associated Types

type ConsumedResponse DeleteObject Source #

MonadSpaces m => Action m DeleteBucketLifecycle Source # 
Instance details

Defined in Network.DO.Spaces.Actions.DeleteBucketLifecycle

MonadSpaces m => Action m DeleteBucketCORS Source # 
Instance details

Defined in Network.DO.Spaces.Actions.DeleteBucketCORS

MonadSpaces m => Action m DeleteBucket Source # 
Instance details

Defined in Network.DO.Spaces.Actions.DeleteBucket

Associated Types

type ConsumedResponse DeleteBucket Source #

MonadSpaces m => Action m UploadObject Source # 
Instance details

Defined in Network.DO.Spaces.Actions.UploadObject

Associated Types

type ConsumedResponse UploadObject Source #

MonadSpaces m => Action m ListParts Source # 
Instance details

Defined in Network.DO.Spaces.Actions.UploadMultipart

Associated Types

type ConsumedResponse ListParts Source #

MonadSpaces m => Action m CancelMultipart Source # 
Instance details

Defined in Network.DO.Spaces.Actions.UploadMultipart

MonadSpaces m => Action m CompleteMultipart Source # 
Instance details

Defined in Network.DO.Spaces.Actions.UploadMultipart

MonadSpaces m => Action m UploadPart Source # 
Instance details

Defined in Network.DO.Spaces.Actions.UploadMultipart

Associated Types

type ConsumedResponse UploadPart Source #

MonadSpaces m => Action m BeginMultipart Source # 
Instance details

Defined in Network.DO.Spaces.Actions.UploadMultipart

MonadSpaces m => Action m SetObjectACLs Source # 
Instance details

Defined in Network.DO.Spaces.Actions.SetObjectACLs

Associated Types

type ConsumedResponse SetObjectACLs Source #

MonadSpaces m => Action m SetBucketLifecycle Source # 
Instance details

Defined in Network.DO.Spaces.Actions.SetBucketLifecycle

MonadSpaces m => Action m SetBucketCORS Source # 
Instance details

Defined in Network.DO.Spaces.Actions.SetBucketCORS

Associated Types

type ConsumedResponse SetBucketCORS Source #

MonadSpaces m => Action m SetBucketACLs Source # 
Instance details

Defined in Network.DO.Spaces.Actions.SetBucketACLs

Associated Types

type ConsumedResponse SetBucketACLs Source #

MonadSpaces m => Action m ListBucket Source # 
Instance details

Defined in Network.DO.Spaces.Actions.ListBucket

Associated Types

type ConsumedResponse ListBucket Source #

MonadSpaces m => Action m ListAllBuckets Source # 
Instance details

Defined in Network.DO.Spaces.Actions.ListAllBuckets

MonadSpaces m => Action m GetObjectInfo Source # 
Instance details

Defined in Network.DO.Spaces.Actions.GetObjectInfo

Associated Types

type ConsumedResponse GetObjectInfo Source #

MonadSpaces m => Action m GetObjectACLs Source # 
Instance details

Defined in Network.DO.Spaces.Actions.GetObjectACLs

Associated Types

type ConsumedResponse GetObjectACLs Source #

MonadSpaces m => Action m GetObject Source # 
Instance details

Defined in Network.DO.Spaces.Actions.GetObject

Associated Types

type ConsumedResponse GetObject Source #

MonadSpaces m => Action m GetBucketLocation Source # 
Instance details

Defined in Network.DO.Spaces.Actions.GetBucketLocation

MonadSpaces m => Action m GetBucketLifecycle Source # 
Instance details

Defined in Network.DO.Spaces.Actions.GetBucketLifecycle

MonadSpaces m => Action m GetBucketCORS Source # 
Instance details

Defined in Network.DO.Spaces.Actions.GetBucketCORS

Associated Types

type ConsumedResponse GetBucketCORS Source #

MonadSpaces m => Action m GetBucketACLs Source # 
Instance details

Defined in Network.DO.Spaces.Actions.GetBucketACLs

Associated Types

type ConsumedResponse GetBucketACLs Source #

MonadSpaces m => Action m CreateBucket Source # 
Instance details

Defined in Network.DO.Spaces.Actions.CreateBucket

Associated Types

type ConsumedResponse CreateBucket Source #

MonadSpaces m => Action m CopyObject Source # 
Instance details

Defined in Network.DO.Spaces.Actions.CopyObject

Associated Types

type ConsumedResponse CopyObject Source #

data CredentialSource Source #

How to discover the Region, AccessKey, and SecretKey when creating a new Spaces client.

Constructors

Discover

Try a sequence of different sources until one succeeds

FromEnv (Maybe (Text, Text, Text))

Region, AccessKey and SecretKey env vars

FromFile FilePath (Maybe Profile)

Load your credentials from a file, optionally providing the profile to use (or default as the... default).

Explicit Region AccessKey SecretKey

Provide all values explicitly

type Profile = Text Source #

The name of a per-project configuration profile to select when loading credentials from a file

newtype AccessKey Source #

Spaces access key

Constructors

AccessKey 

Instances

Instances details
Eq AccessKey Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show AccessKey Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic AccessKey Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep AccessKey :: Type -> Type #

type Rep AccessKey Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep AccessKey = D1 ('MetaData "AccessKey" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'True) (C1 ('MetaCons "AccessKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unAccessKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

newtype SecretKey Source #

Spaces secret key

Constructors

SecretKey 

Instances

Instances details
Eq SecretKey Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show SecretKey Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic SecretKey Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep SecretKey :: Type -> Type #

type Rep SecretKey Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep SecretKey = D1 ('MetaData "SecretKey" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'True) (C1 ('MetaCons "SecretKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSecretKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

Buckets and Objects

newtype Object Source #

The name of a "key", in AWS parlance

Constructors

Object Text 

Instances

Instances details
Eq Object Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

(==) :: Object -> Object -> Bool #

(/=) :: Object -> Object -> Bool #

Show Object Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic Object Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep Object :: Type -> Type #

Methods

from :: Object -> Rep Object x #

to :: Rep Object x -> Object #

ToHttpApiData Object Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep Object Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep Object = D1 ('MetaData "Object" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'True) (C1 ('MetaCons "Object" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

mkObject :: MonadThrow m => Text -> m Object Source #

Smart constructor for Objects; names must not be empty

newtype Bucket Source #

The name of a single storage bucket

Constructors

Bucket Text 

Instances

Instances details
Eq Bucket Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

(==) :: Bucket -> Bucket -> Bool #

(/=) :: Bucket -> Bucket -> Bool #

Show Bucket Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic Bucket Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep Bucket :: Type -> Type #

Methods

from :: Bucket -> Rep Bucket x #

to :: Rep Bucket x -> Bucket #

ToHttpApiData Bucket Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep Bucket Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep Bucket = D1 ('MetaData "Bucket" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'True) (C1 ('MetaCons "Bucket" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

mkBucket :: MonadThrow m => Text -> m Bucket Source #

Smart constructor for Buckets; names must conform to the following rules:

This function ensures that names are valid and will also convert the Text to lowercase

data BucketInfo Source #

Information about a single Bucket

Constructors

BucketInfo 

Instances

Instances details
Eq BucketInfo Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show BucketInfo Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic BucketInfo Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep BucketInfo :: Type -> Type #

type Rep BucketInfo Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep BucketInfo = D1 ('MetaData "BucketInfo" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) (C1 ('MetaCons "BucketInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bucket) :*: S1 ('MetaSel ('Just "creationDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UTCTime)))

newtype OwnerID Source #

The ID of an Owner; also serves as a display name in Spaces

Constructors

OwnerID Int 

Instances

Instances details
Eq OwnerID Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

(==) :: OwnerID -> OwnerID -> Bool #

(/=) :: OwnerID -> OwnerID -> Bool #

Num OwnerID Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show OwnerID Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic OwnerID Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep OwnerID :: Type -> Type #

Methods

from :: OwnerID -> Rep OwnerID x #

to :: Rep OwnerID x -> OwnerID #

ToHttpApiData OwnerID Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep OwnerID Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep OwnerID = D1 ('MetaData "OwnerID" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'True) (C1 ('MetaCons "OwnerID" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

type DisplayName = OwnerID Source #

The display name is always equivalent to the owner's ID; Spaces includes it for AWS compatibility

data Owner Source #

The resource owner

Constructors

Owner 

Instances

Instances details
Eq Owner Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

(==) :: Owner -> Owner -> Bool #

(/=) :: Owner -> Owner -> Bool #

Show Owner Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

showsPrec :: Int -> Owner -> ShowS #

show :: Owner -> String #

showList :: [Owner] -> ShowS #

Generic Owner Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep Owner :: Type -> Type #

Methods

from :: Owner -> Rep Owner x #

to :: Rep Owner x -> Owner #

type Rep Owner Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep Owner = D1 ('MetaData "Owner" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) (C1 ('MetaCons "Owner" 'PrefixI 'True) (S1 ('MetaSel ('Just "ownerID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 OwnerID) :*: S1 ('MetaSel ('Just "displayName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DisplayName)))

data ObjectInfo Source #

Information about a single Object, returned when listing a Bucket's contents

Constructors

ObjectInfo 

Fields

Instances

Instances details
Eq ObjectInfo Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show ObjectInfo Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic ObjectInfo Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep ObjectInfo :: Type -> Type #

type Rep ObjectInfo Source # 
Instance details

Defined in Network.DO.Spaces.Types

data ObjectMetadata Source #

Metadata returned when querying information about an Object

Constructors

ObjectMetadata 

Fields

Instances

Instances details
Eq ObjectMetadata Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show ObjectMetadata Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic ObjectMetadata Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep ObjectMetadata :: Type -> Type #

type Rep ObjectMetadata Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep ObjectMetadata = D1 ('MetaData "ObjectMetadata" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) (C1 ('MetaCons "ObjectMetadata" 'PrefixI 'True) ((S1 ('MetaSel ('Just "contentLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "contentType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MimeType)) :*: (S1 ('MetaSel ('Just "etag") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ETag) :*: S1 ('MetaSel ('Just "lastModified") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UTCTime))))

type ETag = Text Source #

MD5 hash of an Object

Requests and responses

data SpacesRequest Source #

Constructors

SpacesRequest 

Fields

data SpacesResponse a Source #

Constructors

SpacesResponse 

Fields

Instances

Instances details
(HasField' name (SpacesResponse a) s, s ~ t, a ~ b) => HasField name (SpacesResponse a) (SpacesResponse b) s t Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

field :: Lens (SpacesResponse a) (SpacesResponse b) s t #

Show (ConsumedResponse a) => Show (SpacesResponse a) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic (SpacesResponse a) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep (SpacesResponse a) :: Type -> Type #

type Rep (SpacesResponse a) Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep (SpacesResponse a) = D1 ('MetaData "SpacesResponse" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) (C1 ('MetaCons "SpacesResponse" 'PrefixI 'True) (S1 ('MetaSel ('Just "result") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (ConsumedResponse a)) :*: S1 ('MetaSel ('Just "metadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SpacesMetadata))))

data SpacesRequestBuilder Source #

Constructors

SpacesRequestBuilder 

Fields

Instances

Instances details
Generic SpacesRequestBuilder Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep SpacesRequestBuilder :: Type -> Type #

type Rep SpacesRequestBuilder Source # 
Instance details

Defined in Network.DO.Spaces.Types

data SpacesMetadata Source #

Metadata and other response information returned from each Spaces API transaction; it can be helpful to retain this at times

Constructors

SpacesMetadata 

Fields

Instances

Instances details
Eq SpacesMetadata Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show SpacesMetadata Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic SpacesMetadata Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep SpacesMetadata :: Type -> Type #

type Rep SpacesMetadata Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep SpacesMetadata = D1 ('MetaData "SpacesMetadata" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) (C1 ('MetaCons "SpacesMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "requestID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RequestID)) :*: (S1 ('MetaSel ('Just "date") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UTCTime)) :*: S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Status))))

data WithMetadata Source #

Whether or not to retain SpacesMetadata when consuming responses

Constructors

KeepMetadata 
NoMetadata 

Instances

Instances details
Eq WithMetadata Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show WithMetadata Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic WithMetadata Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep WithMetadata :: Type -> Type #

type Rep WithMetadata Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep WithMetadata = D1 ('MetaData "WithMetadata" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) (C1 ('MetaCons "KeepMetadata" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoMetadata" 'PrefixI 'False) (U1 :: Type -> Type))

data RawResponse m Source #

Constructors

RawResponse 

Fields

Instances

Instances details
Generic (RawResponse m) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep (RawResponse m) :: Type -> Type #

Methods

from :: RawResponse m -> Rep (RawResponse m) x #

to :: Rep (RawResponse m) x -> RawResponse m #

type Rep (RawResponse m) Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep (RawResponse m) = D1 ('MetaData "RawResponse" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) (C1 ('MetaCons "RawResponse" 'PrefixI 'True) (S1 ('MetaSel ('Just "headers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Header]) :*: S1 ('MetaSel ('Just "body") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (BodyBS m))))

type BodyBS m = ConduitT () ByteString m () Source #

A request or response body

data Method Source #

HTTP request methods, to avoid using http-client's stringly-typed Method synonym

Constructors

GET 
POST 
PUT 
DELETE 
HEAD 

Instances

Instances details
Eq Method Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

(==) :: Method -> Method -> Bool #

(/=) :: Method -> Method -> Bool #

Ord Method Source # 
Instance details

Defined in Network.DO.Spaces.Types

Read Method Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show Method Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic Method Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep Method :: Type -> Type #

Methods

from :: Method -> Rep Method x #

to :: Rep Method x -> Method #

type Rep Method Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep Method = D1 ('MetaData "Method" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) ((C1 ('MetaCons "GET" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "POST" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PUT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HEAD" 'PrefixI 'False) (U1 :: Type -> Type))))

data Region Source #

DO regions where Spaces is available (only a subset of all regions)

Constructors

NewYork

NYC3

Amsterdam

AMS3

SanFrancisco

SFO3

Singapore

SGP1

Frankfurt

FRA1

Instances

Instances details
Eq Region Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

(==) :: Region -> Region -> Bool #

(/=) :: Region -> Region -> Bool #

Show Region Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic Region Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep Region :: Type -> Type #

Methods

from :: Region -> Rep Region x #

to :: Rep Region x -> Region #

type Rep Region Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep Region = D1 ('MetaData "Region" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) ((C1 ('MetaCons "NewYork" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Amsterdam" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SanFrancisco" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Singapore" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Frankfurt" 'PrefixI 'False) (U1 :: Type -> Type))))

type RequestID = Text Source #

A unique ID that is assigned to each request

type CacheControl = Text Source #

Cache-Control request header value

type ContentDisposition = Text Source #

Content-Disposition request header value

type ContentEncoding = Text Source #

Content-Encoding request header value

type UserMetadata = [(Text, Text)] Source #

Arbitrary key-value pairs supplied by the user, for use in PUT or POST requests. Each pair expands into x-amz-meta-*, e.g. x-amz-meta-s3cmd-attrs: uid:1000/gname:asb...

data UploadHeaders Source #

Optional headers when uploading objects

Instances

Instances details
Eq UploadHeaders Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show UploadHeaders Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic UploadHeaders Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep UploadHeaders :: Type -> Type #

type Rep UploadHeaders Source # 
Instance details

Defined in Network.DO.Spaces.Types

data CannedACL Source #

"Canned" access controls; Spaces doesn't support the full range offered by s3

Constructors

Private

No unauthenticated public access

PublicRead

Unauthenticated public read access permitted

Instances

Instances details
Eq CannedACL Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show CannedACL Source # 
Instance details

Defined in Network.DO.Spaces.Types

data CORSRule Source #

Cross-origin resource sharing rules

Instances

Instances details
Eq CORSRule Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show CORSRule Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic CORSRule Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep CORSRule :: Type -> Type #

Methods

from :: CORSRule -> Rep CORSRule x #

to :: Rep CORSRule x -> CORSRule #

type Rep CORSRule Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep CORSRule = D1 ('MetaData "CORSRule" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) (C1 ('MetaCons "CORSRule" 'PrefixI 'True) (S1 ('MetaSel ('Just "allowedOrigin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "allowedMethods") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Method]) :*: S1 ('MetaSel ('Just "allowedHeaders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [HeaderName]))))

mkCORSRule :: MonadThrow m => Text -> [Method] -> [HeaderName] -> m CORSRule Source #

Smart constructor for CORSRule. Ensures that both origins and header names contain a maximum of one wildcard and removes duplicates from both headers and methods

data Grant Source #

An individual access grant

Constructors

Grant 

Instances

Instances details
Eq Grant Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

(==) :: Grant -> Grant -> Bool #

(/=) :: Grant -> Grant -> Bool #

Show Grant Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

showsPrec :: Int -> Grant -> ShowS #

show :: Grant -> String #

showList :: [Grant] -> ShowS #

Generic Grant Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep Grant :: Type -> Type #

Methods

from :: Grant -> Rep Grant x #

to :: Rep Grant x -> Grant #

type Rep Grant Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep Grant = D1 ('MetaData "Grant" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) (C1 ('MetaCons "Grant" 'PrefixI 'True) (S1 ('MetaSel ('Just "permission") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Permission) :*: S1 ('MetaSel ('Just "grantee") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Grantee)))

data Permission Source #

Access grant level; Spaces currently only supports these two levels

Constructors

ReadOnly 
FullControl 

Instances

Instances details
Eq Permission Source # 
Instance details

Defined in Network.DO.Spaces.Types

Ord Permission Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show Permission Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic Permission Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep Permission :: Type -> Type #

type Rep Permission Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep Permission = D1 ('MetaData "Permission" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) (C1 ('MetaCons "ReadOnly" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FullControl" 'PrefixI 'False) (U1 :: Type -> Type))

data Grantee Source #

Information about who an access grant applies to

Constructors

Group

Nominally contains a URI value, but Spaces only supports a single value for group access grants

CanonicalUser Owner 

Instances

Instances details
Eq Grantee Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

(==) :: Grantee -> Grantee -> Bool #

(/=) :: Grantee -> Grantee -> Bool #

Show Grantee Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic Grantee Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep Grantee :: Type -> Type #

Methods

from :: Grantee -> Rep Grantee x #

to :: Rep Grantee x -> Grantee #

type Rep Grantee Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep Grantee = D1 ('MetaData "Grantee" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) (C1 ('MetaCons "Group" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CanonicalUser" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Owner)))

data ACLResponse Source #

A generic type for describing ACL configuration, can be applied to both Bucket and Object ACLs

Constructors

ACLResponse 

Instances

Instances details
Eq ACLResponse Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show ACLResponse Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic ACLResponse Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep ACLResponse :: Type -> Type #

type Rep ACLResponse Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep ACLResponse = D1 ('MetaData "ACLResponse" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) (C1 ('MetaCons "ACLResponse" 'PrefixI 'True) (S1 ('MetaSel ('Just "owner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Owner) :*: S1 ('MetaSel ('Just "accessControlList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Grant])))

data LifecycleRule Source #

Lifecycle configuration for a Bucket

Constructors

LifecycleRule 

Fields

Instances

Instances details
Eq LifecycleRule Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show LifecycleRule Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic LifecycleRule Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep LifecycleRule :: Type -> Type #

type Rep LifecycleRule Source # 
Instance details

Defined in Network.DO.Spaces.Types

data LifecycleExpiration Source #

Configuration for automatically deleting expire Objects

Constructors

AfterDays Days 
OnDate UTCTime 

newtype LifecycleID Source #

A unique ID for a LifecycleRule

Constructors

LifecycleID Text 

Instances

Instances details
Eq LifecycleID Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show LifecycleID Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic LifecycleID Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep LifecycleID :: Type -> Type #

type Rep LifecycleID Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep LifecycleID = D1 ('MetaData "LifecycleID" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'True) (C1 ('MetaCons "LifecycleID" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

mkLifecycleID :: MonadThrow m => Text -> m LifecycleID Source #

Smart constructor for LifecycleID, which may contain a maximum of 255 characters, including spaces

Signature calculation

newtype Canonicalized a Source #

Represents some resource that has been canonicalized according to the Spaces/AWS v4 spec

Instances

Instances details
Eq (Canonicalized a) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show (Canonicalized a) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic (Canonicalized a) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep (Canonicalized a) :: Type -> Type #

type Rep (Canonicalized a) Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep (Canonicalized a) = D1 ('MetaData "Canonicalized" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'True) (C1 ('MetaCons "Canonicalized" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

data Computed (a :: ComputedTag) where Source #

A strict ByteString that has been computed according to some part of the AWS v4 spec. The AWS v4 signature is calculated from a series of interdependent computations. It would be possible to represent these all as ByteStrings; this approach, however, would make it easy to confuse two sequences that are not semantically equivalent, leading to the generation of malformed singatures. The promiscuous use of ByteStrings also makes for unclear type signatures. Using a GADT with type synonyms is simpler than creating a newtype for each type of computation

Constructors

Hashed :: ByteString -> Computed Hash 
StringToSign :: ByteString -> Computed StrToSign

Represents a "string to sign" that has been computed according to the Spaces/AWS v4 spec

Signature :: ByteString -> Computed Sig

Signed hash of a Request body, a SecretKey, and request information

Credentials :: ByteString -> Computed Cred 
Authorization :: ByteString -> Computed Auth

Authorization string containing information about your AccessKey and your request

Instances

Instances details
Eq (Computed a) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

(==) :: Computed a -> Computed a -> Bool #

(/=) :: Computed a -> Computed a -> Bool #

Show (Computed a) Source # 
Instance details

Defined in Network.DO.Spaces.Types

Methods

showsPrec :: Int -> Computed a -> ShowS #

show :: Computed a -> String #

showList :: [Computed a] -> ShowS #

type StringToSign = Computed 'StrToSign Source #

type Hashed = Computed 'Hash Source #

uncompute :: Computed a -> ByteString Source #

Extract the ByteString from something Computed

Exceptions

data ClientException Source #

An exception generated within the Spaces client

Instances

Instances details
Eq ClientException Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show ClientException Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic ClientException Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep ClientException :: Type -> Type #

Exception ClientException Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep ClientException Source # 
Instance details

Defined in Network.DO.Spaces.Types

data APIException Source #

An s3-compatible API error response, sent as XML

Constructors

APIException 

Fields

Instances

Instances details
Eq APIException Source # 
Instance details

Defined in Network.DO.Spaces.Types

Show APIException Source # 
Instance details

Defined in Network.DO.Spaces.Types

Generic APIException Source # 
Instance details

Defined in Network.DO.Spaces.Types

Associated Types

type Rep APIException :: Type -> Type #

Exception APIException Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep APIException Source # 
Instance details

Defined in Network.DO.Spaces.Types

type Rep APIException = D1 ('MetaData "APIException" "Network.DO.Spaces.Types" "do-spaces-0.2-6plBREpGHjL7zr5f6tFOCc" 'False) (C1 ('MetaCons "APIException" 'PrefixI 'True) ((S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Status) :*: S1 ('MetaSel ('Just "code") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "requestID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RequestID) :*: S1 ('MetaSel ('Just "hostID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))