Documentation ¶
Overview ¶
Swift interface
Index ¶
- func NewFs(name, root string) (fs.Fs, error)
- type FsObjectSwift
- func (o *FsObjectSwift) Fs() fs.Fs
- func (o *FsObjectSwift) Md5sum() (string, error)
- func (o *FsObjectSwift) ModTime() time.Time
- func (o *FsObjectSwift) Open() (in io.ReadCloser, err error)
- func (o *FsObjectSwift) Remote() string
- func (o *FsObjectSwift) Remove() error
- func (o *FsObjectSwift) SetModTime(modTime time.Time)
- func (o *FsObjectSwift) Size() int64
- func (o *FsObjectSwift) Storable() bool
- func (o *FsObjectSwift) String() string
- func (o *FsObjectSwift) Update(in io.Reader, modTime time.Time, size int64) error
- type FsSwift
- func (f *FsSwift) Copy(src fs.Object, remote string) (fs.Object, error)
- func (f *FsSwift) List() fs.ObjectsChan
- func (f *FsSwift) ListDir() fs.DirChan
- func (f *FsSwift) Mkdir() error
- func (f *FsSwift) Name() string
- func (f *FsSwift) NewFsObject(remote string) fs.Object
- func (fs *FsSwift) Precision() time.Duration
- func (f *FsSwift) Put(in io.Reader, remote string, modTime time.Time, size int64) (fs.Object, error)
- func (f *FsSwift) Rmdir() error
- func (f *FsSwift) Root() string
- func (f *FsSwift) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FsObjectSwift ¶
type FsObjectSwift struct {
// contains filtered or unexported fields
}
FsObjectSwift describes a swift object
Will definitely have info but maybe not meta
func (*FsObjectSwift) Md5sum ¶
func (o *FsObjectSwift) Md5sum() (string, error)
Md5sum returns the Md5sum of an object returning a lowercase hex string
func (*FsObjectSwift) ModTime ¶
func (o *FsObjectSwift) ModTime() time.Time
ModTime returns the modification time of the object
It attempts to read the objects mtime and if that isn't present the LastModified returned in the http headers
func (*FsObjectSwift) Open ¶
func (o *FsObjectSwift) Open() (in io.ReadCloser, err error)
Open an object for read
func (*FsObjectSwift) SetModTime ¶
func (o *FsObjectSwift) SetModTime(modTime time.Time)
Sets the modification time of the local fs object
func (*FsObjectSwift) Size ¶
func (o *FsObjectSwift) Size() int64
Size returns the size of an object in bytes
type FsSwift ¶
type FsSwift struct {
// contains filtered or unexported fields
}
FsSwift represents a remote swift server
func (*FsSwift) Copy ¶
Copy src to this remote using server side copy operations.
This is stored with the remote path given ¶
It returns the destination Object and a possible error ¶
Will only be called if src.Fs().Name() == f.Name()
If it isn't possible then return fs.ErrorCantCopy
func (*FsSwift) List ¶
func (f *FsSwift) List() fs.ObjectsChan
Walk the path returning a channel of FsObjects
func (*FsSwift) Put ¶
func (f *FsSwift) Put(in io.Reader, remote string, modTime time.Time, size int64) (fs.Object, error)
Put the object into the container
Copy the reader in to the new object which is returned ¶
The new object may have been created if an error is returned