Safe Haskell | None |
---|---|
Language | Haskell98 |
Functions for the Google Storage API, see https://developers.google.com/storage/docs/reference-methods.
- type BucketName = String
- type KeyName = String
- data StorageAcl
- type MIMEType = String
- getService :: ProjectId -> AccessToken -> IO Element
- getServiceUsingManager :: Manager -> ProjectId -> AccessToken -> IO Element
- putBucket :: ProjectId -> StorageAcl -> BucketName -> AccessToken -> IO [(String, String)]
- putBucketUsingManager :: Manager -> ProjectId -> StorageAcl -> BucketName -> AccessToken -> IO [(String, String)]
- getBucket :: ProjectId -> BucketName -> AccessToken -> IO Element
- getBucketUsingManager :: Manager -> ProjectId -> BucketName -> AccessToken -> IO Element
- deleteBucket :: ProjectId -> BucketName -> AccessToken -> IO [(String, String)]
- deleteBucketUsingManager :: Manager -> ProjectId -> BucketName -> AccessToken -> IO [(String, String)]
- getObject :: ProjectId -> BucketName -> KeyName -> AccessToken -> IO ByteString
- getObjectUsingManager :: Manager -> ProjectId -> BucketName -> KeyName -> AccessToken -> IO ByteString
- putObject :: ProjectId -> StorageAcl -> BucketName -> KeyName -> Maybe MIMEType -> ByteString -> Maybe MD5Info -> AccessToken -> IO [(String, String)]
- putObjectUsingManager :: Manager -> ProjectId -> StorageAcl -> BucketName -> KeyName -> Maybe MIMEType -> ByteString -> Maybe MD5Info -> AccessToken -> IO [(String, String)]
- headObject :: ProjectId -> BucketName -> KeyName -> AccessToken -> IO [(String, String)]
- headObjectUsingManager :: Manager -> ProjectId -> BucketName -> KeyName -> AccessToken -> IO [(String, String)]
- deleteObject :: ProjectId -> BucketName -> KeyName -> AccessToken -> IO [(String, String)]
- deleteObjectUsingManager :: Manager -> ProjectId -> BucketName -> KeyName -> AccessToken -> IO [(String, String)]
Types
type BucketName = String Source
A bucket name.
data StorageAcl Source
Access control.
Service Requests
:: ProjectId | The project ID. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO Element | The action returning the XML with the metadata for the buckets. |
List all of the buckets in a specified project. This performs the "GET Service" request, see https://developers.google.com/storage/docs/reference-methods#getservice.
:: Manager | The conduit HTTP manager to use. |
-> ProjectId | The project ID. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO Element | The action returning the XML with the metadata for the buckets. |
List all of the buckets in a specified project. This performs the "GET Service" request, see https://developers.google.com/storage/docs/reference-methods#getservice.
Bucket Requests
:: ProjectId | The project ID. |
-> StorageAcl | The pre-defined access control. |
-> BucketName | The bucket. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO [(String, String)] | The action to put the object and return the response header. |
Creates a bucket in a specified project. This performs the "PUT Bucket" request, see https://developers.google.com/storage/docs/reference-methods#putbucket.
:: Manager | The conduit HTTP manager to use. |
-> ProjectId | The project ID. |
-> StorageAcl | The pre-defined access control. |
-> BucketName | The bucket. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO [(String, String)] | The action to put the object and return the response header. |
Creates a bucket in a specified project. This performs the "PUT Bucket" request, see https://developers.google.com/storage/docs/reference-methods#putbucket.
:: ProjectId | The project ID. |
-> BucketName | The bucket. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO Element | The action returning the XML with the metadata for the objects. |
Lists the objects that are in a bucket. This performs the "GET Bucket" request, see https://developers.google.com/storage/docs/reference-methods#getbucket.
:: Manager | The conduit HTTP manager to use. |
-> ProjectId | The project ID. |
-> BucketName | The bucket. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO Element | The action returning the XML with the metadata for the objects. |
Lists the objects that are in a bucket. This performs the "GET Bucket" request, see https://developers.google.com/storage/docs/reference-methods#getbucket.
:: ProjectId | The project ID. |
-> BucketName | The bucket. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO [(String, String)] | The action to delete the bucket and return the response header. |
Deletes an empty bucket. This performs the "DELETE Bucket" request, see https://developers.google.com/storage/docs/reference-methods#deletebucket.
deleteBucketUsingManager Source
:: Manager | The conduit HTTP manager to use. |
-> ProjectId | The project ID. |
-> BucketName | The bucket. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO [(String, String)] | The action to delete the bucket and return the response header. |
Deletes an empty bucket. This performs the "DELETE Bucket" request, see https://developers.google.com/storage/docs/reference-methods#deletebucket.
Object Requests
:: ProjectId | The project ID. |
-> BucketName | The bucket. |
-> KeyName | The object's key. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO ByteString | The action returning the object. |
Downloads an object. This performs the "GET Object" request, see https://developers.google.com/storage/docs/reference-methods#getobject.
:: Manager | The conduit HTTP manager to use. |
-> ProjectId | The project ID. |
-> BucketName | The bucket. |
-> KeyName | The object's key. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO ByteString | The action returning the object. |
Downloads an object. This performs the "GET Object" request, see https://developers.google.com/storage/docs/reference-methods#getobject.
:: ProjectId | The project ID. |
-> StorageAcl | The pre-defined access control. |
-> BucketName | The bucket. |
-> KeyName | The object's key. |
-> Maybe MIMEType | The object's MIME type. |
-> ByteString | The object's data. |
-> Maybe MD5Info | The MD5 checksum. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO [(String, String)] | The action to put the object and return the response header. |
Uploads an object. This performs the "PUT Object" request, see https://developers.google.com/storage/docs/reference-methods#putobject.
:: Manager | The conduit HTTP manager to use. |
-> ProjectId | The project ID. |
-> StorageAcl | The pre-defined access control. |
-> BucketName | The bucket. |
-> KeyName | The object's key. |
-> Maybe MIMEType | The object's MIME type. |
-> ByteString | The object's data. |
-> Maybe MD5Info | The MD5 checksum. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO [(String, String)] | The action to put the object and return the response header. |
Uploads an object. This performs the "PUT Object" request, see https://developers.google.com/storage/docs/reference-methods#putobject.
:: ProjectId | The project ID. |
-> BucketName | The bucket. |
-> KeyName | The object's key. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO [(String, String)] | The action returning the object's metadata. |
Lists metadata for an object. This performs the "HEAD Object" request, see https://developers.google.com/storage/docs/reference-methods#headobject.
:: Manager | The conduit HTTP manager to use. |
-> ProjectId | The project ID. |
-> BucketName | The bucket. |
-> KeyName | The object's key. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO [(String, String)] | The action returning the object's metadata. |
Lists metadata for an object. This performs the "HEAD Object" request, see https://developers.google.com/storage/docs/reference-methods#headobject.
:: ProjectId | The project ID. |
-> BucketName | The bucket. |
-> KeyName | The object's key. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO [(String, String)] | The action to delete the object and return the response header. |
Deletes an object. This performs the "DELETE Object" request, see https://developers.google.com/storage/docs/reference-methods#deleteobject.
deleteObjectUsingManager Source
:: Manager | The conduit HTTP manager to use. |
-> ProjectId | The project ID. |
-> BucketName | The bucket. |
-> KeyName | The object's key. |
-> AccessToken | The OAuth 2.0 access token. |
-> IO [(String, String)] | The action to delete the object and return the response header. |
Deletes an object. This performs the "DELETE Object" request, see https://developers.google.com/storage/docs/reference-methods#deleteobject.