Documentation ¶
Index ¶
- type MegaStorage
- func (backend *MegaStorage) AvailableSpace() (uint64, error)
- func (backend *MegaStorage) Close() error
- func (backend *MegaStorage) CreatePath(path string) error
- func (backend *MegaStorage) DeleteFile(path string) error
- func (backend *MegaStorage) Description() string
- func (backend *MegaStorage) Location() string
- func (*MegaStorage) NewBackend(u url.URL) (knoxite.Backend, error)
- func (backend *MegaStorage) Protocols() []string
- func (backend *MegaStorage) ReadFile(path string) ([]byte, error)
- func (backend *MegaStorage) Stat(path string) (uint64, error)
- func (backend *MegaStorage) WriteFile(path string, data []byte) (size uint64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MegaStorage ¶
type MegaStorage struct { knoxite.StorageFilesystem // contains filtered or unexported fields }
MegaStorage stores data on a remote Mega.
func (*MegaStorage) AvailableSpace ¶
func (backend *MegaStorage) AvailableSpace() (uint64, error)
AvailableSpace returns the free space on this backend.
func (*MegaStorage) CreatePath ¶
func (backend *MegaStorage) CreatePath(path string) error
CreatePath creates a dir including all its parent dirs, when required.
func (*MegaStorage) DeleteFile ¶
func (backend *MegaStorage) DeleteFile(path string) error
DeleteFile deletes a file from mega.
func (*MegaStorage) Description ¶
func (backend *MegaStorage) Description() string
Description returns a user-friendly description for this backend.
func (*MegaStorage) Location ¶
func (backend *MegaStorage) Location() string
Location returns the type and location of the repository.
func (*MegaStorage) NewBackend ¶
NewBackend returns a MegaStorage backend.
func (*MegaStorage) Protocols ¶
func (backend *MegaStorage) Protocols() []string
Protocols returns the Protocol Schemes supported by this backend.
func (*MegaStorage) ReadFile ¶
func (backend *MegaStorage) ReadFile(path string) ([]byte, error)
ReadFile reads a file from mega.
Click to show internal directories.
Click to hide internal directories.