Documentation ¶
Overview ¶
Package dav provides a REST gateway to communicate with pydio backend via the webdav protocol.
Index ¶
- Variables
- func GetHandler(ctx context.Context, davPrefix, routerPrefix string) (http.Handler, nodes.Handler)
- func NewMemLS() webdav.LockSystem
- func RouterWithOptionalPrefix(runtime context.Context, s ...string) nodes.Handler
- type File
- func (f *File) Close() error
- func (f *File) Read(p []byte) (int, error)
- func (f *File) ReadFrom(r io.Reader) (n int64, err error)
- func (f *File) Readdir(count int) ([]os.FileInfo, error)
- func (f *File) Seek(offset int64, whence int) (int64, error)
- func (f *File) Stat() (os.FileInfo, error)
- func (f *File) Write(p []byte) (int, error)
- 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 ValidUser
Constants ¶
This section is empty.
Variables ¶
var (
MultipartSize int64 = 20 * 1024 * 1024
)
Functions ¶
func GetHandler ¶ added in v4.3.2
GetHandler is public to let external package spinning a DAV http handler
func NewMemLS ¶ added in v4.2.2
func NewMemLS() webdav.LockSystem
NewMemLS returns a new in-memory LockSystem.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File implements the webdav.File interface and translates various file accesses into object client PutObject / GetObject calls.
func (*File) Read ¶
Read reads the requested number of bytes starting at the internal cursor. It updates the cursor afterward.
func (*File) ReadFrom ¶
ReadFrom bypasses the usual Reader interface to implement multipart uploads to the minio server, rather than using the default Write method that is called by webdav via io.Copy. It enables among others the definition of a part size that is more appropriate than the default 32K used by io.COPY
type FileSystem ¶
type FileSystem struct { Debug bool Router nodes.Handler // contains filtered or unexported fields }
FileSystem is the pydio specific implementation of the generic webdav.FileSystem interface It adds among others a reference to the Router and a mutex
func (*FileSystem) OpenFile ¶
func (fs *FileSystem) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error)
OpenFile is called before a put or a simple get to retrieve a given file
func (*FileSystem) RemoveAll ¶
func (fs *FileSystem) RemoveAll(ctx context.Context, name string) error
RemoveAll deletes all resources starting at the given path