drive

package
v0.0.0-...-066b5d6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WebServiceName

func WebServiceName() string

WebServiceName returns the service name of iCloud Drive

Types

type DocDownloadInfo

type DocDownloadInfo struct {
	DocumentID string           `json:"document_id,omitempty"`
	DataToken  DocDownloadToken `json:"data_token,omitempty"`
	DoubleEtag string           `json:"double_etag,omitempty"`
}

DocDownloadInfo holds doc info for downlading TODO: move to docws service

type DocDownloadToken

type DocDownloadToken struct {
	URL                string `json:"url,omitempty"`
	Token              string `json:"token,omitempty"`
	Signature          string `json:"signature,omitempty"`
	WrappingKey        string `json:"wrapping_key,omitempty"`
	ReferenceSignature string `json:"reference_signature,omitempty"`
}

DocDownloadToken holds doc token for downlading TODO: move to docws service

type Drive

type Drive struct {
	// contains filtered or unexported fields
}

Drive provides functions to access iCloud Drive

func New

func New(http *resty.Client, session *session.Session) *Drive

New creates a new Drive instance

func (*Drive) Start

func (d *Drive) Start()

Start starts the iCloud Drive service

func (*Drive) Stop

func (d *Drive) Stop()

Stop stops the iCloud Drive service

func (*Drive) Test

func (d *Drive) Test(drivewsid string)

Test does testing

type ErrorResponse

type ErrorResponse struct {
	ErrorCode   int    `json:"errorCode,omitempty"`
	ErrorReason string `json:"errorReason,omitempty"`
}

ErrorResponse holds the error response

type ItemInfo

ItemInfo holds item(file or folder) info

type ItemInfoAppLibrary

type ItemInfoAppLibrary struct {
	DateCreated         string   `json:"dateCreated,omitempty"`
	MaxDepth            string   `json:"maxDepth,omitempty"`
	Icons               []icon   `json:"icons,omitempty"`
	SupportedExtensions []string `json:"supportedExtensions,omitempty"`
	SupportedTypes      []string `json:"supportedTypes,omitempty"`
}

ItemInfoAppLibrary holds APP_LIBRARY info

type ItemInfoCommon

type ItemInfoCommon struct {
	DrivewsID string `json:"drivewsid,omitempty"`
	DocwsID   string `json:"docwsid,omitempty"`
	Zone      string `json:"zone,omitempty"`
	Name      string `json:"name,omitempty"`
	ParentID  string `json:"parentId,omitempty"`
	Etag      string `json:"etag,omitempty"`
	Type      string `json:"type,omitempty"`
}

ItemInfoCommon holds item(file or folder) common info

type ItemInfoFile

type ItemInfoFile struct {
	DateModified string `json:"dateModified,omitempty"`
	DateChanged  string `json:"dateChanged,omitempty"`
	Size         int64  `json:"size,omitempty"`
	Extension    string `json:"extension,omitempty"`
}

ItemInfoFile holds file info

type ItemInfoFolder

type ItemInfoFolder struct {
	AssetQuota          int         `json:"assetQuota,omitempty"`
	FileCount           int         `json:"fileCount,omitempty"`
	ShareCount          int         `josn:"shareCount,omitempty"`
	ShareAliasCount     int         `json:"shareAliasCount,omitempty"`
	DirectChildrenCount int         `json:"directChildrenCount,omitempty"`
	Items               []*ItemInfo `json:"items,omitempty"`
	NumberOfItems       int         `json:"numberOfItems,omitempty"`
}

ItemInfoFolder holds folder info

type ItemInfoUpate

type ItemInfoUpate struct {
	ClientID  string `json:"clientId,omitempty"`
	Status    string `json:"status,omitempty"`
	IsDeleted bool   `json:"isDeleted,omitempty"`
}

ItemInfoUpate holds info for update result

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL