Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnyModelRoute ¶
type AnyModelRoute interface {
Adapter() path.AnyAdapter
Handle(w http.ResponseWriter, r *http.Request, a any, sess *instance.Session, opt instance.Options) (Res, bool)
}
AnyModelRoute is the internal representation of a registered page model.
func NewModelRoute ¶
func NewModelRoute[M any](a path.Adapter[M], h Handler[M]) AnyModelRoute
NewModelRoute creates a model-backed route from a path adapter and handler.
type InstanceCreationError ¶
type InstanceCreationError struct{}
func (InstanceCreationError) Error ¶
func (i InstanceCreationError) Error() string
type Res ¶
type Res struct {
// contains filtered or unexported fields
}
Res describes the result of handling a registered model route.
func ResRedirect ¶
ResRedirect returns a Res that redirects to model.
func ResReroute ¶
ResReroute returns a Res that reroutes to model on the server.
func (Res) Instance ¶
func (r Res) Instance() (instance.AnyInstance, bool)
Instance returns the created page instance, if this response rendered one.
Click to show internal directories.
Click to hide internal directories.