sv_file_content

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxChunkSize     = 150 * 1_048_576 // 150MiB
	DefaultChunkSize = 4 * 1_048_576   // 4MiB
)

Variables

View Source
var (
	ErrorDownloadUrlNotFound = errors.New("temporary link not found")
)

Functions

func UploadPath

func UploadPath(destPath mo_path.DropboxPath, f os.FileInfo) mo_path.DropboxPath

Types

type Download

type Download interface {
	Download(path mo_path.DropboxPath) (entry mo_file.Entry, localPath mo_path2.FileSystemPath, err error)
	DownloadUrl(path mo_path.DropboxPath) (url string, err error)
}

func NewDownload

func NewDownload(ctx dbx_context.Context) Download

type Export

type Export interface {
	Export(path mo_path.DropboxPath, opts ...ExportOpt) (export *mo_file.Export, localPath mo_path2.FileSystemPath, err error)
}

func NewExport

func NewExport(ctx dbx_context.Context) Export

type ExportOpt

type ExportOpt func(o ExportOpts) ExportOpts

func ExportFormat

func ExportFormat(format string) ExportOpt

type ExportOpts

type ExportOpts struct {
	Path         string `json:"path"`
	ExportFormat string `json:"export_format,omitempty"`
}

func (ExportOpts) Apply

func (z ExportOpts) Apply(opts []ExportOpt) ExportOpts

type Opts

type Opts struct {
	SharedLinkUrl string `json:"shared_link_url"`
	Path          string `json:"path"`
}

type Upload

type Upload interface {
	Add(destPath mo_path.DropboxPath, filePath string) (entry mo_file.Entry, err error)
	Overwrite(destPath mo_path.DropboxPath, filePath string) (entry mo_file.Entry, err error)
	Update(destPath mo_path.DropboxPath, filePath string, revision string) (entry mo_file.Entry, err error)
}

func NewUpload

func NewUpload(ctx dbx_context.Context, opts ...UploadOpt) Upload

type UploadOpt

type UploadOpt func(o *UploadOpts) *UploadOpts

func ChunkSizeKb

func ChunkSizeKb(chunkSizeKb int) UploadOpt

type UploadOpts

type UploadOpts struct {
	ChunkSize int64
	Mute      bool
}

type UploadParamMode

type UploadParamMode struct {
	Tag    string `json:".tag"`
	Update string `json:"update,omitempty"`
}

type UploadParams

type UploadParams struct {
	Path           string           `json:"path"`
	Mode           *UploadParamMode `json:"mode"`
	Mute           bool             `json:"mute"`
	ClientModified string           `json:"client_modified"`
	Autorename     bool             `json:"autorename"`
}

Jump to

Keyboard shortcuts

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