Documentation
¶
Index ¶
- type FileSystem
- func (f *FileSystem) Delete(path string) error
- func (f *FileSystem) Get(path string) (*os.File, error)
- func (f *FileSystem) GetEndpoint() string
- func (f *FileSystem) GetFullPath(path string) string
- func (f *FileSystem) GetStream(path string) (io.ReadCloser, error)
- func (f *FileSystem) GetURL(path string) (url string, err error)
- func (f *FileSystem) List(path string) ([]*Object, error)
- func (f *FileSystem) Put(path string, reader io.Reader) (*Object, error)
- func (f *FileSystem) Symlink(target string, name string) (err error)
- type Object
- type Storage
- type Symlinker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileSystem ¶
type FileSystem struct {
Base string
}
FileSystem file system storage
func (*FileSystem) Get ¶
func (f *FileSystem) Get(path string) (*os.File, error)
Get receive file with given path
func (*FileSystem) GetEndpoint ¶
func (f *FileSystem) GetEndpoint() string
GetEndpoint get endpoint, FileSystem's endpoint is /
func (*FileSystem) GetFullPath ¶
func (f *FileSystem) GetFullPath(path string) string
GetFullPath get full path from absolute/relative path
func (*FileSystem) GetStream ¶
func (f *FileSystem) GetStream(path string) (io.ReadCloser, error)
GetStream get file as stream
func (*FileSystem) GetURL ¶
func (f *FileSystem) GetURL(path string) (url string, err error)
GetURL get public accessible URL
func (*FileSystem) List ¶
func (f *FileSystem) List(path string) ([]*Object, error)
List list all objects under current path
type Storage ¶
type Storage interface {
Get(path string) (*os.File, error)
GetStream(path string) (io.ReadCloser, error)
Put(path string, reader io.Reader) (*Object, error)
Delete(path string) error
List(path string) ([]*Object, error)
GetURL(path string) (string, error)
GetEndpoint() string
}
Storage define common API to operate storage
type Symlinker ¶
type Symlinker interface {
Storage
// Symlink create symbolic link from name to target.
// If symbolic link creation isn't supported, return ErrSymlinkNotSupported.
Symlink(target string, name string) (err error)
}
StorageLinker is an Storage interface including methods to create symbolic link.
Click to show internal directories.
Click to hide internal directories.