Documentation ¶
Overview ¶
package webapp provides shared functionality for building web applications on top of the ikuzo APIs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStaticHandler ¶
func NewStaticHandler(files fs.FS) http.HandlerFunc
NewStaticHandler receives an fs.FS (like embed.FS) and returns a http.HandlerFunc. The main purpose of this handler is to support embed.Fs static files with proper cache control. Without this wrapper the static content is never cached.
Types ¶
type StaticFSWrapper ¶
type StaticFSWrapper struct { http.FileSystem FixedModTime time.Time }
type StaticFileInfoWrapper ¶
func (*StaticFileInfoWrapper) ModTime ¶
func (f *StaticFileInfoWrapper) ModTime() time.Time
type StaticFileWrapper ¶
Click to show internal directories.
Click to hide internal directories.