sv_file_lock

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorUnexpectedResponseFormat = errors.New("unexpected response format")
)

Functions

This section is empty.

Types

type Lock

type Lock interface {
	Lock(path mo_path.DropboxPath) (entry mo_file.Entry, err error)
	Unlock(path mo_path.DropboxPath) (entry mo_file.Entry, err error)
	List(path mo_path.DropboxPath, onLockEntry func(entry *mo_file.LockInfo)) error

	// Batch lock paths. returns empty map if any error happened, thus entries never nil.
	LockBatch(path []mo_path.DropboxPath) (entries map[string]LockResult, err error)
	// Batch unlock paths. returns empty map if any error happened, thus entries never nil.
	UnlockBatch(path []mo_path.DropboxPath) (entries map[string]LockResult, err error)
}

func New

func New(ctx dbx_context.Context) Lock

type LockResult

type LockResult struct {
	Entry mo_file.Entry
	Error error
}

Jump to

Keyboard shortcuts

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