Documentation
¶
Index ¶
- type ZipLoader
- func (zl *ZipLoader) Count() int
- func (zl *ZipLoader) Exists(path string) bool
- func (zl *ZipLoader) Fetch(ctx context.Context, url string) error
- func (zl *ZipLoader) Get(path string) (*static.FileInfo, io.ReadCloser)
- func (zl *ZipLoader) Load() (exists bool, err error)
- func (zl *ZipLoader) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (zl *ZipLoader) Update(r io.Reader, mtime time.Time) error
- func (zl *ZipLoader) When() time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZipLoader ¶
type ZipLoader struct { Local string // contains filtered or unexported fields }
ZipLoader allows serving website content from a local zip file. Local should be set as the local filename.
func (*ZipLoader) Fetch ¶ added in v0.1.2
Fetch fetches the zip at the given URL and swaps it in-place, replacing the current file.
func (*ZipLoader) ServeHTTP ¶ added in v0.1.2
func (zl *ZipLoader) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP allows uploading a zip file directly. This just accepts the file blindly.
Click to show internal directories.
Click to hide internal directories.