mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-08 19:22:57 +00:00

Former-commit-id: 54b88552d11f2151a165dba9debb4657dfa56cf8 [formerly 0ce53651a8e9660f9d5f977295f553b5b1d1e93a] [formerly 7ebca3a8896222091c95af86a9cf1d12550b8b76 [formerly 174330929ad7231b95b30acb98ad2033d697590f]] Former-commit-id: 993d0cdb239f9969587d13a11ee8469fa8b91287 [formerly c22c911f944dd8d6597ab95589842d3c68d34869] Former-commit-id: 44ed259fe50a085e8bcace3f1f14caafec97ce66
24 lines
586 B
Go
24 lines
586 B
Go
package filemanager
|
|
|
|
import "net/http"
|
|
|
|
// StaticGen is a static website generator.
|
|
type StaticGen interface {
|
|
SettingsPath() string
|
|
Name() string
|
|
Setup() error
|
|
|
|
Hook(c *Context, w http.ResponseWriter, r *http.Request) (int, error)
|
|
Preview(c *Context, w http.ResponseWriter, r *http.Request) (int, error)
|
|
Publish(c *Context, w http.ResponseWriter, r *http.Request) (int, error)
|
|
}
|
|
|
|
// Context contains the needed information to make handlers work.
|
|
type Context struct {
|
|
*FileManager
|
|
User *User
|
|
File *File
|
|
// On API handlers, Router is the APi handler we want.
|
|
Router string
|
|
}
|