Documentation ¶
Index ¶
- type LocalStorage
- func (l *LocalStorage) Delete(name string) error
- func (l *LocalStorage) Exists(name string) (bool, error)
- func (l *LocalStorage) Open(name string) (Object, error)
- func (l *LocalStorage) Put(name string, r io.Reader) (int64, error)
- func (l *LocalStorage) Rename(oldName, newName string) error
- func (l *LocalStorage) Stat(name string) (fs.FileInfo, error)
- type Object
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalStorage ¶
type LocalStorage struct {
// contains filtered or unexported fields
}
LocalStorage is a storage implementation that stores objects on the local filesystem.
func NewLocalStorage ¶
func NewLocalStorage(root string) *LocalStorage
NewLocalStorage creates a new LocalStorage.
func (*LocalStorage) Delete ¶
func (l *LocalStorage) Delete(name string) error
Delete implements Storage.
func (*LocalStorage) Exists ¶
func (l *LocalStorage) Exists(name string) (bool, error)
Exists implements Storage.
func (*LocalStorage) Open ¶
func (l *LocalStorage) Open(name string) (Object, error)
Open implements Storage.
func (*LocalStorage) Rename ¶
func (l *LocalStorage) Rename(oldName, newName string) error
Rename implements Storage.
type Storage ¶
type Storage interface { Open(name string) (Object, error) Stat(name string) (fs.FileInfo, error) Put(name string, r io.Reader) (int64, error) Delete(name string) error Exists(name string) (bool, error) Rename(oldName, newName string) error }
Storage is an interface for storing and retrieving objects.
Click to show internal directories.
Click to hide internal directories.