view

package
v0.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register added in v0.9.0

func Register(fsys fs.FS, patterns ...string) func(ctx context.Context) error

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) Execute added in v0.11.2

func (vh *ViewHandler) Execute(ctx context.Context, w io.Writer) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL