command

package
v0.0.0-...-4a8dcac Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download() *cli.Command

func Prompt

func Prompt() *cli.Command

func SaveURL

func SaveURL() *cli.Command

func Upload

func Upload() *cli.Command

Types

type Cli

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

func New

func New(token string, disableCursorCache bool) *Cli

func (*Cli) CheckSaveURLJob

func (r *Cli) CheckSaveURLJob(jobID string) (status string, err error)

func (*Cli) Download

func (r *Cli) Download(path string) (io.ReadCloser, error)

func (*Cli) GenContentHash

func (r *Cli) GenContentHash(localContent []byte) string

func (*Cli) GetMetadata

func (r *Cli) GetMetadata(path string) (files.IsMetadata, error)

func (*Cli) ListFolder

func (r *Cli) ListFolder(path string, recursive, includeDeleted bool, f func(data files.IsMetadata) error) error

func (*Cli) ListLocal

func (r *Cli) ListLocal(dir string, f func(path string, info os.FileInfo) error) error

func (*Cli) SaveURL

func (r *Cli) SaveURL(filename, fileURL string) (jobID string, err error)

func (*Cli) TryCheckLocalContentHash

func (r *Cli) TryCheckLocalContentHash(local interface{}, remoteContentHash string) bool

func (*Cli) Upload

func (r *Cli) Upload(localFile, remotePath string, blockSuccessCallback func(idx int)) (*UploadResult, error)

func (*Cli) WriteToLocal

func (r *Cli) WriteToLocal(filename string, body io.Reader) error

type Meta

type Meta struct {
	Cursor string `json:"cursor"`
}

type UploadResult

type UploadResult struct {
	Exist bool
}

Jump to

Keyboard shortcuts

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