Documentation ¶
Index ¶
- type CS3
- func (cs3 *CS3) Backend() string
- func (cs3 *CS3) CreateSymlink(ctx context.Context, oldname, newname string) error
- func (cs3 *CS3) Delete(ctx context.Context, path string) error
- func (cs3 *CS3) Init(ctx context.Context, spaceid string) (err error)
- func (cs3 *CS3) MakeDirIfNotExist(ctx context.Context, folder string) error
- func (cs3 *CS3) ReadDir(ctx context.Context, path string) ([]string, error)
- func (cs3 *CS3) ResolveSymlink(ctx context.Context, name string) (string, error)
- func (cs3 *CS3) SimpleDownload(ctx context.Context, downloadpath string) (content []byte, err error)
- func (cs3 *CS3) SimpleUpload(ctx context.Context, uploadpath string, content []byte) error
- type Disk
- func (disk *Disk) Backend() string
- func (disk *Disk) CreateSymlink(_ context.Context, oldname, newname string) error
- func (disk *Disk) Delete(_ context.Context, path string) error
- func (disk *Disk) Init(_ context.Context, _ string) (err error)
- func (disk *Disk) MakeDirIfNotExist(_ context.Context, path string) error
- func (disk *Disk) ReadDir(_ context.Context, p string) ([]string, error)
- func (disk *Disk) ResolveSymlink(_ context.Context, path string) (string, error)
- func (disk *Disk) SimpleDownload(_ context.Context, downloadpath string) ([]byte, error)
- func (disk *Disk) SimpleUpload(_ context.Context, uploadpath string, content []byte) error
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CS3 ¶
type CS3 struct { SpaceRoot *provider.ResourceId // contains filtered or unexported fields }
CS3 represents a metadata storage with a cs3 storage backend
func (*CS3) CreateSymlink ¶
CreateSymlink creates a symlink
func (*CS3) MakeDirIfNotExist ¶
MakeDirIfNotExist will create a root node in the metadata storage. Requires an authenticated context.
func (*CS3) ResolveSymlink ¶
ResolveSymlink resolves a symlink
type Disk ¶
type Disk struct {
// contains filtered or unexported fields
}
Disk represents a disk metadata storage
func (*Disk) CreateSymlink ¶
CreateSymlink creates a symlink
func (*Disk) MakeDirIfNotExist ¶
MakeDirIfNotExist will create a root node in the metadata storage. Requires an authenticated context.
func (*Disk) ResolveSymlink ¶
ResolveSymlink resolves a symlink
func (*Disk) SimpleDownload ¶
SimpleDownload reads a file from disk
type Storage ¶
type Storage interface { Backend() string Init(ctx context.Context, name string) (err error) SimpleUpload(ctx context.Context, uploadpath string, content []byte) error SimpleDownload(ctx context.Context, path string) ([]byte, error) Delete(ctx context.Context, path string) error ReadDir(ctx context.Context, path string) ([]string, error) CreateSymlink(ctx context.Context, oldname, newname string) error ResolveSymlink(ctx context.Context, name string) (string, error) MakeDirIfNotExist(ctx context.Context, name string) error }
Storage is the interface to maintain metadata in a storage
func NewCS3Storage ¶
func NewCS3Storage(gwAddr, providerAddr, serviceUserID, serviceUserIDP, machineAuthAPIKey string) (s Storage, err error)
NewCS3Storage returns a new cs3 storage instance
func NewDiskStorage ¶
NewDiskStorage returns a new disk storage instance