Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CheckDataset = func(dataset string) (bool, error) { var ( r bool = false err error = nil count int = 0 ) for count < dbRetryTimes { r, err = DB.checkDataset(dataset) if err != nil { count++ continue } break } return r, err }
CheckDataset checks if dataset name exists
View Source
var CheckFilePermission = func(fileID string) (string, error) { var ( r string = "" err error = nil count int = 0 ) for count < dbRetryTimes { r, err = DB.checkFilePermission(fileID) if err != nil { count++ continue } break } return r, err }
CheckFilePermission checks if user has permissions to access the dataset the file is a part of
View Source
var GetDatasetFileInfo = func(datasetID, filePath string) (*FileInfo, error) { var ( d *FileInfo err error count int ) for count < dbRetryTimes { d, err = DB.getDatasetFileInfo(datasetID, filePath) if err != nil { count++ continue } break } return d, err }
GetDatasetFileInfo returns information on a file given a dataset ID and an upload file path
View Source
var GetDatasetInfo = func(datasetID string) (*DatasetInfo, error) { var ( d *DatasetInfo = nil err error = nil count int = 0 ) for count < dbRetryTimes { d, err = DB.getDatasetInfo(datasetID) if err != nil { count++ continue } break } return d, err }
GetDatasetInfo returns further information on a given `datasetID` as `*DatasetInfo`.
View Source
var GetFile = func(fileID string) (*FileDownload, error) { var ( r *FileDownload = nil err error = nil count int = 0 ) for count < dbRetryTimes { r, err = DB.getFile(fileID) if err != nil { count++ continue } break } return r, err }
GetFile retrieves the file header
View Source
var GetFiles = func(datasetID string) ([]*FileInfo, error) { var ( r []*FileInfo = nil err error = nil count int = 0 ) for count < dbRetryTimes { r, err = DB.getFiles(datasetID) if err != nil { count++ continue } break } return r, err }
GetFiles retrieves the file details
Functions ¶
This section is empty.
Types ¶
type DatasetInfo ¶ added in v1.9.6
type FileDownload ¶
type FileDownload struct { ArchivePath string ArchiveSize int DecryptedSize int DecryptedChecksum string LastModified string Header []byte }
FileDownload details are used for downloading a file
type FileInfo ¶
type FileInfo struct { FileID string `json:"fileId"` DatasetID string `json:"datasetId"` DisplayFileName string `json:"displayFileName"` FilePath string `json:"filePath"` FileName string `json:"fileName"` FileSize int64 `json:"fileSize"` DecryptedFileSize int64 `json:"decryptedFileSize"` DecryptedFileChecksum string `json:"decryptedFileChecksum"` DecryptedFileChecksumType string `json:"decryptedFileChecksumType"` Status string `json:"fileStatus"` CreatedAt string `json:"createdAt"` LastModified string `json:"lastModified"` }
FileInfo is returned by the metadata endpoint
Click to show internal directories.
Click to hide internal directories.