rclone: github.com/ncw/rclone/backend/koofr Index | Files

package koofr

import "github.com/ncw/rclone/backend/koofr"

Index

Package Files

koofr.go

func NewFs Uses

func NewFs(name, root string, m configmap.Mapper) (ff fs.Fs, err error)

NewFs constructs a new filesystem given a root path and configuration options

type Fs Uses

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

A Fs is a representation of a remote Koofr Fs

func (*Fs) About Uses

func (f *Fs) About(ctx context.Context) (*fs.Usage, error)

About reports space usage (with a MB precision)

func (*Fs) Copy Uses

func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object, error)

Copy copies a remote Object to the given path

func (*Fs) DirMove Uses

func (f *Fs) DirMove(ctx context.Context, src fs.Fs, srcRemote, dstRemote string) error

DirMove moves a remote directory to the given path

func (*Fs) Features Uses

func (f *Fs) Features() *fs.Features

Features returns the optional features supported by this Fs

func (*Fs) Hashes Uses

func (f *Fs) Hashes() hash.Set

Hashes returns a set of hashes are Provided by the Fs

func (*Fs) List Uses

func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err error)

List returns a list of items in a directory

func (*Fs) Mkdir Uses

func (f *Fs) Mkdir(ctx context.Context, dir string) error

Mkdir creates a directory at the given remote path. Creates ancestors if necessary

func (*Fs) Move Uses

func (f *Fs) Move(ctx context.Context, src fs.Object, remote string) (fs.Object, error)

Move moves a remote Object to the given path

func (*Fs) Name Uses

func (f *Fs) Name() string

Name returns the name of the Fs

func (*Fs) NewObject Uses

func (f *Fs) NewObject(ctx context.Context, remote string) (obj fs.Object, err error)

NewObject creates a new remote Object for a given remote path

func (*Fs) Precision Uses

func (f *Fs) Precision() time.Duration

Precision denotes that setting modification times is not supported

func (f *Fs) PublicLink(ctx context.Context, remote string) (string, error)

PublicLink creates a public link to the remote path

func (*Fs) Purge Uses

func (f *Fs) Purge(ctx context.Context) error

Purge purges the complete Fs

func (*Fs) Put Uses

func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (obj fs.Object, err error)

Put updates a remote Object

func (*Fs) PutStream Uses

func (f *Fs) PutStream(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error)

PutStream updates a remote Object with a stream of unknown size

func (*Fs) Rmdir Uses

func (f *Fs) Rmdir(ctx context.Context, dir string) error

Rmdir removes an (empty) directory at the given remote path

func (*Fs) Root Uses

func (f *Fs) Root() string

Root returns the root path of the Fs

func (*Fs) String Uses

func (f *Fs) String() string

String returns a string representation of the Fs

type Object Uses

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

An Object on the remote Koofr Fs

func (*Object) Fs Uses

func (o *Object) Fs() fs.Info

Fs returns a reference to the Koofr Fs containing the Object

func (*Object) Hash Uses

func (o *Object) Hash(ctx context.Context, typ hash.Type) (string, error)

Hash returns an MD5 hash of the Object

func (*Object) ModTime Uses

func (o *Object) ModTime(ctx context.Context) time.Time

ModTime returns the modification time of the Object

func (*Object) Open Uses

func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (io.ReadCloser, error)

Open opens the Object for reading

func (*Object) Remote Uses

func (o *Object) Remote() string

Remote returns the remote path of the Object, relative to Fs root

func (*Object) Remove Uses

func (o *Object) Remove(ctx context.Context) error

Remove deletes the remote Object

func (*Object) SetModTime Uses

func (o *Object) SetModTime(ctx context.Context, mtime time.Time) error

SetModTime is not supported

func (*Object) Size Uses

func (o *Object) Size() int64

Size return the size of the Object in bytes

func (*Object) Storable Uses

func (o *Object) Storable() bool

Storable returns true if the Object is storable

func (*Object) String Uses

func (o *Object) String() string

String returns a string representation of the remote Object

func (*Object) Update Uses

func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error

Update updates the Object contents

type Options Uses

type Options struct {
    Endpoint string `config:"endpoint"`
    MountID  string `config:"mountid"`
    User     string `config:"user"`
    Password string `config:"password"`
}

Options represent the configuration of the Koofr backend

Package koofr imports 16 packages (graph) and is imported by 1 packages. Updated 2019-06-25. Refresh now. Tools for package owners.