Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContractError ¶
ContractError allows handlers to return specific HTTP status codes and messages.
func NewError ¶
func NewError(status int, message string) ContractError
NewError creates a new ContractError with the specified status code and message.
type RouteMeta ¶
RouteMeta is an alias for meta.RouteMeta for backward compatibility.
func Mount ¶
func Mount(router *weedhttp.RouterGroup, name string, service any, middleware ...weedhttp.MiddlewareFunc) ([]RouteMeta, error)
Mount registers routes based on an interface definition. T must be an interface type. service must be an implementation of T. This allows true contract-driven design where the interface acts as the router contract.
Click to show internal directories.
Click to hide internal directories.