Documentation
¶
Index ¶
- func New() drv.Drv
- type Driver
- func (d *Driver) Caps() drv.Capability
- func (d *Driver) Engine() any
- func (d *Driver) Handle(method string, pattern string, h http.Handler) error
- func (d *Driver) IsNil() bool
- func (d *Driver) Kind() drv.Kind
- func (d *Driver) Param(r *http.Request, key string) string
- func (d *Driver) Scope(prefix string) (drv.Drv, error)
- func (d *Driver) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver integrates Transwarp with the Go standard library router (http.ServeMux).
Notes on capabilities:
- CapParams: supported via net/http Request.PathValue (Go 1.22+ patterns).
- CapAnyMethod: supported by registering a pattern WITHOUT a method prefix.
- CapScope: supported by returning derived drivers that share the same mux and apply a prefix.
- CapParamSuffix: NOT claimed (stdlib does not support in-segment param suffix/prefix natively).
func (*Driver) Caps ¶
func (d *Driver) Caps() drv.Capability
Click to show internal directories.
Click to hide internal directories.