Documentation
¶
Overview ¶
Package handlers provides the functionalities for file web server hosting
Index ¶
- type CacheItem
- type File
- type Handlers
- func (h *Handlers) DownloadFileHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetAssets(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetFileUpload(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) HandleConnect(u *websocket.Upgrader, w http.ResponseWriter, r *http.Request)
- func (h *Handlers) IndexHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) ViewFileHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) WatchFiles()
- type IndexHTML
- type IndexHTMLConfig
- type ViewHTML
- type Visitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handlers ¶
type Handlers struct {
Hosts []string
// contains filtered or unexported fields
}
func NewHandlers ¶
func NewHandlers( logCh chan models.ServerLog, dir string, serverConfig *config.ServerConfig, notifConfig *config.NotifConfig, ) *Handlers
func (*Handlers) DownloadFileHandler ¶
func (h *Handlers) DownloadFileHandler(w http.ResponseWriter, r *http.Request)
func (*Handlers) GetFileUpload ¶
func (h *Handlers) GetFileUpload(w http.ResponseWriter, r *http.Request)
func (*Handlers) HandleConnect ¶
func (*Handlers) IndexHandler ¶
func (h *Handlers) IndexHandler(w http.ResponseWriter, r *http.Request)
func (*Handlers) ViewFileHandler ¶
func (h *Handlers) ViewFileHandler(w http.ResponseWriter, r *http.Request)
func (*Handlers) WatchFiles ¶
func (h *Handlers) WatchFiles()
type IndexHTML ¶
type IndexHTML struct {
Files []File
CurrentPath string
Uid string
Hosts []string
ServerConfig IndexHTMLConfig
}
IndexHTML defines the data passed to the index.html template file
type IndexHTMLConfig ¶
Click to show internal directories.
Click to hide internal directories.