Documentation ¶
Index ¶
- func CreateManifestDB(fname string)
- func DXAPI(token, api string, payload string) (status string, body []byte)
- func DownloadDBPart(manifestFileName string, p DBPart, wg *sync.WaitGroup, ...)
- func DownloadManifestDB(fname, token string, opts Opts)
- func DownloadProgress(fname string) string
- func GetToken() (string, string)
- func PrepareFilesForDownload(m Manifest, token string) map[string]DXDownloadURL
- func UpdateDBPart(manifestFileName string, p DBPart)
- type DBPart
- type DXAuthorization
- type DXConfig
- type DXDownloadURL
- type DXFile
- type DXPart
- type JobInfo
- type Manifest
- type Opts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadDBPart ¶
func DownloadDBPart(manifestFileName string, p DBPart, wg *sync.WaitGroup, urls map[string]DXDownloadURL)
DownloadDBPart ...
func DownloadManifestDB ¶
DownloadManifestDB ...
func GetToken ¶
GetToken - Get DNAnexus authentication token
Returns a pair of strings representing the authentication token and where it was received from If the environment variable DX_API_TOKEN is set, the token is obtained from it Otherwise, the token is obtained from the '~/.dnanexus_config/environment.json' file If no token can be obtained from these methods, a pair of empty strings is returned If the token was received from the 'DX_API_TOKEN' environment variable, the second variable in the pair will be the string 'environment'. If it is obtained from a DNAnexus configuration file, the second variable in the pair will be '.dnanexus_config/environment.json'.
func PrepareFilesForDownload ¶
func PrepareFilesForDownload(m Manifest, token string) map[string]DXDownloadURL
PrepareFilesForDownload ... TODO: Optimize this for only files that need to be downloaded
Types ¶
type DBPart ¶
type DBPart struct { FileID string Project string FileName string Folder string PartID int MD5 string Size int BlockSize int BytesFetched int }
DBPart ...
type DXAuthorization ¶
type DXAuthorization struct { AuthToken string `json:"auth_token"` AuthTokenType string `json:"auth_token_type"` }
DXAuthorization - Basic variables regarding DNAnexus authorization
type DXConfig ¶
type DXConfig struct { DXSECURITYCONTEXT string `json:"DX_SECURITY_CONTEXT"` DXAPISERVERHOST string `json:"DX_APISERVER_HOST"` DXPROJECTCONTEXTNAME string `json:"DX_PROJECT_CONTEXT_NAME"` DXPROJECTCONTEXTID string `json:"DX_PROJECT_CONTEXT_ID"` DXAPISERVERPORT string `json:"DX_APISERVER_PORT"` DXUSERNAME string `json:"DX_USERNAME"` DXAPISERVERPROTOCOL string `json:"DX_APISERVER_PROTOCOL"` DXCLIWD string `json:"DX_CLI_WD"` }
DXConfig - Basic variables regarding DNAnexus environment config
type DXDownloadURL ¶
DXDownloadURL ...
type DXFile ¶
type DXFile struct { Folder string `json:"folder"` ID string `json:"id"` Name string `json:"name"` Parts map[string]DXPart `json:"parts"` }
DXFile ...
Click to show internal directories.
Click to hide internal directories.