Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseTemplate ¶
ParseTemplate for mvc.
func Route ¶
func Route[Res any](path string, view *View, controller Controller[Res])
Route the template with the path.
func WriteError ¶ added in v1.247.0
WriteError for mvc.
Types ¶
type Controller ¶
type Controller[Model any] func(ctx context.Context, req *http.Request, res http.ResponseWriter) (*Model, error)
Controller for mvc.
var NoController Controller[any]
NoController for mvc.
type View ¶
type View struct {
// contains filtered or unexported fields
}
View used for routes.
func NewSuccessView ¶ added in v1.248.0
NewSuccessView for routes in mvc.
func (*View) ExecuteFailure ¶
ExecuteFailure for template.
Click to show internal directories.
Click to hide internal directories.