Documentation ¶
Index ¶
- Constants
- type Config
- type CorsCfg
- type FS
- func (f FS) Mkdir(ctx context.Context, name string, perm os.FileMode) (err error)
- func (f FS) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (file webdav.File, err error)
- func (f FS) RemoveAll(ctx context.Context, name string) (err error)
- func (f FS) Rename(ctx context.Context, oldName, newName string) (err error)
- func (f FS) Stat(ctx context.Context, name string) (fi os.FileInfo, err error)
- type FSGenerator
- type NoSniffFileInfo
- type Rule
- type User
- type WebDavDir
- type WebDavFS
- type WebDavFile
Constants ¶
View Source
const MIMEDefault = "application/octet-stream"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CorsCfg ¶
type CorsCfg struct { Enabled bool Credentials bool AllowedHeaders []string AllowedHosts []string AllowedMethods []string ExposedHeaders []string }
CorsCfg is the CORS config.
type FS ¶ added in v4.1.2
type FS struct { Scope string FS FSGenerator Options map[string]string }
type FSGenerator ¶ added in v4.1.2
type FSGenerator func(scope string, options map[string]string) webdav.FileSystem
type NoSniffFileInfo ¶
NoSniffFileInfo wraps any generic FileInfo interface and bypasses mime type sniffing.
func (NoSniffFileInfo) ContentType ¶
func (w NoSniffFileInfo) ContentType(ctx context.Context) (contentType string, err error)
type User ¶
type User struct { Username string Password string Scope string Modify bool Rules []*Rule Handler *webdav.Handler }
User contains the settings of each user.
Click to show internal directories.
Click to hide internal directories.