Documentation
¶
Index ¶
- type HandlerFunc
- type MiddlewareFunc
- type NetHTTPApp
- type Route
- type RouteBuilder
- func (rb *RouteBuilder) DELETE(pattern string, handler HandlerFunc) *Route
- func (rb *RouteBuilder) GET(pattern string, handler HandlerFunc) *Route
- func (rb *RouteBuilder) Group(prefix string, items ...any) *RouteGroup
- func (rb *RouteBuilder) PATCH(pattern string, handler HandlerFunc) *Route
- func (rb *RouteBuilder) POST(pattern string, handler HandlerFunc) *Route
- func (rb *RouteBuilder) PUT(pattern string, handler HandlerFunc) *Route
- type RouteGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶
type HandlerFunc func(w http.ResponseWriter, r *http.Request)
HandlerFunc is the signature for route handlers
type MiddlewareFunc ¶
type MiddlewareFunc func(HandlerFunc) HandlerFunc
MiddlewareFunc wraps a handler with additional functionality
type NetHTTPApp ¶
type NetHTTPApp struct {
// contains filtered or unexported fields
}
App represents the Bold application
func NewApp ¶
func NewApp() *NetHTTPApp
func (*NetHTTPApp) Handler ¶
func (app *NetHTTPApp) Handler() http.Handler
Handler returns an http.Handler for the application
func (*NetHTTPApp) Listen ¶
func (app *NetHTTPApp) Listen(addr string) error
Listen starts the HTTP server
func (*NetHTTPApp) Routes ¶
func (app *NetHTTPApp) Routes(items ...any)
Routes configures the application routes
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route represents a single route configuration
type RouteBuilder ¶
type RouteBuilder struct{}
RouteBuilder provides route construction methods
func NewRoute ¶
func NewRoute() *RouteBuilder
func (*RouteBuilder) DELETE ¶
func (rb *RouteBuilder) DELETE(pattern string, handler HandlerFunc) *Route
DELETE creates a DELETE route
func (*RouteBuilder) GET ¶
func (rb *RouteBuilder) GET(pattern string, handler HandlerFunc) *Route
GET creates a GET route
func (*RouteBuilder) Group ¶
func (rb *RouteBuilder) Group(prefix string, items ...any) *RouteGroup
Group creates a route group
func (*RouteBuilder) PATCH ¶
func (rb *RouteBuilder) PATCH(pattern string, handler HandlerFunc) *Route
PATCH creates a PATCH route
func (*RouteBuilder) POST ¶
func (rb *RouteBuilder) POST(pattern string, handler HandlerFunc) *Route
POST creates a POST route
func (*RouteBuilder) PUT ¶
func (rb *RouteBuilder) PUT(pattern string, handler HandlerFunc) *Route
PUT creates a PUT route
type RouteGroup ¶
type RouteGroup struct {
// contains filtered or unexported fields
}
RouteGroup represents a group of routes with common prefix/middleware
Click to show internal directories.
Click to hide internal directories.