mvc

package
v1.253.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(mu *http.ServeMux)

Register for mvc.

func Route

func Route(path string, controller Controller)

Route the path with controller for mvc.

func View

func View(fs fs.FS, path string) *template.Template

View from fs with path.

Types

type Controller

type Controller func(ctx context.Context) *Result

Controller for mvc.

type Result added in v1.250.0

type Result struct {
	// contains filtered or unexported fields
}

Result from the controller.

func NewResult added in v1.250.0

func NewResult(model any, view *template.Template) *Result

NewResult for mvc.

Jump to

Keyboard shortcuts

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