Documentation
¶
Overview ¶
Package web 提供 HuffZip 的 Web 界面服务
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
FileStore 内存临时文件存储,带 TTL 自动清理
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler Web 请求处理器
func NewHandler ¶
NewHandler 创建处理器
func (*Handler) HandleCompress ¶
func (h *Handler) HandleCompress(w http.ResponseWriter, r *http.Request)
HandleCompress 处理压缩请求,返回 HTML 片段
func (*Handler) HandleDecompress ¶
func (h *Handler) HandleDecompress(w http.ResponseWriter, r *http.Request)
HandleDecompress 处理解压请求,返回 HTML 片段
func (*Handler) HandleDownload ¶
func (h *Handler) HandleDownload(w http.ResponseWriter, r *http.Request)
HandleDownload 处理文件下载
func (*Handler) HandleHome ¶
func (h *Handler) HandleHome(w http.ResponseWriter, r *http.Request)
HandleHome 渲染首页(完整页面)
Click to show internal directories.
Click to hide internal directories.