mvc

package
v1.255.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: MIT Imports: 9 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.

Types

type Controller

type Controller func(ctx context.Context) (*View, Model)

Controller for mvc.

type Model added in v1.255.0

type Model any

Model for mvc.

type View

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

View for mvc.

func NewView

func NewView(fs fs.FS, path string) *View

View from fs with path.

Jump to

Keyboard shortcuts

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