cloud

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloud

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

Cloud is used to interact with the remarkable cloud.

func New

func New() (*Cloud, error)

New creates a new authenticated Cloud using rmapi's authentication.

func (*Cloud) Download

func (r *Cloud) Download(node *model.Node, dst string) error

Download downloads node to the file dst.

func (*Cloud) FindFile

func (r *Cloud) FindFile(path string) (*model.Node, error)

FindFile finds a file in the cloud by path and returns the associated Node.

func (*Cloud) FindNewFilesEdit

func (r *Cloud) FindNewFilesEdit(dir string) []*model.Node

FindNewFilesEdit provides all files in subdirectories of the provided directory. e.g. FindNewFilesEdit("pdf-tools") -> ["pdf-tools/sub1/file1", "pdf-tools/sub2/file2"]

func (*Cloud) FindNewFilesMerge

func (r *Cloud) FindNewFilesMerge(dir string) []*model.Node

FindNewFilesMerge returns all files in the provided directory.

func (*Cloud) Move

func (r *Cloud) Move(node *model.Node, dstPath, dstName string) (*model.Node, error)

Move moves node to `dstPath/dstName`.

func (*Cloud) Upload

func (r *Cloud) Upload(src string, dstPath string) (*model.Document, error)

Upload uploads the file src to folder dstPath in the cloud.

Jump to

Keyboard shortcuts

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