Documentation ¶
Overview ¶
Package server contains the server and the HTTP endpoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadHandler ¶
type DownloadHandler struct {
// contains filtered or unexported fields
}
func NewDownloadHandler ¶
func NewDownloadHandler(diskPath, servePath string, logger *zap.Logger) *DownloadHandler
NewDownloadHandler creates a new DownloadHandler
func (DownloadHandler) ServeHTTP ¶
func (dh DownloadHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP for the DownloadHandler, mostly checks if the file exists, and then routes it based on method.
type FileInfoHandler ¶
type FileInfoHandler struct {
// contains filtered or unexported fields
}
func NewFileInfoHandler ¶
func NewFileInfoHandler(registry *fs.Registry, logger *zap.Logger) *FileInfoHandler
func (*FileInfoHandler) ServeHTTP ¶
func (h *FileInfoHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP for the FileInfoHandler, which simply serves all the files in the cache.
Click to show internal directories.
Click to hide internal directories.