Documentation
¶
Overview ¶
CRC: crc-Router.md Spec: interfaces.md
Index ¶
- func ParseURL(urlPath string) (sessionID, path string)
- type Route
- type Router
- func (r *Router) BuildURL(path string) string
- func (r *Router) GetRoutes() []Route
- func (r *Router) GetSessionID() string
- func (r *Router) IsRegisteredPath(path string) bool
- func (r *Router) Match(path string) bool
- func (r *Router) Register(path string, variableID int64)
- func (r *Router) Resolve(path string) (int64, bool)
- func (r *Router) Unregister(path string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Route ¶
type Route struct {
Path string // URL path pattern (without session prefix)
VariableID int64 // Associated presenter variable ID
}
Route maps a URL path to a presenter variable ID.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router handles URL routing for a session.
func (*Router) BuildURL ¶
BuildURL constructs the full URL for a presenter path. Returns /{sessionID}/{path} format.
func (*Router) GetSessionID ¶
GetSessionID returns the session ID for this router.
func (*Router) IsRegisteredPath ¶
IsRegisteredPath checks if a path was explicitly registered.
func (*Router) Resolve ¶
Resolve finds the presenter variable ID for a URL path. Returns the variable ID and true if found, 0 and false otherwise.
func (*Router) Unregister ¶
Unregister removes a URL path mapping.
Click to show internal directories.
Click to hide internal directories.