dropboxfs

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

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

Go to latest
Published: Jun 10, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func File

func File(metadata dbfiles.IsMetadata) *basefs.File

File Metadata to File Converter

func New

func New(core *core.Core) core.DriverFS

New Create basefs with Dropbox service

Types

type Config

type Config struct {
	ClientSecret struct {
		ClientID     string `json:"client_id" yaml:"client_id"`
		ClientSecret string `json:"client_secret" yaml:"client_secret"`
	} `json:"client_secret" yaml:"client_secret"`
	Auth    *oauth2.Token `json:"auth" yaml:"auth"`
	Options struct {
		Safemode bool
	}
}

Config Configuration

type Service

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

Service basefs Service implementation

func NewService

func NewService(coreConfig *core.Config) *Service

NewService creates Dropbox service

func (*Service) Changes

func (s *Service) Changes() ([]*basefs.Change, error)

Changes dropbox longpool changes

func (*Service) Create

func (s *Service) Create(parent *basefs.File, name string, isDir bool) (*basefs.File, error)

Create file implementation

func (*Service) Delete

func (s *Service) Delete(file *basefs.File) error

Delete deletes a file entry (including Dir)

func (*Service) DownloadTo

func (s *Service) DownloadTo(w io.Writer, file *basefs.File) error

DownloadTo implementation

func (*Service) ListAll

func (s *Service) ListAll() ([]*basefs.File, error)

ListAll implementation

func (*Service) Move

func (s *Service) Move(file *basefs.File, newParent *basefs.File, name string) (*basefs.File, error)

Move and Rename file implementation

func (*Service) StatFS

func (s *Service) StatFS(sfs *fuseops.StatFSOp) error

StatFS loads space usage from service into fuseops struct {lpf} -- 10/06/2018

func (*Service) Upload

func (s *Service) Upload(reader io.Reader, file *basefs.File) (*basefs.File, error)

Upload file implementation

Jump to

Keyboard shortcuts

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