file

package
v1.0.1135 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(params files_sdk.FileCreateParams) (files_sdk.File, error)

func Delete

func Delete(params files_sdk.FileDeleteParams) (files_sdk.File, error)

func Download

func Download(params files_sdk.FileDownloadParams) (files_sdk.File, error)

func DownloadToFile added in v1.0.15

func DownloadToFile(params files_sdk.FileDownloadParams, filePath string) (files_sdk.File, error)

func Find added in v1.0.175

func Find(Path string) (files_sdk.File, error)

func Update

func Update(params files_sdk.FileUpdateParams) (files_sdk.File, error)

func Upload added in v1.0.15

func Upload(reader io.ReaderAt, size int64, beginUpload files_sdk.FileActionBeginUploadParams, progress *UploadProgress) (files_sdk.File, error)

func UploadFile added in v1.0.15

func UploadFile(params *UploadParams) (files_sdk.File, error)

Types

type Client

type Client struct {
	files_sdk.Config
}

func (*Client) Create

func (c *Client) Create(params files_sdk.FileCreateParams) (files_sdk.File, error)

func (*Client) Delete

func (c *Client) Delete(params files_sdk.FileDeleteParams) (files_sdk.File, error)

func (*Client) Download

func (c *Client) Download(params files_sdk.FileDownloadParams) (files_sdk.File, error)

func (*Client) DownloadFolder added in v1.0.79

func (c *Client) DownloadFolder(params DownloadFolderParams, rootDestination string, reporters ...Reporter) error

func (*Client) DownloadToFile added in v1.0.15

func (c *Client) DownloadToFile(params files_sdk.FileDownloadParams, filePath string) (files_sdk.File, error)

func (*Client) Find added in v1.0.175

func (c *Client) Find(Path string) (files_sdk.File, error)

func (*Client) Update

func (c *Client) Update(params files_sdk.FileUpdateParams) (files_sdk.File, error)

func (*Client) Upload added in v1.0.15

func (c *Client) Upload(reader io.ReaderAt, size int64, params files_sdk.FileActionBeginUploadParams, progress *UploadProgress) (files_sdk.File, error)

func (*Client) UploadFile added in v1.0.15

func (c *Client) UploadFile(params *UploadParams) (files_sdk.File, error)

func (*Client) UploadFolder added in v1.0.78

func (c *Client) UploadFolder(params *UploadParams) ([]fileUpload, error)

func (*Client) UploadFolderOrFile added in v1.0.107

func (c *Client) UploadFolderOrFile(params *UploadParams) ([]files_sdk.File, error)

type DownloadFolderParams added in v1.0.540

type DownloadFolderParams struct {
	files_sdk.FolderListForParams
	Sync                bool
	ConcurrentDownloads int
}

func (DownloadFolderParams) GetConcurrentDownloads added in v1.0.540

func (d DownloadFolderParams) GetConcurrentDownloads() int

type Downloader added in v1.0.540

type Downloader interface {
	Download(files_sdk.FileDownloadParams) (files_sdk.File, error)
}

type Entity added in v1.0.107

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

type ProxyReader added in v1.0.541

type ProxyReader struct {
	io.ReaderAt
	// contains filtered or unexported fields
}

func (*ProxyReader) Close added in v1.0.541

func (x *ProxyReader) Close() error

func (*ProxyReader) Len added in v1.0.541

func (x *ProxyReader) Len() int

func (*ProxyReader) Read added in v1.0.541

func (x *ProxyReader) Read(p []byte) (int, error)

type Reporter added in v1.0.540

type Reporter func(incDownloadedBytes int64, file files_sdk.File, destination string, err error, onlyMessage string, totalFiles int)

type UploadBatchStats added in v1.0.107

type UploadBatchStats struct {
	LargestSize     int
	LargestFilePath int
	TotalUploads    int
	Size            int64
}

type UploadParams added in v1.0.107

type UploadParams struct {
	Source           string
	Destination      string
	ProgressReporter func(source string, file files_sdk.File, progressByteCount int64, batchStats UploadBatchStats, err error)
}

type UploadProgress added in v1.0.107

type UploadProgress struct {
	Complete bool
	// contains filtered or unexported fields
}

func (*UploadProgress) AddUploadedBytes added in v1.0.107

func (u *UploadProgress) AddUploadedBytes(bytes int64)

Jump to

Keyboard shortcuts

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