file

package
v2.0.2-beta Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: MIT Imports: 24 Imported by: 2

Documentation

Index

Constants

View Source
const (
	RetryAll                    = RetryPolicy("RetryAll")
	RetryErrored                = RetryPolicy("RetryErrored")
	RetryErroredIfSomeCompleted = RetryPolicy("RetryErroredIfSomeCompleted")
)

Variables

This section is empty.

Functions

func Find

func Find(ctx context.Context, Path string) (files_sdk.File, error)

func RetryTransfers

func RetryTransfers(ctx context.Context, job *status.Job)

func SetJobParams

func SetJobParams(r *status.Job, d direction.Type, params interface{})

Types

type Client

type Client struct {
	files_sdk.Config
}

func (*Client) Copy

func (*Client) Create

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

func (*Client) Delete

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

func (*Client) Download

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

func (*Client) DownloadRetry

func (c *Client) DownloadRetry(ctx context.Context, job status.Job) *status.Job

func (*Client) DownloadToFile

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

func (*Client) Downloader

func (c *Client) Downloader(ctx context.Context, params DownloadFolderParams) *status.Job

func (*Client) Find

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

func (*Client) Metadata

func (c *Client) Metadata(ctx context.Context, params files_sdk.FileMetadataParams) (files_sdk.File, error)

func (*Client) Move

func (*Client) Update

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

func (*Client) Upload

func (c *Client) Upload(parentCtx context.Context, reader io.ReaderAt, size int64, params files_sdk.FileBeginUploadParams, progress func(int64), cm goccm.ConcurrencyManager) (files_sdk.File, error)

func (*Client) UploadFile

func (c *Client) UploadFile(ctx context.Context, params UploadParams) *status.Job

func (*Client) UploadFolder

func (c *Client) UploadFolder(ctx context.Context, params UploadParams) *status.Job

func (*Client) UploadRetry

func (c *Client) UploadRetry(ctx context.Context, job status.Job) *status.Job

func (*Client) Uploader

func (c *Client) Uploader(ctx context.Context, params UploadParams) *status.Job

type DownloadFolderParams

type DownloadFolderParams struct {
	RemotePath string
	RemoteFile files_sdk.File
	LocalPath  string
	Sync       bool
	RetryPolicy
	*manager.Manager
	status.EventsReporter
}

type DownloadStatus

type DownloadStatus struct {
	files_sdk.File
	status.Status
	*status.Job
	DownloadedBytes int64
	LocalPath       string
	RemotePath      string
	Sync            bool
	// contains filtered or unexported fields
}

func (DownloadStatus) Id

func (d DownloadStatus) Id() string

func (*DownloadStatus) SetStatus

func (d *DownloadStatus) SetStatus(s status.Status, err error)

func (DownloadStatus) ToStatusFile

func (d DownloadStatus) ToStatusFile() status.File

type Entity

type Entity struct {
	fs.File
	// contains filtered or unexported fields
}

type FS

type FS struct {
	files_sdk.Config
	context.Context
	Root string
	// contains filtered or unexported fields
}

func (FS) Init

func (f FS) Init(config files_sdk.Config) FS

func (FS) Open

func (f FS) Open(name string) (goFs.File, error)

func (FS) WithContext

func (f FS) WithContext(ctx context.Context) FS

type File

type File struct {
	*files_sdk.File
	FS
	io.ReadCloser
}

func (*File) Close

func (f *File) Close() error

func (File) Info

func (f File) Info() (goFs.FileInfo, error)

func (File) IsDir

func (f File) IsDir() bool

func (File) Name

func (f File) Name() string

func (*File) Read

func (f *File) Read(b []byte) (int, error)

func (*File) Reload

func (f *File) Reload() (File, error)

func (File) Stat

func (f File) Stat() (goFs.FileInfo, error)

func (File) Type

func (f File) Type() goFs.FileMode

type Info

type Info struct {
	*files_sdk.File
}

func (Info) IsDir

func (i Info) IsDir() bool

func (Info) ModTime

func (i Info) ModTime() time.Time

func (Info) Mode

func (i Info) Mode() goFs.FileMode

func (Info) Name

func (i Info) Name() string

func (Info) Size

func (i Info) Size() int64

func (Info) Sys

func (i Info) Sys() interface{}

type ProxyReader

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

func (*ProxyReader) Close

func (x *ProxyReader) Close() error

func (*ProxyReader) Len

func (x *ProxyReader) Len() int

func (*ProxyReader) Read

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

type ReadDirFile

type ReadDirFile struct {
	File
	// contains filtered or unexported fields
}

func (ReadDirFile) ReadDir

func (f ReadDirFile) ReadDir(n int) ([]goFs.DirEntry, error)

type RetryPolicy

type RetryPolicy string

type UploadParams

type UploadParams struct {
	Ignore []string
	*status.Job
	Sync       bool
	LocalPath  string
	RemotePath string
	RetryPolicy
	status.EventsReporter
	*manager.Manager
}

type UploadStatus

type UploadStatus struct {
	files_sdk.File
	status.Status
	Job           *status.Job
	LocalPath     string
	RemotePath    string
	UploadedBytes int64
	Sync          bool

	Uploader
	// contains filtered or unexported fields
}

func (UploadStatus) Id

func (u UploadStatus) Id() string

func (*UploadStatus) SetStatus

func (u *UploadStatus) SetStatus(s status.Status, err error)

func (*UploadStatus) ToStatusFile

func (u *UploadStatus) ToStatusFile() status.File

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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