RemoteRepository

RemoteRepository

RemoteRepository contains settings required to access the REST services of a remote repository, such as the URL and connection credentials. To access the remote repository, you'll also need a repository plugin that can send requests and parse responses from the remote repo.

Constructor

new RemoteRepository(opts)

Creates a new RemoteRepository

Parameters:
Name Type Description
opts object

Object containing properties to set.

Properties
Name Type Description
name string

The name of the setting. This should be unique, to prevent conflicts.

url string

The url of the remote repository.

userId string

The user id required to log in to the remote repository.

id string

A UUID in hex-string format. This is the object's unique identifier.

userCanDelete boolean

Indicates whether user is allowed to delete this record.

apiToken string

The API token to authenticate with the remote repository.

loginExtra object

Extra information required to authenticate with the remote repo.

pluginId string

The UUID that identifies the plugin that lets us connect to the remote repo.

Source:

Members

apiToken :string

The API token required to connect to the remote repository's REST service.

Source:

loginExtra :string

Optional additional information required to connect to the remote REST service. Most services won't use this.

Source:

name :string

Name is the name of the remote repo. This should be descriptive, like "APTrust Demo Repository", "APTrust Production Repository," etc.

Source:

pluginId :string

The UUID of the DART plugin that provides access to the REST service. You cannot connect to any remote REST service without a plugin.

Source:

url :string

The URL that runs the remote repository's REST service.

Source:

userId :string

The User ID used to connect to the repository's REST services. This is optional, and will often be blank, as most REST services require only an API token to connect.

Source:

Methods

(static) inflateFrom(data) → {RemoteRepository}

This converts a generic object into an RemoteRepository object. this is useful when loading objects from JSON.

Parameters:
Name Type Description
data object

An object you want to convert to a RemoteRepository.

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: