Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
Register registers routes with the router.
Types ¶
type Route ¶
Route describes an API endpoint.
func HTTP ¶
func HTTP(pattern string, handler http.HandlerFunc) Route
HTTP creates a raw HTTP handler route.
func RPC ¶
func RPC[T, U any](path string, handler RpcHandler[T, U]) Route
RPC creates a typed RPC endpoint (POST, JSON request/response).
type ValidationError ¶
type ValidationError struct {
Errors []string
}
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Source Files
¶
- errors.go
- health.go
- routes.go
- rpc.go
Click to show internal directories.
Click to hide internal directories.