sync10

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: AGPL-3.0 Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocumentsFileTree

func DocumentsFileTree(http *transport.HttpClientCtx) (*filetree.FileTreeCtx, error)

DocumentsFileTree reads your remote documents and builds a file tree structure to represent them

Types

type ApiCtx

type ApiCtx struct {
	Http *transport.HttpClientCtx
	// contains filtered or unexported fields
}

An ApiCtx allows you interact with the remote reMarkable API

func CreateCtx

func CreateCtx(http *transport.HttpClientCtx) (*ApiCtx, error)

func (*ApiCtx) CreateDir

func (ctx *ApiCtx) CreateDir(parentId, name string, notify bool) (*model.Document, error)

CreateDir creates a remote directory with a given name under the parentId directory

func (*ApiCtx) DeleteEntry

func (ctx *ApiCtx) DeleteEntry(node *model.Node) error

DeleteEntry removes an entry: either an empty directory or a file

func (*ApiCtx) FetchDocument

func (ctx *ApiCtx) FetchDocument(docId, dstPath string) error

FetchDocument downloads a document given its ID and saves it locally into dstPath

func (*ApiCtx) Filetree

func (ctx *ApiCtx) Filetree() *filetree.FileTreeCtx

func (*ApiCtx) MoveEntry

func (ctx *ApiCtx) MoveEntry(src, dstDir *model.Node, name string) (*model.Node, error)

MoveEntry moves an entry (either a directory or a file) - src is the source node to be moved - dstDir is an existing destination directory - name is the new name of the moved entry in the destination directory

func (*ApiCtx) Nuke

func (ctx *ApiCtx) Nuke() error

Nuke removes all documents from the account

func (*ApiCtx) Refresh added in v0.0.23

func (ctx *ApiCtx) Refresh() (err error)

func (*ApiCtx) SyncComplete added in v0.0.19

func (ctx *ApiCtx) SyncComplete() error

SyncComplete does nothing for this version

func (*ApiCtx) UploadDocument

func (ctx *ApiCtx) UploadDocument(parentId string, sourceDocPath string, notify bool) (*model.Document, error)

UploadDocument uploads a local document given by sourceDocPath under the parentId directory

Jump to

Keyboard shortcuts

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