Documentation
¶
Index ¶
- type ByID
- type Dav
- type Server
- func (s *Server) AddDav(w http.ResponseWriter, req *http.Request)
- func (s *Server) DeleteDav(w http.ResponseWriter, req *http.Request)
- func (s *Server) LoadDavs() error
- func (s *Server) ProcessDavs(w http.ResponseWriter, req *http.Request)
- func (s *Server) SendDavs(w http.ResponseWriter, req *http.Request)
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type WebdavAug
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dav ¶
type Dav struct {
ID int `json:"id"`
Host string `json:"host"` // to match against request Host header
Root string `json:"root"` // the file system directory to serve the webdav from
Writable bool `json:"writable,omitempty"` // whether if the webdav is writable (default to read only)
Name string `json:"name,omitempty"` // name of the file service
Icon string `json:"icon,omitempty"` // icon to display
Color string `json:"color,omitempty"` // icon's color
Secured bool `json:"secured"` // true if the handler is secured with auth
Roles []string `json:"roles,omitempty"` // Roles allowed to access the file service
EncryptionPassphrase string `json:"passphrase,omitempty"` // passphrase to encrypt data
UsedGB uint64 `json:"usedgb,omitempty"`
TotalGB uint64 `json:"totalgb,omitempty"`
}
Dav represents a webdav file service
type Server ¶
type Server struct {
Mu sync.RWMutex // guards the fields below
Davs []*dav
// contains filtered or unexported fields
}
Server implements an http.Handler that acts as an augmented webdav server
func (*Server) AddDav ¶
func (s *Server) AddDav(w http.ResponseWriter, req *http.Request)
AddDav adds an dav
func (*Server) DeleteDav ¶
func (s *Server) DeleteDav(w http.ResponseWriter, req *http.Request)
DeleteDav adds an dav
func (*Server) LoadDavs ¶
LoadDavs tests whether file has been modified since its last invocation and, if so, loads the dav set from file.
func (*Server) ProcessDavs ¶
func (s *Server) ProcessDavs(w http.ResponseWriter, req *http.Request)
ProcessDavs processes davs regarding of HTTP method
type WebdavAug ¶
type WebdavAug struct {
// contains filtered or unexported fields
}
WebdavAug represents an augmented webdav which enable download of directories as streamed zip files
func NewWebDavAug ¶
NewWebDavAug create an initialized WebdavAug instance
Click to show internal directories.
Click to hide internal directories.