Documentation ¶
Index ¶
- Variables
- type Fs
- func (f *Fs) AddObject(o fs.Object)
- func (f *Fs) Features() *fs.Features
- func (f *Fs) Hashes() hash.Set
- func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err error)
- func (f *Fs) Mkdir(ctx context.Context, dir string) error
- func (f *Fs) Name() string
- func (f *Fs) NewObject(ctx context.Context, remote string) (fs.Object, error)
- func (f *Fs) Precision() time.Duration
- func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error)
- func (f *Fs) Rmdir(ctx context.Context, dir string) error
- func (f *Fs) Root() string
- func (f *Fs) SetHashes(hashes hash.Set)
- func (f *Fs) String() string
Constants ¶
This section is empty.
Variables ¶
var ErrNotImplemented = errors.New("not implemented")
ErrNotImplemented is returned by unimplemented methods
Functions ¶
This section is empty.
Types ¶
type Fs ¶
type Fs struct {
// contains filtered or unexported fields
}
Fs is a minimal mock Fs
func (*Fs) AddObject ¶
AddObject adds an Object for List to return Only works for the root for the moment
func (*Fs) List ¶
List the objects and directories in dir into entries. The entries can be returned in any order but should be for a complete directory.
dir should be "" to list the root, and should not have trailing slashes.
This should return ErrDirNotFound if the directory isn't found.
func (*Fs) Mkdir ¶
Mkdir makes the directory (container, bucket)
Shouldn't return an error if it already exists
func (*Fs) NewObject ¶
NewObject finds the Object at remote. If it can't be found it returns the error ErrorObjectNotFound.
func (*Fs) Put ¶
func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error)
Put in to the remote path with the modTime given of the given size
May create the object even if it returns an error - if so will return the object and the error, otherwise will return nil and the error
func (*Fs) Rmdir ¶
Rmdir removes the directory (container, bucket) if empty
Return an error if it doesn't exist or isn't empty