Documentation ¶
Index ¶
- func AddDelimiterToPath(path string) string
- func DeleteObjectsWhere(folder Folder, confirm bool, filter func(object1 Object) bool) error
- func GetPathFromPrefix(prefix string) (bucket, server string, err error)
- func JoinPath(elem ...string) string
- func ParsePrefixAsURL(prefix string) (bucket, server string, err error)
- func RunFolderTest(storageFolder Folder, t *testing.T)
- type Error
- type Folder
- type LocalObject
- type Object
- type ObjectNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDelimiterToPath ¶
func DeleteObjectsWhere ¶
func GetPathFromPrefix ¶
TODO : unit tests
func ParsePrefixAsURL ¶
TODO : unit tests
func RunFolderTest ¶
Types ¶
type Folder ¶
type Folder interface { // Path should always ends with '/' GetPath() string // Should return objects with relative paths ListFolder() (objects []Object, subFolders []Folder, err error) // Delete object, if exists DeleteObjects(objectRelativePaths []string) error Exists(objectRelativePath string) (bool, error) // Returns handle to subfolder. Does not have to instantiate subfolder in any material form GetSubFolder(subFolderRelativePath string) Folder // Should return ObjectNotFoundError in case, there is no such object ReadObject(objectRelativePath string) (io.ReadCloser, error) PutObject(name string, content io.Reader) error }
type LocalObject ¶
type LocalObject struct {
// contains filtered or unexported fields
}
func NewLocalObject ¶
func NewLocalObject(name string, lastModified time.Time, size int64) *LocalObject
func (LocalObject) GetLastModified ¶
func (object LocalObject) GetLastModified() time.Time
func (LocalObject) GetName ¶
func (object LocalObject) GetName() string
func (LocalObject) GetSize ¶
func (object LocalObject) GetSize() int64
type Object ¶
func ListFolderRecursively ¶
type ObjectNotFoundError ¶
type ObjectNotFoundError struct {
// contains filtered or unexported fields
}
func NewObjectNotFoundError ¶
func NewObjectNotFoundError(path string) ObjectNotFoundError
func (ObjectNotFoundError) Error ¶
func (err ObjectNotFoundError) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.