Documentation ¶
Index ¶
- func Register(fsys fs.FS, patterns ...string) func(ctx context.Context) error
- type ViewData
- type ViewHandler
- func (vh *ViewHandler) Bytes(ctx context.Context) ([]byte, error)
- func (vh *ViewHandler) BytesData(d *ViewData) ([]byte, error)
- func (vh *ViewHandler) Execute(ctx context.Context, w io.Writer) error
- func (vh *ViewHandler) ExecuteData(d *ViewData, w io.Writer) error
- func (vh *ViewHandler) Respond(w http.ResponseWriter, r *http.Request) error
- func (vh *ViewHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type ViewTemplate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ViewData ¶ added in v0.11.2
type ViewData struct { URL router.URLResolver `inject:""` Template *ViewTemplate `inject:""` }
type ViewHandler ¶ added in v0.11.2
type ViewHandler struct {
// contains filtered or unexported fields
}
func View ¶ added in v0.9.0
func View(file string, data any) *ViewHandler
func (*ViewHandler) Bytes ¶ added in v0.11.2
func (vh *ViewHandler) Bytes(ctx context.Context) ([]byte, error)
func (*ViewHandler) BytesData ¶ added in v0.13.0
func (vh *ViewHandler) BytesData(d *ViewData) ([]byte, error)
func (*ViewHandler) ExecuteData ¶ added in v0.11.2
func (vh *ViewHandler) ExecuteData(d *ViewData, w io.Writer) error
func (*ViewHandler) Respond ¶ added in v0.11.2
func (vh *ViewHandler) Respond(w http.ResponseWriter, r *http.Request) error
func (*ViewHandler) ServeHTTP ¶ added in v0.11.2
func (vh *ViewHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ViewTemplate ¶ added in v0.9.0
type ViewTemplate struct {
// contains filtered or unexported fields
}
func NewViewTemplate ¶ added in v0.9.0
func NewViewTemplate(fsys fs.FS, patterns ...string) *ViewTemplate
Click to show internal directories.
Click to hide internal directories.