Documentation ¶
Index ¶
- func IsExistError(err error) bool
- func IsNotExistError(err error) bool
- type ExistError
- type MetaData
- type NotExistError
- type StorageProvider
- func (sp *StorageProvider) Copy(from, to string) error
- func (sp *StorageProvider) CreateCol(path string, recursive bool) error
- func (sp *StorageProvider) GetFile(path string) (io.Reader, error)
- func (sp *StorageProvider) PutFile(path string, r io.Reader, size int64) error
- func (sp *StorageProvider) Remove(path string, recursive bool) error
- func (sp *StorageProvider) Rename(from, to string) error
- func (sp *StorageProvider) Stat(path string, children bool) (*MetaData, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsExistError ¶
func IsNotExistError ¶
Types ¶
type ExistError ¶
func (*ExistError) Error ¶
func (e *ExistError) Error() string
type MetaData ¶
type MetaData struct { Id string `json:"id"` Path string `json:"path"` Size int64 `json:"size"` IsCol bool `json:"isCol"` MimeType string `json:"mimeType"` Checksum string `json:"checksum"` ChecksumType string `json:"checksumType"` Modified int64 `json:"modified"` ETag string `json:"etag"` Children []*MetaData `json:"children"` Extra interface{} `json:"extra"` // maybe to save xattrs or custom user data }
type NotExistError ¶
func (*NotExistError) Error ¶
func (e *NotExistError) Error() string
type StorageProvider ¶
type StorageProvider struct {
// contains filtered or unexported fields
}
func NewStorageProvider ¶
func NewStorageProvider(rootDataDir, rootTempDir string) (*StorageProvider, error)
func (*StorageProvider) Copy ¶
func (sp *StorageProvider) Copy(from, to string) error
func (*StorageProvider) CreateCol ¶
func (sp *StorageProvider) CreateCol(path string, recursive bool) error
func (*StorageProvider) GetFile ¶
func (sp *StorageProvider) GetFile(path string) (io.Reader, error)
func (*StorageProvider) Remove ¶
func (sp *StorageProvider) Remove(path string, recursive bool) error
Delete removed the resource identified by the id param or it returns error in case of failure.
func (*StorageProvider) Rename ¶
func (sp *StorageProvider) Rename(from, to string) error
Click to show internal directories.
Click to hide internal directories.