Constructor
new StorageService(opts)
Creates a new StorageService.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
Object containing properties to set. Properties
|
- Source:
Members
allowsDownload :boolean
This describes whether the storage service allows users to read data/files from it.
- Default Value:
-
- true
- Source:
allowsUpload :boolean
This describes whether the storage service allows users to write data/files into it.
- Default Value:
-
- true
- Source:
bucket :string
Bucket is the name of the s3 bucket to connect to, or the directory to cd into on the remote server.
- Source:
description :string
A description of this storage service. It should be meaningful to the user.
- Source:
host :string
The hostname or IP address of the remote server.
- Source:
login :string
login is the name to use when logging in to the remote server. For s3 connections, it's the Access Key Id. You can use an environment variable in this field by specifying "env:VAR_NAME". DART will look up the environment variable at runtime, and its value will not be stored with DART's data.
- Source:
loginExtra :string
loginExtra is any additional information required by plugins to connect to remote services. What the plugin does with this bit of info is its own business. For example, a plugin that requires the path to a local private key file can ask the user to enter the path to that file here. You can use an environment variable in this field by specifying a value like "env:VAR_NAME". DART will look up the environment variable at runtime, and its value will not be stored with DART's data.
- Source:
name :string
name is the name of this storage service. It should be meaningful to the user.
- Source:
password :string
password is the password required to connect to the remote server. For S3, it's the secret key (aka AWS Secret Access Key). You can use an environment variable in this field by specifying "env:VAR_NAME". DART will look up the environment variable at runtime, and its value will not be stored with DART's data.
- Source:
port :number
The port number to connect to on the remote server. This should be a whole number. You can leave this blank if you're connecting to the service's default port.
- Source:
protocol :string
The protocol to use when connecting to the remote service. For example, 's3', 'sftp', etc. There should be a valid plugin capable of communicating via that protocol.
- Source:
Methods
(static) inflateFrom(data) → {StorageService}
This converts a generic object into an StorageService object. this is useful when loading objects from JSON.
Parameters:
Name | Type | Description |
---|---|---|
data |
object |
An object you want to convert to a StorageService. |
- Source:
hasPlaintextLogin() → {boolean}
Returns true if this storage service setting contains a plaintext login. When exporting workflows, storage service should use "env:VAR_NAME" to read passwords from the environment.
- Source:
hasPlaintextPassword() → {boolean}
Returns true if this storage service setting contains a plaintext password. When exporting workflows, storage service should use "env:VAR_NAME" to read passwords from the environment.
- Source:
url() → {string}
Returns the url to which files will be uploaded.
- Source:
validate() → {boolean}
validate returns true or false, indicating whether this object contains complete and valid data. If it returns false, check the errors property for specific errors.
- Source: