Fork me on GitHub

Class Configuration


Defined in: config.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Configuration(options)

Configuration class.

Field Summary
Field Attributes Field Name and Description
 

Connection object.

 

Provider string.

<static>  
Configuration.PROVIDERS

Provider dictionary with delayed object creation.

Method Summary
Method Attributes Method Name and Description
<static>  
Configuration.fromEnv()

Get configuration from environment.

<static>  
Configuration.fromObj(options)

Get configuration from options (settings) object.

 

Test provider (AWS).

 

Test provider (Google Storage).

Class Detail
Configuration(options)

Configuration class.

Parameters:
{Object} options
Options object.
{string} options.provider
Cloud provider enum.
{string} options.account
Account name.
{string} options.secretKey
Secret key.
{string} options.ssl Optional, Default: false
Use SSL?
{string} options.authUrl Optional
Authentication URL.
{number} options.timeout Optional
HTTP timeout in seconds.
Field Detail
{base.Connection} connection

Connection object.


{string} provider

Provider string.


<static> Configuration.PROVIDERS

Provider dictionary with delayed object creation.

Method Detail
<static> {Configuration} Configuration.fromEnv()

Get configuration from environment.

Environment Variables

Sunny can use the following environment variables:

  • SUNNY_PROVIDER: "aws" or "google"
  • SUNNY_ACCOUNT: "ACCOUNT_NAME"
  • SUNNYSECRETKEY: "ACCOUNT_SECRET_KEY"
  • SUNNYAUTHURL: "s3.amazonaws.com"
  • SUNNY_SSL: true or false
Returns:
{Configuration} Configuration object.

<static> {Configuration} Configuration.fromObj(options)

Get configuration from options (settings) object.

Parameters:
{Object} options
Options object.
{string} options.provider
Cloud provider enum.
{string} options.account
Account name.
{string} options.secretKey
Secret key.
{string} options.ssl Optional, Default: false
Use SSL?
{string} options.authUrl Optional
Authentication URL.
{number} options.timeout Optional
HTTP timeout in seconds.
Returns:
{Configuration} Configuration object.

isAws()

Test provider (AWS).


isGoogle()

Test provider (Google Storage).