Documentation ¶
Overview ¶
Package serve deals with serving objects over HTTP
Index ¶
- func Error(what interface{}, w http.ResponseWriter, text string, err error)
- func Object(w http.ResponseWriter, r *http.Request, o fs.Object)
- type Crumb
- type DirEntry
- type Directory
- func (d *Directory) AddEntry(remote string, isDir bool)
- func (d *Directory) AddHTMLEntry(remote string, isDir bool, size int64, modTime time.Time)
- func (d *Directory) ProcessQueryParams(sortParm string, orderParm string) *Directory
- func (d *Directory) Serve(w http.ResponseWriter, r *http.Request)
- func (d *Directory) SetQuery(queryParams url.Values) *Directory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DirEntry ¶
type DirEntry struct { URL string Leaf string IsDir bool Size int64 ModTime time.Time // contains filtered or unexported fields }
DirEntry is a directory entry
type Directory ¶
type Directory struct { DirRemote string Title string Name string Entries []DirEntry Query string HTMLTemplate *template.Template Breadcrumb []Crumb Sort string Order string }
Directory represents a directory
func NewDirectory ¶
NewDirectory makes an empty Directory
func (*Directory) AddHTMLEntry ¶ added in v1.52.0
AddHTMLEntry adds an entry to that directory
func (*Directory) ProcessQueryParams ¶ added in v1.52.0
ProcessQueryParams takes and sorts/orders based on the request sort/order parameters and default is namedirfirst/asc
Click to show internal directories.
Click to hide internal directories.