Fork me on GitHub

Class base.Connection


Defined in: connection.js.

Class Summary
Constructor Attributes Constructor Name and Description
 

Abstract base connection class.

Field Summary
Field Attributes Field Name and Description
 

Authentication object.

 

Cloud header prefix (e.g.

 

Cloud header metadata prefix (e.g.

Method Summary
Method Attributes Method Name and Description
 
delContainer(name, options)

Create container object and DELETE.

 
getContainer(name, options)

Create container object and GET.

 
getContainers(options)

Get a list of Containers.

 
putContainer(name, options)

Create container object and PUT.

Event Summary
Event Attributes Event Name and Description
 

Completion event ('end').

 

Error event ('error').

Class Detail
base.Connection(auth)

Abstract base connection class.

Parameters:
{base.Authentication} auth
Authentication object.
Field Detail
{base.Authentication} authentication

Authentication object.


{string} headerPrefix

Cloud header prefix (e.g., 'x-amz-').


{string} metadataPrefix

Cloud header metadata prefix (e.g., 'x-amz-meta-').

Method Detail
delContainer(name, options)

Create container object and DELETE.

Parameters:
name
options
See:
base.blob.Container#del

getContainer(name, options)

Create container object and GET.

Parameters:
name
options
See:
base.blob.Container#get

{AuthenticatedRequest} getContainers(options)

Get a list of Containers.

Events

Note

Both AWS and GSFD only offer listing all containers, without paging or prefix options.

Parameters:
{Object} options Optional
Options object.
{Object} options.headers Optional
Raw headers to add.
{Object} options.cloudHeaders Optional
Cloud provider headers to add.
{Object} options.metadata Optional
Cloud metadata to add.
Returns:
{AuthenticatedRequest} Request object.

putContainer(name, options)

Create container object and PUT.

Parameters:
name
options
See:
base.blob.Container#put
Event Detail
getContainers_end(results)

Completion event ('end').

Parameters:
{Object} results
Results object.
{Array} results.containers
List of container objects.

getContainers_error(err)

Error event ('error').

Parameters:
{Error|errors.CloudError} err
Error object.