Documentation
¶
Index ¶
- Variables
- func ChessGlobusLink(collection, path string) (string, error)
- func Download(token string, endpointID string, remotePath string) ([]byte, error)
- func GlobusLink(cid, path string) (string, error)
- func Ls(token, endpointID, path string)
- func Mkdir(token, endpointID, path string) error
- func SharedLink(token, endpointID, path string) (string, error)
- func Token(scopes []string) (string, error)
- func Upload(token, endpointID, localFile, remotePath string) error
- type GlobusEndpointResponse
- type GlobusFileListResponse
- type GlobusSearchResponse
- type GlobusTokenResponse
Constants ¶
This section is empty.
Variables ¶
var Verbose int
Verbose shows verbose output for this module
Functions ¶
func ChessGlobusLink ¶ added in v0.4.0
ChessGlobusLink provides globus link to given globus collection name and path
func GlobusLink ¶ added in v0.4.0
generate Globus collection URL link
func SharedLink ¶
SharedLink provides shared link to Globus data
func Token ¶
Token API obtains Globus access token example through curl curl -X POST https://auth.globus.org/v2/oauth2/token --header "Content-Type: application/x-www-form-urlencoded" --data-urlencode "grant_type=client_credentials" --data-urlencode "scope=$scope" --data-urlencode "client_id=$clientid" --data-urlencode "client_secret=$secret"
Types ¶
type GlobusEndpointResponse ¶
type GlobusEndpointResponse struct {
// Define the structure based on the response from the API
Endpoints []struct {
ID string `json:"id"`
DisplayName string `json:"display_name"`
Owner string `json:"owner_string"`
Description string `json:"description"`
} `json:"DATA"`
}
GlobusEndpointResponse represents globus endpoint response
type GlobusFileListResponse ¶
type GlobusFileListResponse struct {
// Define the structure based on the response from the API
Files []struct {
Name string `json:"name"`
Type string `json:"type"`
} `json:"DATA"`
}
GlobusFileListResponse represents globus file list response
type GlobusSearchResponse ¶
type GlobusSearchResponse struct {
Id string `json:"id"`
Name string `json:"name"`
Owner string `json:"owner_string"`
Description string `json:"description"`
}
GlobusSearchResponse represents globus search response
func Search ¶
func Search(token string, pattern string) []GlobusSearchResponse
Search API provides search API to globus search pattern example of curl curl -H "Accept: application/json" -H "Authorization: Bearer $t" "https://transfer.api.globus.org/v0.10/endpoint_search?filter_fulltext=CHESS"
type GlobusTokenResponse ¶
type GlobusTokenResponse struct {
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
TokenType string `json:"token_type"`
}
GlobusTokenResponse represents globus token response