Documentation
¶
Index ¶
- Variables
- func ProgressNone(current uint64, total uint64)
- func ProgressPrintBytes(current uint64, total uint64)
- type API
- func (a *API) DownloadFile(pm PackageMetadata, p Package, f File, fp string, ...) error
- func (a *API) GetPackage(packageCode string) (Package, error)
- func (a *API) GetPackageFromURL(packageURL string) (Package, error)
- func (a *API) GetPackageMetadataFromURL(packageURL string) (PackageMetadata, error)
- func (a *API) UserInformation() (UserInformation, error)
- type File
- type Package
- type PackageMetadata
- type UserInformation
Constants ¶
This section is empty.
Variables ¶
View Source
var ( URLAPIPrefix = "/api/v2.0" URLVerifyCredentials = "/config/verify-credentials/" DownloadAPI = "JAVA_API" APIKeyHeader = "ss-api-key" TimestampHeader = "ss-request-timestamp" SignatureHeader = "ss-request-signature" ContentType = "application/json" )
Functions ¶
func ProgressNone ¶
func ProgressPrintBytes ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) DownloadFile ¶
func (*API) GetPackageMetadataFromURL ¶
func (a *API) GetPackageMetadataFromURL(packageURL string) (PackageMetadata, error)
func (*API) UserInformation ¶
func (a *API) UserInformation() (UserInformation, error)
type File ¶
type File struct { FileID string `json:"fileId"` FileName string `json:"fileName"` FileSize string `json:"fileSize"` Parts int `json:"parts"` FileUploaded string `json:"fileUploaded"` FileUploadedStr string `json:"fileUploadedStr"` FileVersion string `json:"fileVersion"` CreatedByEmail string `json:"createdByEmail"` }
func (*File) FileSizeHumanize ¶
func (*File) FileSizeInt ¶
type Package ¶
type Package struct { PackageID string `json:"packageId"` PackageCode string `json:"packageCode"` ServerSecret string `json:"serverSecret"` Recipients []struct { RecipientID string `json:"recipientId"` Email string `json:"email"` FullName string `json:"fullName"` NeedsApproval bool `json:"needsApproval"` RecipientCode string `json:"recipientCode"` Confirmations []interface{} `json:"confirmations"` IsPackageOwner bool `json:"isPackageOwner"` CheckForPublicKeys bool `json:"checkForPublicKeys"` RoleName string `json:"roleName"` } `json:"recipients"` ContactGroups []struct { ContactGroupID string `json:"contactGroupId"` ContactGroupName string `json:"contactGroupName"` ContactGroupIsOrganizationGroup bool `json:"contactGroupIsOrganizationGroup"` Users []struct { UserEmail string `json:"userEmail"` UserID string `json:"userId"` } `json:"users"` } `json:"contactGroups"` Files []File `json:"files"` Directories []interface{} `json:"directories"` ApproverList []interface{} `json:"approverList"` NeedsApproval bool `json:"needsApproval"` State string `json:"state"` PasswordRequired bool `json:"passwordRequired"` Life int `json:"life"` Label string `json:"label"` IsVDR bool `json:"isVDR"` IsArchived bool `json:"isArchived"` PackageSender string `json:"packageSender"` PackageTimestamp string `json:"packageTimestamp"` RootDirectoryID string `json:"rootDirectoryId"` Response string `json:"response"` }
type PackageMetadata ¶
type UserInformation ¶
type UserInformation struct { ID string `json:"id"` Email string `json:"email"` ClientKey string `json:"clientKey"` FirstName string `json:"firstName"` LastName string `json:"lastName"` BetaUser bool `json:"betaUser"` AdminUser bool `json:"adminUser"` PublicKey bool `json:"publicKey"` PackageLife int `json:"packageLife"` Response string `json:"response"` }
Click to show internal directories.
Click to hide internal directories.