Documentation ¶
Index ¶
- Constants
- type Client
- type DataTransferRequest
- type DataTransferRequestHPCExtension
- type DatasetCreateRequest
- type DatasetCreateResponse
- type DatasetInfo
- type DatasetInfoRequest
- type DatasetListing
- type DatasetListingRequest
- type DatasetLocation
- type DatasetSearchResult
- type DeleteDataRequest
- type HPCDataTransferRequest
- type LocationCloudStagingArea
- type Metadata
- type RefreshTokenFunc
- type ReplicationStatusRequest
- type ReplicationStatusResponse
- type RequestStatus
- type SubmittedRequestInfo
Constants ¶
const ( // TaskStatusPendingMsg is the message returned when a task is pending TaskStatusPendingMsg = "Task still in the queue, or task does not exist" // TaskStatusInProgressMsg is the message returned when a task is in progress TaskStatusInProgressMsg = "In progress" // TaskStatusTransferCompletedMsg is the message returned when a transfer is completed TaskStatusTransferCompletedMsg = "Transfer completed" // TaskStatusReplicationCompletedMsg is the message returned when a replication is completed TaskStatusReplicationCompletedMsg = "Replication completed" // TaskStatusDataDeletedMsg is the message returned when data is deleted TaskStatusDataDeletedMsg = "Data deleted" // TaskStatusCloudAccessEnabledMsg is the message returned when the access to cloud staging area is enabled TaskStatusCloudAccessEnabledMsg = "cloud nfs export added" // TaskStatusDisabledMsg is the message returned when the access to cloud staging area is enabled TaskStatusDisabledMsg = "cloud nfs export deleted" // TaskStatusFailureMsgPrefix is the the prefix used in task failure messages TaskStatusFailureMsgPrefix = "Task Failed, reason: " // TaskStatusMsgSuffixAlreadyEnabled is the the prefix used in task failing because the cloud access is already enabled TaskStatusMsgSuffixAlreadyEnabled = "IP export is already active" // TaskStatusMsgSuffixAlreadyDisabled is the the prefix used in task failing because the cloud access is already disabled TaskStatusMsgSuffixAlreadyDisabled = "IP not found" // TaskStatusDoneMsg is the message returned when a task is done TaskStatusDoneMsg = "Done" ReplicationStatusParentDataset = "Parent dataset. Dataset is replicated" ReplicationStatusReplicaDataset = "Replica dataset. Dataset is replicated" ReplicationStatusDatasetNotReplicated = "Dataset is not replicated" ReplicationStatusNoSuchDataset = "Dataset doesn't exist or you don't have permission to access it" // LocationDDIAreaPropertyName is the property defining the DDI area name of a DDI location LocationDDIAreaPropertyName = "ddi_area" // LocationCloudStagingAreaNamePropertyName is the property defining the cloud staging area name of a DDI location LocationCloudStagingAreaNamePropertyName = "cloud_staging_area_name" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { CreateEmptyDatasetInProject(token, project string, metadata Metadata) (string, error) IsAlive() bool ListDataSet(token, datasetID, access, project string, recursive bool) (DatasetListing, error) GetDisableCloudAccessRequestStatus(token, requestID string) (string, error) GetEnableCloudAccessRequestStatus(token, requestID string) (string, error) SubmitCloudStagingAreaDataDeletion(token, path string) (string, error) SubmitCloudToDDIDataTransfer(metadata Metadata, token, cloudStagingAreaSourcePath, ddiDestinationPath, encryption, compression string) (string, error) SubmitDDIDatasetInfoRequest(token, targetSystem, ddiPath string) (string, error) SubmitDDIDataDeletion(token, path string) (string, error) SubmitDDIToCloudDataTransfer(metadata Metadata, token, ddiSourcePath, cloudStagingAreaDestinationPath, encryption, compression string) (string, error) SubmitDDIToHPCDataTransfer(metadata Metadata, token, ddiSourcePath, targetSystem, hpcDirectoryPath, encryption, compression, heappeURL string, jobID, taskID int64) (string, error) SubmitHPCToDDIDataTransfer(metadata Metadata, token, sourceSystem, hpcDirectoryPath, ddiPath, encryption, compression, heappeURL string, jobID, taskID int64) (string, error) SubmitDDIReplicationRequest(token, sourceSystem, sourcePath, targetSystem string) (string, error) GetCloudStagingAreaProperties() LocationCloudStagingArea GetDDIDatasetInfoRequestStatus(token, requestID string) (string, string, string, string, error) GetDataTransferRequestStatus(token, requestID string) (string, string, error) GetDeletionRequestStatus(token, requestID string) (string, error) GetCloudStagingAreaName() string GetDatasetURL() string GetDDIAreaName() string GetReplicationsRequestStatus(token, requestID string) (string, string, string, error) GetReplicationStatus(token, targetSystem, targetPath string) (string, error) GetSshfsURL() string GetStagingURL() string SearchDataset(token string, metadata Metadata) ([]DatasetSearchResult, error) SubmitEnableCloudAccess(token, ipAddress string) (string, error) SubmitDisableCloudAccess(token, ipAddress string) (string, error) }
Client is the client interface to Distrbuted Data Infrastructure (DDI) service
func GetClient ¶
func GetClient(locationProps config.DynamicMap, refreshTokenFunc RefreshTokenFunc) (Client, error)
GetClient returns a DDI client for a given location
type DataTransferRequest ¶
type DataTransferRequest struct { Metadata Metadata `json:"metadata,omitempty"` SourceSystem string `json:"source_system"` SourcePath string `json:"source_path"` TargetSystem string `json:"target_system"` TargetPath string `json:"target_path,omitempty"` Encryption string `json:"encryption"` Compression string `json:"compression"` }
DataTransferRequest holds parameters of a data transfer request
type DataTransferRequestHPCExtension ¶
type DataTransferRequestHPCExtension struct { HEAppEURL string `json:"heappe_url"` JobID int64 `json:"job_id"` TaskID int64 `json:"task_id,omitempty"` }
DataTransferRequestHPCExtension holds additional parameters for data transfers on HPC
type DatasetCreateRequest ¶
type DatasetCreateRequest struct { PushMethod string `json:"push_method"` Access string `json:"access"` Project string `json:"project,omitempty"` Metadata Metadata `json:"metadata,omitempty"` }
DatasetCreateRequest holds properties of a request to create a dataset
type DatasetCreateResponse ¶
type DatasetCreateResponse struct { Status string `json:"status"` InternalID string `json:"internalID"` }
DatasetCreateResponse holds a dataset creation response
type DatasetInfo ¶
type DatasetInfo struct { Result string `json:"result"` Size string `json:"size,omitempty"` NumberOfFiles string `json:"totalfiles,omitempty"` NumberOfSmallFiles string `json:"smallfiles,omitempty"` }
DatasetInfoResponse holds parameters of a dataset info request response
type DatasetInfoRequest ¶
type DatasetInfoRequest struct { TargetSystem string `json:"target_system"` TargetPath string `json:"target_path"` }
DatasetInfoRequest holds parameters of a dataset info request
type DatasetListing ¶
type DatasetListing struct { Name string `json:"name"` Type string `json:"type"` Contents []*DatasetListing `json:"contents,omitempty"` }
DatasetListing holds the listing of a dataset content
type DatasetListingRequest ¶
type DatasetListingRequest struct { InternalID string `json:"internalID"` Access string `json:"access"` Project string `json:"project"` Recursive bool `json:"recursive"` }
DatasetListingRequest holds properties of a request to list the content of a dataset
type DatasetLocation ¶
type DatasetLocation struct { InternalID string `json:"internalID"` Access string `json:"access"` Project string `json:"project"` }
DatasetLocation holds location properties of a dataset
type DatasetSearchResult ¶
type DatasetSearchResult struct { Location DatasetLocation `json:"location"` Metadata Metadata `json:"metadata"` }
DatasetSearchResult holds properties of an element of a dataset search result
type DeleteDataRequest ¶
type DeleteDataRequest struct { TargetSystem string `json:"target_system"` TargetPath string `json:"target_path"` }
DeleteDataRequest holds parameters of data to delete
type HPCDataTransferRequest ¶
type HPCDataTransferRequest struct { DataTransferRequest DataTransferRequestHPCExtension }
HPCDataTransferRequest holds parameters of a data transfer request
type LocationCloudStagingArea ¶
type LocationCloudStagingArea struct { Name string `yaml:"name" json:"name"` RemoteFileSystem string `yaml:"remote_file_system" json:"remote_file_system"` MountType string `yaml:"mount_type" json:"mount_type"` MountOptions string `yaml:"mount_options" json:"mount_options"` UserID string `yaml:"user_id" json:"user_id"` GroupID string `yaml:"group_id" json:"group_id"` }
LocationCloudStagingArea holds properties of a HPC staging area
type Metadata ¶
type Metadata struct { Creator []string `json:"creator,omitempty"` Contributor []string `json:"contributor,omitempty"` Publisher []string `json:"publisher,omitempty"` Owner []string `json:"owner,omitempty"` Identifier string `json:"identifier,omitempty"` PublicationYear string `json:"publicationYear,omitempty"` ResourceType string `json:"resourceType,omitempty"` Title string `json:"title,omitempty"` RelatedIdentifier []string `json:"relatedIdentifier,omitempty"` }
Metadata holds metadata to define for a dataset
type RefreshTokenFunc ¶
RefreshTokenFunc is a type of function provided by the caller to refresh a token when needed
type ReplicationStatusRequest ¶
type ReplicationStatusRequest struct { TargetSystem string `json:"target_system"` TargetPath string `json:"target_path"` }
ReplicationStatusRequest holds parameters of a replication status request
type ReplicationStatusResponse ¶
type ReplicationStatusResponse struct {
Status string `json:"status,omitempty"`
}
ReplicationStatusResponse holds the status of a replication status request
type RequestStatus ¶
type RequestStatus struct { Status string `json:"status"` TargetPath string `json:"target_path,omitempty"` PID string `json:"PID,omitempty"` }
RequestStatus holds the status of a submitted request
type SubmittedRequestInfo ¶
type SubmittedRequestInfo struct {
RequestID string `json:"request_id"`
}
SubmittedRequestInfo holds the result of a request submission