Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResponseSecurityHeadersFiber ¶
ResponseSecurityHeadersFiber sets the security headers for the response according to best practices
func ResponseSecurityHeadersStd ¶
func ResponseSecurityHeadersStd(w http.ResponseWriter)
Types ¶
type RendererFiber ¶
type RendererFiber struct {
// contains filtered or unexported fields
}
func NewRendererFiber ¶
func NewRendererFiber(reload bool, viewsfs embed.FS, extDir string, extension string) (*RendererFiber, error)
NewRendererFiber creates a new HTML renderer. It supports both embedded templates (in viewsfs) and external templates (in extDir). If reload is true, the templates are loaded from the directory specified in extDir. If reload is false, the templates are loaded from the embedded directory. viewsfs is the filesystem containing the views. extDir is the directory containing the external templates.
type RendererStd ¶
type RendererStd struct {
// contains filtered or unexported fields
}
func NewRendererStd ¶
func (*RendererStd) Render ¶
func (h *RendererStd) Render(w http.ResponseWriter, templateName string, data map[string]any, layout ...string) error
func (*RendererStd) RenderToBuffer ¶
Click to show internal directories.
Click to hide internal directories.