Documentation ¶
Index ¶
- Constants
- Variables
- type APIClient
- type APIParams
- type AccessRule
- type AddEndpointACLRuleResult
- type Client
- func (c *Client) AddEndpointACLRule(rule EndpointACLRule) (AddEndpointACLRuleResult, error)
- func (c *Client) Authenticate() error
- func (c *Client) DeleteEndpointACLRule(endpointID string, accessID string) (DeleteEndpointACLRuleResult, error)
- func (c *Client) GetEndpointAccessRules(endpointID string) (EndpointAccessRuleList, error)
- func (c *Client) GetEndpointTaskList(endpointID string, filters map[string]string) (TaskList, error)
- func (c *Client) GetGlobusErrorResponse() *ErrorResponse
- func (c *Client) GetIdentities(users []string) (Identities, error)
- func (c *Client) GetTaskSuccessfulTransfers(taskID string, marker int) (TransferItems, error)
- type DeleteEndpointACLRuleResult
- type EndpointACLRule
- type EndpointAccessRuleList
- type ErrorResponse
- type Identities
- type Identity
- type IdentityProvider
- type IncludedProviders
- type MockClient
- func (c *MockClient) AddEndpointACLRule(rule EndpointACLRule) (AddEndpointACLRuleResult, error)
- func (c *MockClient) Authenticate() error
- func (c *MockClient) DeleteEndpointACLRule(endpointID string, accessID int) (DeleteEndpointACLRuleResult, error)
- func (c *MockClient) Err(err error) *MockClient
- func (c *MockClient) GetEndpointTaskList(endpointID string, filters map[string]string) (TaskList, error)
- func (c *MockClient) GetIdentities(users []string) (Identities, error)
- func (c *MockClient) GetTaskSuccessfulTransfers(taskID string, marker int) (TransferItems, error)
- type Task
- type TaskExtras
- type TaskList
- type Transfer
- type TransferItems
Constants ¶
View Source
const ACLPrincipalTypeAllAuthenticatedUsers = "all_authenticated_users"
View Source
const ACLPrincipalTypeIdentity = "identity"
Variables ¶
View Source
var ErrGlobusAuth = errors.New("globus auth")
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient interface { Authenticate() error GetEndpointTaskList(endpointID string, filters map[string]string) (TaskList, error) GetTaskSuccessfulTransfers(taskID string, marker int) (TransferItems, error) GetIdentities(users []string) (Identities, error) AddEndpointACLRule(rule EndpointACLRule) (AddEndpointACLRuleResult, error) DeleteEndpointACLRule(endpointID string, accessID int) (DeleteEndpointACLRuleResult, error) }
type APIParams ¶
func GetAPIParamsFromEnvFatal ¶
func GetAPIParamsFromEnvFatal() APIParams
type AccessRule ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddEndpointACLRule ¶
func (c *Client) AddEndpointACLRule(rule EndpointACLRule) (AddEndpointACLRuleResult, error)
func (*Client) Authenticate ¶
Authenticate will authentice with Globus and get a token to use in subsequent calls.
func (*Client) DeleteEndpointACLRule ¶
func (c *Client) DeleteEndpointACLRule(endpointID string, accessID string) (DeleteEndpointACLRuleResult, error)
func (*Client) GetEndpointAccessRules ¶
func (c *Client) GetEndpointAccessRules(endpointID string) (EndpointAccessRuleList, error)
func (*Client) GetEndpointTaskList ¶
func (*Client) GetGlobusErrorResponse ¶
func (c *Client) GetGlobusErrorResponse() *ErrorResponse
func (*Client) GetIdentities ¶
func (c *Client) GetIdentities(users []string) (Identities, error)
func (*Client) GetTaskSuccessfulTransfers ¶
func (c *Client) GetTaskSuccessfulTransfers(taskID string, marker int) (TransferItems, error)
type EndpointACLRule ¶
type EndpointAccessRuleList ¶
type EndpointAccessRuleList struct { Length int `json:"length"` Endpoint string `json:"endpoint"` AccessRules []AccessRule `json:"DATA"` DataType string `json:"DATA_TYPE"` }
type ErrorResponse ¶
type ErrorResponse struct { Code string `json:"code"` Message string `json:"message"` RequestID string `json:"request_id"` Resource string `json:"resource"` }
ErrorResponse describes the JSON that Globus responds with when there is an error in an API call
func ToErrorFromResponse ¶
func ToErrorFromResponse(resp *resty.Response) (*ErrorResponse, error)
type Identities ¶
type Identities struct {
Identities []Identity `json:"identities"`
}
type IdentityProvider ¶
type IncludedProviders ¶
type IncludedProviders struct { IdentityProviders []IdentityProvider `json:"identity_providers"` Identities []Identity `json:"identities"` }
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
func NewMockClient ¶
func NewMockClient(err error) *MockClient
func (*MockClient) AddEndpointACLRule ¶
func (c *MockClient) AddEndpointACLRule(rule EndpointACLRule) (AddEndpointACLRuleResult, error)
func (*MockClient) Authenticate ¶
func (c *MockClient) Authenticate() error
func (*MockClient) DeleteEndpointACLRule ¶
func (c *MockClient) DeleteEndpointACLRule(endpointID string, accessID int) (DeleteEndpointACLRuleResult, error)
func (*MockClient) Err ¶
func (c *MockClient) Err(err error) *MockClient
func (*MockClient) GetEndpointTaskList ¶
func (*MockClient) GetIdentities ¶
func (c *MockClient) GetIdentities(users []string) (Identities, error)
func (*MockClient) GetTaskSuccessfulTransfers ¶
func (c *MockClient) GetTaskSuccessfulTransfers(taskID string, marker int) (TransferItems, error)
type Task ¶
type Task struct { DataType string `json:"DATA_TYPE"` TaskID string `json:"task_id"` Type string `json:"type"` Status string `json:"status"` Label string `json:"label"` OwnerID string `json:"owner_id"` RequestTime string `json:"request_time"` CompletionTime string `json:"completion_time"` Deadline string `json:"deadline"` SyncLevel int `json:"sync_level"` EncryptData bool `json:"encrypt_data"` VerifyChecksum bool `json:"verify_checksum"` DeleteDestinationExtra bool `json:"delete_destination_extra"` RecursiveSymlinks string `json:"recursive_symlinks"` PreserveTimestamp bool `json:"preserve_timestamp"` Command string `json:"command"` HistoryDeleted bool `json:"history_deleted"` Faults int `json:"faults"` FilesCount int `json:"files"` DirectoriesCount int `json:"directories"` SymlinksCount int `json:"symlinks"` FilesSkipped int `json:"files_skipped"` FilesTransferred int `json:"files_transferred"` SubtasksTotal int `json:"subtasks_total"` SubtasksPending int `json:"subtasks_pending"` SubtasksRetrying int `json:"subtasks_retrying"` SubtasksSucceeded int `json:"subtasks_succeeded"` SubtasksFailed int `json:"subtasks_failed"` BytesTransferred int `json:"bytes_transferred"` BytesChecksummed int `json:"bytes_checksummed"` EffectiveBytesPerSecond int `json:"effective_bytes_per_second"` NiceStatus string `json:"nice_status"` NiceStatusShortDescription string `json:"nice_status_short_description"` NiceStatusExpiresIn string `json:"nice_status_expires_in"` CanceledByAdmin string `json:"canceled_by_admin"` CanceledByAdminMessage string `json:"canceled_by_admin_message"` IsPaused bool `json:"is_paused"` TaskExtras }
type TaskExtras ¶
type TaskExtras struct { SourceEndpoint string `json:"source_endpoint"` SourceEndpointID string `json:"source_endpoint_id"` SourceEndpointDisplayName string `json:"source_endpoint_display_name"` DestinationEndpoint string `json:"destination_endpoint"` DestinationEndpointID string `json:"destination_endpoint_id"` DestinationEndpointDisplayName string `json:"destination_endpoint_display_name"` SourceHostEndpoint string `json:"source_host_endpoint"` SourceHostEndpointID string `json:"source_host_endpoint_id"` SourceHostEndpointDisplayName string `json:"source_host_endpoint_display_name"` DestinationHostEndpoint string `json:"destination_host_endpoint"` DestinationHostEndpointID string `json:"destination_host_endpoint_id"` DestinationHostEndpointDisplayName string `json:"destination_host_endpoint_display_name"` SourceHostPath string `json:"source_host_path"` DestinationHostPath string `json:"destination_host_path"` IsOK bool `json:"is_ok"` SourceLocalUser string `json:"source_local_user"` SourceLocalUserStatus string `json:"source_local_user_status"` DestinationLocalUser string `json:"destination_local_user"` DestinationLocalUserStatus string `json:"destination_local_user_status"` OwnerString string `json:"owner_string"` }
Click to show internal directories.
Click to hide internal directories.