Documentation
¶
Index ¶
- func Middleware(store Store) webdav.Middleware
- type FileSystem
- func (fs *FileSystem) Mkdir(ctx context.Context, name string, perm os.FileMode) error
- func (fs *FileSystem) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error)
- func (fs *FileSystem) RemoveAll(ctx context.Context, name string) error
- func (fs *FileSystem) Rename(ctx context.Context, oldName, newName string) error
- func (fs *FileSystem) Stat(ctx context.Context, name string) (os.FileInfo, error)
- type MemoryStore
- func (m *MemoryStore) Get(ctx context.Context, path string) (os.FileInfo, bool, error)
- func (m *MemoryStore) GetChildren(ctx context.Context, path string) ([]os.FileInfo, bool, error)
- func (m *MemoryStore) Invalidate(ctx context.Context, path string) error
- func (m *MemoryStore) InvalidateChildren(ctx context.Context, path string) error
- func (m *MemoryStore) Put(ctx context.Context, path string, info os.FileInfo) error
- func (m *MemoryStore) PutChildren(ctx context.Context, path string, children []os.FileInfo) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware(store Store) webdav.Middleware
Types ¶
type FileSystem ¶
type FileSystem struct {
// contains filtered or unexported fields
}
func NewFileSystem ¶
func NewFileSystem(backend webdav.FileSystem, store Store) *FileSystem
func (*FileSystem) RemoveAll ¶
func (fs *FileSystem) RemoveAll(ctx context.Context, name string) error
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore(ttl time.Duration) *MemoryStore
func (*MemoryStore) GetChildren ¶
func (*MemoryStore) Invalidate ¶
func (m *MemoryStore) Invalidate(ctx context.Context, path string) error
func (*MemoryStore) InvalidateChildren ¶
func (m *MemoryStore) InvalidateChildren(ctx context.Context, path string) error
func (*MemoryStore) PutChildren ¶
type Store ¶
type Store interface {
Get(ctx context.Context, path string) (os.FileInfo, bool, error)
Put(ctx context.Context, path string, info os.FileInfo) error
Invalidate(ctx context.Context, path string) error
GetChildren(ctx context.Context, path string) ([]os.FileInfo, bool, error)
PutChildren(ctx context.Context, path string, children []os.FileInfo) error
InvalidateChildren(ctx context.Context, path string) error
}
Click to show internal directories.
Click to hide internal directories.