Versions in this module Expand all Collapse all v4 v4.3.3 Jul 25, 2024 Changes in this version + const DefaultDebug + const DefaultModify + const DefaultNoSniff + const DefaultScope v4.3.2 Jul 22, 2024 v4.3.1 Jul 22, 2024 Changes in this version + const DefaultAddress + const DefaultAuth + const DefaultCert + const DefaultKey + const DefaultLogFormat + const DefaultPort + const DefaultPrefix + const DefaultTLS v4.3.0 Jul 21, 2024 Changes in this version + func NewHandler(c *Config) (http.Handler, error) + type CORS struct + AllowedHeaders []string + AllowedHosts []string + AllowedMethods []string + Credentials bool + Enabled bool + ExposedHeaders []string type Config + Address string + CORS CORS + Cert string + Key string + Port int + Prefix string + TLS bool + func ParseConfig(filename string, flags *pflag.FlagSet) (*Config, error) + func (c *Config) Validate() error + type Dir struct + func (d Dir) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error) + func (d Dir) Stat(ctx context.Context, name string) (os.FileInfo, error) + type Handler struct + func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Permissions struct + Modify bool + Rules []*Rule + Scope string + func (p *Permissions) Validate() error + func (p Permissions) Allowed(r *http.Request) bool type Rule + func (r *Rule) Matches(path string) bool + func (r *Rule) Validate() error type User + func (u *User) Validate() error v4.2.0 Jan 18, 2022 Changes in this version type Config + Debug bool v4.1.1 Oct 19, 2021 Changes in this version + type Config struct + Auth bool + Cors CorsCfg + LogFormat string + NoSniff bool + Users map[string]*User + func (c *Config) ServeHTTP(w http.ResponseWriter, r *http.Request) + type CorsCfg struct + AllowedHeaders []string + AllowedHosts []string + AllowedMethods []string + Credentials bool + Enabled bool + ExposedHeaders []string + type NoSniffFileInfo struct + func (w NoSniffFileInfo) ContentType(ctx context.Context) (contentType string, err error) + type Rule struct + Allow bool + Modify bool + Path string + Regex bool + Regexp *regexp.Regexp + type User struct + Handler *webdav.Handler + Modify bool + Password string + Rules []*Rule + Scope string + Username string + func (u User) Allowed(url string, noModification bool) bool + type WebDavDir struct + NoSniff bool + func (d WebDavDir) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error) + func (d WebDavDir) Stat(ctx context.Context, name string) (os.FileInfo, error) + type WebDavFile struct + func (f WebDavFile) Readdir(count int) (fis []os.FileInfo, err error) + func (f WebDavFile) Stat() (os.FileInfo, error) Other modules containing this package github.com/hacdias/webdav/v3 github.com/hacdias/webdav/v5