Belt v0.5.1 Belt.Provider.SFTP View Source
Link to this section Summary
Types
Public key or public key fingerprint
Options for creating an SFTP provider
Private key or private key PEM string
Functions
Creates a new SFTP provider configuration with default credentials
Implementation of the Provider.delete/3 callback
Implementation of the Provider.delete_all/2 callback
Implementation of the Provider.delete_scope/3 callback
Implementation of the Provider.get_info/3 callback
Implementation of the Belt.Provider.get_url/3
callback
Implementation of the Belt.Provider.list_files/2
callback
Creates a new SFTP provider configuration
Implementation of the Provider.store/3 callback
Implementation of the Provider.store_data/3 callback
Implementation of the Provider.test_connection/2 callback
Link to this section Types
Public key or public key fingerprint.
Options for creating an SFTP provider.
Private key or private key PEM string.
Link to this section Functions
default([sftp_option()]) :: {:ok, Belt.Provider.configuration()} | {:error, term()}
Creates a new SFTP provider configuration with default credentials.
Any provided options
override the default settings which are retrieved from
the application configuration.
Example
# config.exs
config :belt, Belt.Provider.SFTP,
default: [
host: "example.org",
user: "foo",
password: "bar"]
Implementation of the Provider.delete/3 callback.
Implementation of the Provider.delete_all/2 callback.
Implementation of the Provider.delete_scope/3 callback.
Implementation of the Provider.get_info/3 callback.
Implementation of the Belt.Provider.get_url/3
callback.
Implementation of the Belt.Provider.list_files/2
callback.
new([sftp_option()]) :: {:ok, Belt.Provider.configuration()}
Creates a new SFTP provider configuration.
Options
base_url
-String.t
: Used for generating file URLs.directory
-String.t
: Directory on the SFTP server. Defaults to “.” which refers to the working directory set by the server.host
-String.t
: Hostname of the SFTP server.host_key
-Belt.Provider.SFTP.host_key
: Fingerprint of the SFTP server. Can be traditional colon-separated MD5 fingerprint string or an OpenSSL-formatted string such as"SHA256:aZGX[…]JePQ"
.password
-String.t
: Password for authentication. Needs to be combined withuser
option.port
-integer
: Port of the SFTP server. Defaults to 22.verify_host_key
-boolean
: Whether the host key should be verified. Defaults totrue
.user
-String.t
: Username for authentication. Needs to be combined withpassword
option.user_key
-Belt.Provider.SFTP.user_key
: Private key for authentication. Can be a:public_key.private_key
record or a PEM certificate string.
Implementation of the Provider.store/3 callback.
Implementation of the Provider.store_data/3 callback.
Implementation of the Provider.test_connection/2 callback.