Documentation ¶
Overview ¶
How to Use //go:embed https://blog.carlmjohnson.net/post/2021/how-to-use-go-embed/
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFileSystem ¶
func GetHttpFileSystem ¶
Types ¶
type FiberServer ¶
type FiberServer struct { App *fiber.App TemplateDataProviders map[string]TemplateDataProviderFn // contains filtered or unexported fields }
func NewFiberServer ¶
func NewFiberServer(viewsFolder string, staticFolder string, listenPort int) *FiberServer
func (*FiberServer) AddTemplateDataProvider ¶
func (s *FiberServer) AddTemplateDataProvider(path string, callback TemplateDataProviderFn) error
func (*FiberServer) GetTemplateDataProvider ¶
func (s *FiberServer) GetTemplateDataProvider(path string) TemplateDataProviderFn
type HttpHandlerFuncWrapper ¶
type HttpHandlerFuncWrapper struct {
// contains filtered or unexported fields
}
HttpHandlerFuncWrapper allow tu use a http.HandleFund as a http.Handler
func NewHttpHandlerFuncWrapper ¶
func NewHttpHandlerFuncWrapper(fn func(http.ResponseWriter, *http.Request)) *HttpHandlerFuncWrapper
func (*HttpHandlerFuncWrapper) ServeHTTP ¶
func (h *HttpHandlerFuncWrapper) ServeHTTP(w http.ResponseWriter, r *http.Request)
type TemplateDataProviderFn ¶
type TemplateDataProviderFn func(c *fiber.Ctx) (fiber.Map, error)
Click to show internal directories.
Click to hide internal directories.