Documentation
¶
Overview ¶
Package route owns immutable route metadata and pure method/path matching. HTTP request mechanics belong to gateway/http.
Index ¶
- type Bundle
- func (b *Bundle) AllowedMethodsForPath(path string) []string
- func (b *Bundle) ComponentByKey(key spec.Key) (*spec.Component, bool)
- func (b *Bundle) ComponentByRoute(method, path string) (*spec.Component, bool)
- func (b *Bundle) ComponentByRouteWithParams(method, path string) (*spec.Component, map[string]string, bool)
- func (b *Bundle) RouteByMethodPath(method, path string) (*spec.Route, bool)
- type Exposure
- type PathTemplate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
func (*Bundle) AllowedMethodsForPath ¶
func (*Bundle) ComponentByKey ¶
func (*Bundle) ComponentByRoute ¶
func (*Bundle) ComponentByRouteWithParams ¶
type Exposure ¶
type Exposure struct {
// contains filtered or unexported fields
}
Exposure selects public package import paths independently of dependency loading. An empty include list exposes nothing. Exclusions take precedence.
func NewExposure ¶
type PathTemplate ¶
type PathTemplate struct {
// contains filtered or unexported fields
}
PathTemplate is an immutable compiled route path.
func CompilePathTemplate ¶
func CompilePathTemplate(path string) (*PathTemplate, error)
CompilePathTemplate compiles an authored absolute route path.
func (*PathTemplate) EscapedTemplatePath ¶
func (t *PathTemplate) EscapedTemplatePath() string
EscapedTemplatePath returns an RFC6570-compatible escaped path while preserving authored placeholders.
func (*PathTemplate) MatchEscapedPath ¶
MatchEscapedPath matches an escaped path and decodes every segment exactly once.
func (*PathTemplate) Parameters ¶
func (t *PathTemplate) Parameters() []string
Parameters returns placeholder names in authored order.
Click to show internal directories.
Click to hide internal directories.