dav

package
v2.2.6+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2021 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Overview

Package dav provides a REST gateway to communicate with pydio backend via the webdav protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func (*File) Close

func (f *File) Close() error

func (*File) Read

func (f *File) Read(p []byte) (int, error)

func (*File) ReadFrom

func (f *File) ReadFrom(r io.Reader) (n int64, err error)

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

func (*File) Readdir

func (f *File) Readdir(count int) ([]os.FileInfo, error)

func (*File) Seek

func (f *File) Seek(offset int64, whence int) (int64, error)

func (*File) Stat

func (f *File) Stat() (os.FileInfo, error)

func (*File) Write

func (f *File) Write(p []byte) (int, error)

Write is unused but left to respect Writer interface. This method is bypassed by io.Copy to use ReadFrom (see above)

type FileInfo

type FileInfo struct {
	// contains filtered or unexported fields
}

func (*FileInfo) IsDir

func (fi *FileInfo) IsDir() bool

func (*FileInfo) ModTime

func (fi *FileInfo) ModTime() time.Time

func (*FileInfo) Mode

func (fi *FileInfo) Mode() os.FileMode

func (*FileInfo) Name

func (fi *FileInfo) Name() string

func (*FileInfo) Size

func (fi *FileInfo) Size() int64

func (*FileInfo) String

func (fi *FileInfo) String() string

func (*FileInfo) Sys

func (fi *FileInfo) Sys() interface{}

type FileSystem

type FileSystem struct {
	Debug  bool
	Router *views.Router
	// 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) Mkdir

func (fs *FileSystem) Mkdir(ctx context.Context, name string, perm os.FileMode) error

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

func (*FileSystem) Rename

func (fs *FileSystem) Rename(ctx context.Context, oldName, newName string) error

func (*FileSystem) Stat

func (fs *FileSystem) Stat(ctx context.Context, name string) (os.FileInfo, error)

type ValidUser

type ValidUser struct {
	Hash      string
	Connexion time.Time
	Claims    claim.Claims
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL