Documentation ¶
Index ¶
- Constants
- func BeginUpload(ctx context.Context, params files_sdk.FileBeginUploadParams) (fileUploadPartCollection files_sdk.FileUploadPartCollection, err error)
- func Copy(ctx context.Context, params files_sdk.FileCopyParams) (fileAction files_sdk.FileAction, err error)
- func Create(ctx context.Context, params files_sdk.FileCreateParams) (file files_sdk.File, err error)
- func Delete(ctx context.Context, params files_sdk.FileDeleteParams) (err error)
- func Download(ctx context.Context, params files_sdk.FileDownloadParams) (files_sdk.File, error)
- func Find(ctx context.Context, params files_sdk.FileFindParams) (file files_sdk.File, err error)
- func Get(ctx context.Context, Path string) (files_sdk.File, error)
- func Move(ctx context.Context, params files_sdk.FileMoveParams) (fileAction files_sdk.FileAction, err error)
- func RetryByPolicy(ctx context.Context, job *status.Job, policy RetryPolicy, signalEvents bool)
- func RetryByStatus(ctx context.Context, job *status.Job, signalEvents bool, s ...status.Status)
- func SetJobParams(r *status.Job, d direction.Direction, params interface{})
- func Update(ctx context.Context, params files_sdk.FileUpdateParams) (file files_sdk.File, err error)
- type Client
- func (c *Client) BeginUpload(ctx context.Context, params files_sdk.FileBeginUploadParams) (fileUploadPartCollection files_sdk.FileUploadPartCollection, err error)
- func (c *Client) Copy(ctx context.Context, params files_sdk.FileCopyParams) (fileAction files_sdk.FileAction, err error)
- func (c *Client) Create(ctx context.Context, params files_sdk.FileCreateParams) (file files_sdk.File, err error)
- func (c *Client) Delete(ctx context.Context, params files_sdk.FileDeleteParams) (err error)
- func (c *Client) Download(ctx context.Context, params files_sdk.FileDownloadParams) (files_sdk.File, error)
- func (c *Client) DownloadRetry(ctx context.Context, job status.Job) *status.Job
- func (c *Client) DownloadToFile(ctx context.Context, params files_sdk.FileDownloadParams, filePath string) (files_sdk.File, error)
- func (c *Client) Downloader(ctx context.Context, params DownloaderParams) *status.Job
- func (c *Client) Find(ctx context.Context, params files_sdk.FileFindParams) (file files_sdk.File, err error)
- func (c *Client) Get(ctx context.Context, Path string) (files_sdk.File, error)
- func (c *Client) ListFor(ctx context.Context, params files_sdk.FolderListForParams) (*folder.Iter, error)
- func (c *Client) ListForRecursive(ctx context.Context, params files_sdk.FolderListForParams) (lib.IterI, error)
- func (c *Client) Move(ctx context.Context, params files_sdk.FileMoveParams) (fileAction files_sdk.FileAction, err error)
- func (c *Client) Update(ctx context.Context, params files_sdk.FileUpdateParams) (file files_sdk.File, err error)
- func (c *Client) UploadIO(parentCtx context.Context, params UploadIOParams) (files_sdk.File, files_sdk.FileUploadPart, Parts, error)
- func (c *Client) UploadRetry(ctx context.Context, job status.Job) *status.Job
- func (c *Client) Uploader(ctx context.Context, params UploaderParams) *status.Job
- type DeleteSource
- type DownloadStatus
- func (d *DownloadStatus) Err() error
- func (d *DownloadStatus) File() files_sdk.File
- func (d *DownloadStatus) Id() string
- func (d *DownloadStatus) Job() *status.Job
- func (d *DownloadStatus) LastByte() time.Time
- func (d *DownloadStatus) LocalPath() string
- func (d *DownloadStatus) RecentError() error
- func (d *DownloadStatus) RemotePath() string
- func (d *DownloadStatus) SetFinalSize(written int64)
- func (d *DownloadStatus) SetStatus(s status.Status, err error)
- func (d *DownloadStatus) Status() status.Status
- func (d *DownloadStatus) TransferBytes() int64
- type DownloaderParams
- type Entity
- type FS
- type File
- func (f *File) Close() error
- func (f File) Info() (goFs.FileInfo, error)
- func (f File) IsDir() bool
- func (f File) Name() string
- func (f *File) Read(b []byte) (int, error)
- func (f *File) Reload() (File, error)
- func (f File) Stat() (goFs.FileInfo, error)
- func (f File) Type() goFs.FileMode
- func (f *File) WithContext(ctx context.Context)
- type Info
- type MoveSource
- type OffSet
- type Part
- type Parts
- type ProxyReader
- type ReadDirFile
- type RetryPolicy
- type UploadIOParams
- type UploadStatus
- func (u *UploadStatus) Err() error
- func (u *UploadStatus) File() files_sdk.File
- func (u *UploadStatus) Id() string
- func (u *UploadStatus) Job() *status.Job
- func (u *UploadStatus) LastByte() time.Time
- func (u *UploadStatus) LocalPath() string
- func (u *UploadStatus) RecentError() error
- func (u *UploadStatus) RemotePath() string
- func (u *UploadStatus) SetStatus(s status.Status, err error)
- func (u *UploadStatus) SetUploadedBytes(b int64)
- func (u *UploadStatus) Status() status.Status
- func (u *UploadStatus) TransferBytes() int64
- type Uploader
- type UploaderParams
Constants ¶
View Source
const ( RetryAll = RetryPolicy("RetryAll") RetryUnfinished = RetryPolicy("RetryUnfinished") RetryErroredIfSomeCompleted = RetryPolicy("RetryErroredIfSomeCompleted") )
Variables ¶
This section is empty.
Functions ¶
func BeginUpload ¶
func BeginUpload(ctx context.Context, params files_sdk.FileBeginUploadParams) (fileUploadPartCollection files_sdk.FileUploadPartCollection, err error)
func Copy ¶
func Copy(ctx context.Context, params files_sdk.FileCopyParams) (fileAction files_sdk.FileAction, err error)
func Move ¶
func Move(ctx context.Context, params files_sdk.FileMoveParams) (fileAction files_sdk.FileAction, err error)
func RetryByPolicy ¶
func RetryByStatus ¶
Types ¶
type Client ¶
func (*Client) BeginUpload ¶
func (c *Client) BeginUpload(ctx context.Context, params files_sdk.FileBeginUploadParams) (fileUploadPartCollection files_sdk.FileUploadPartCollection, err error)
func (*Client) Copy ¶
func (c *Client) Copy(ctx context.Context, params files_sdk.FileCopyParams) (fileAction files_sdk.FileAction, err error)
func (*Client) DownloadRetry ¶
func (*Client) DownloadToFile ¶
func (*Client) Downloader ¶
func (*Client) ListForRecursive ¶
func (*Client) Move ¶
func (c *Client) Move(ctx context.Context, params files_sdk.FileMoveParams) (fileAction files_sdk.FileAction, err error)
func (*Client) UploadIO ¶
func (c *Client) UploadIO(parentCtx context.Context, params UploadIOParams) (files_sdk.File, files_sdk.FileUploadPart, Parts, error)
func (*Client) UploadRetry ¶
type DeleteSource ¶
DeleteSource files after a sync
job.RegisterFileEvent(func(file status.File) { log, err := file.DeleteSource{Direction: f.Direction, Config: config}.Call(ctx, f) }, status.Complete, status.Skipped)
type DownloadStatus ¶
type DownloadStatus struct { DownloadedBytes int64 Sync bool Mutex *sync.RWMutex PreserveTimes bool // contains filtered or unexported fields }
func (*DownloadStatus) Err ¶
func (d *DownloadStatus) Err() error
func (*DownloadStatus) File ¶
func (d *DownloadStatus) File() files_sdk.File
func (*DownloadStatus) Id ¶
func (d *DownloadStatus) Id() string
func (*DownloadStatus) Job ¶
func (d *DownloadStatus) Job() *status.Job
func (*DownloadStatus) LastByte ¶
func (d *DownloadStatus) LastByte() time.Time
func (*DownloadStatus) LocalPath ¶
func (d *DownloadStatus) LocalPath() string
func (*DownloadStatus) RecentError ¶
func (d *DownloadStatus) RecentError() error
func (*DownloadStatus) RemotePath ¶
func (d *DownloadStatus) RemotePath() string
func (*DownloadStatus) SetFinalSize ¶
func (d *DownloadStatus) SetFinalSize(written int64)
func (*DownloadStatus) Status ¶
func (d *DownloadStatus) Status() status.Status
func (*DownloadStatus) TransferBytes ¶
func (d *DownloadStatus) TransferBytes() int64
type DownloaderParams ¶
type FS ¶
type MoveSource ¶
MoveSource files after a sync
job.RegisterFileEvent(func(file status.File) { log, err := file.MoveSource{Direction: f.Direction, Config: config}.Call(ctx, f) }, status.Complete, status.Skipped)
type Part ¶
type Part struct { OffSet // contains filtered or unexported fields }
func (*Part) Successful ¶
type ProxyReader ¶
func (*ProxyReader) Close ¶
func (x *ProxyReader) Close() error
func (*ProxyReader) Len ¶
func (x *ProxyReader) Len() int
type ReadDirFile ¶
type ReadDirFile struct { File // contains filtered or unexported fields }
type RetryPolicy ¶
type RetryPolicy string
type UploadIOParams ¶
type UploadStatus ¶
type UploadStatus struct { Sync bool Uploader Parts files_sdk.FileUploadPart Mutex *sync.RWMutex // contains filtered or unexported fields }
func (*UploadStatus) Err ¶
func (u *UploadStatus) Err() error
func (*UploadStatus) File ¶
func (u *UploadStatus) File() files_sdk.File
func (*UploadStatus) Id ¶
func (u *UploadStatus) Id() string
func (*UploadStatus) Job ¶
func (u *UploadStatus) Job() *status.Job
func (*UploadStatus) LastByte ¶
func (u *UploadStatus) LastByte() time.Time
func (*UploadStatus) LocalPath ¶
func (u *UploadStatus) LocalPath() string
func (*UploadStatus) RecentError ¶
func (u *UploadStatus) RecentError() error
func (*UploadStatus) RemotePath ¶
func (u *UploadStatus) RemotePath() string
func (*UploadStatus) SetUploadedBytes ¶
func (u *UploadStatus) SetUploadedBytes(b int64)
func (*UploadStatus) Status ¶
func (u *UploadStatus) Status() status.Status
func (*UploadStatus) TransferBytes ¶
func (u *UploadStatus) TransferBytes() int64
type UploaderParams ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.