The froute Reference Manual
This is the froute Reference Manual, version 0.1,
generated automatically by Declt version 4.0 beta 2 "William Riker"
on Sun Sep 15 05:13:06 2024 GMT+0.
1 Systems
The main system appears first, followed by any subsystem dependency.
1.1 froute
An Http routing class that takes advantage of the MOP
- Author
Fungus Humungus
- License
MIT
- Version
0.1
- Dependencies
closer-mop
(system).
cl-ppcre
(system).
- Source
froute.asd
.
- Child Component
src
(module).
2 Modules
Modules are listed depth-first from the system components tree.
2.1 froute/src
- Source
froute.asd
.
- Parent Component
froute
(system).
- Child Components
-
3 Files
Files are sorted by type and then listed depth-first from the systems
components trees.
3.1 Lisp
3.1.2 froute/src/package.lisp
- Source
froute.asd
.
- Parent Component
src
(module).
- Packages
froute
.
3.1.3 froute/src/froute-class.lisp
- Dependency
package.lisp
(file).
- Source
froute.asd
.
- Parent Component
src
(module).
- Public Interface
-
- Internals
-
3.1.4 froute/src/routes.lisp
- Dependencies
-
- Source
froute.asd
.
- Parent Component
src
(module).
- Internals
-
3.1.5 froute/src/invoke-route.lisp
- Dependencies
-
- Source
froute.asd
.
- Parent Component
src
(module).
- Public Interface
invoke-route
(function).
- Internals
-
4 Packages
Packages are listed by definition order.
4.1 froute-system
- Source
froute.asd
.
- Use List
asdf/interface
.
common-lisp
.
4.2 froute
- Source
package.lisp
.
- Use List
closer-common-lisp
.
- Public Interface
-
- Internals
-
5 Definitions
Definitions are sorted by export status, category, package, and then by
lexicographic order.
5.1 Public Interface
5.1.2 Generic functions
- Generic Function: run (route method) ¶
-
Generic method that gets run on a matching route.
- Package
froute
.
- Source
froute-class.lisp
.
5.1.3 Standalone methods
- Method: initialize-instance :after ((class
froute-class
) &key) ¶
-
After a froute-class class is defined, we need to push it into our routes list.
- Source
froute-class.lisp
.
- Method: reinitialize-instance :after ((class
froute-class
) &key) ¶
-
Replace the old class definition with the new one, then rebuild the routes.
- Source
froute-class.lisp
.
- Method: validate-superclass ((class
froute-class
) (super-class standard-class
)) ¶
-
- Package
sb-mop
.
- Source
froute-class.lisp
.
5.2 Internals
5.2.2 Ordinary functions
- Function: add-to-vars (var path vars) ¶
-
- Package
froute
.
- Source
invoke-route.lisp
.
- Function: build-routes () ¶
-
Clears our routes mapping and builds it up from scratch.
- Package
froute
.
- Source
routes.lisp
.
- Function: copy-route (instance) ¶
-
- Package
froute
.
- Source
routes.lisp
.
- Function: create-route-instance (class params) ¶
-
Creates the route class and populates its slots with the variables.
- Package
froute
.
- Source
invoke-route.lisp
.
- Function: find-route (path list) ¶
-
Finds the route with the path in the given list
- Package
froute
.
- Source
routes.lisp
.
- Function: insert-into-position (value list &key test key) ¶
-
Insert the value into the list where every item that fails the test preceeds the value
and every item that passes the test follows.
- Package
froute
.
- Source
routes.lisp
.
- Function: is-variable-param (segment) ¶
-
Is this route segment a variable (does it start with :)
- Package
froute
.
- Source
invoke-route.lisp
.
- Function: is-wildcard-variable (segment) ¶
-
Is this route segment a wildcard. ie Should it return the rest of the route?
- Package
froute
.
- Source
invoke-route.lisp
.
- Function: join-segments (segments) ¶
-
Rejoin the segments separated by /
- Package
froute
.
- Source
invoke-route.lisp
.
- Function: make-keyword (str) ¶
-
- Package
froute
.
- Source
invoke-route.lisp
.
- Function: make-route (&key path class children) ¶
-
- Package
froute
.
- Source
routes.lisp
.
- Function: match-segments (route path vars) ¶
-
- Package
froute
.
- Source
invoke-route.lisp
.
- Function: remove-wildcard (segment) ¶
-
Removes the * from the end of the var
- Package
froute
.
- Source
invoke-route.lisp
.
- Reader: route-children (instance) ¶
-
- Writer: (setf route-children) (instance) ¶
-
- Package
froute
.
- Source
routes.lisp
.
- Target Slot
children
.
- Reader: route-class (instance) ¶
-
- Writer: (setf route-class) (instance) ¶
-
- Package
froute
.
- Source
routes.lisp
.
- Target Slot
class
.
- Function: route-matches (route method request-route request-method) ¶
-
- Package
froute
.
- Source
invoke-route.lisp
.
- Function: route-p (object) ¶
-
- Package
froute
.
- Source
routes.lisp
.
- Reader: route-path (instance) ¶
-
- Writer: (setf route-path) (instance) ¶
-
- Package
froute
.
- Source
routes.lisp
.
- Target Slot
path
.
- Function: split-route (route) ¶
-
Splits the route up into its constituent parts.
- Package
froute
.
- Source
invoke-route.lisp
.
- Function: trim-slashes (route) ¶
-
Removes leading and trailing /
- Package
froute
.
- Source
invoke-route.lisp
.
- Function: walk-routes (path method routes vars) ¶
-
Walk down the routes tree matching the paths and collecting
any variables along the way.
- Package
froute
.
- Source
invoke-route.lisp
.
5.2.3 Generic functions
- Generic Function: clean-route (class) ¶
-
- Package
froute
.
- Methods
- Method: clean-route ((class
froute-class
)) ¶
-
Removes all instances of the given class from our route tree
- Source
routes.lisp
.
- Generic Function: collect-inherited-routes (class) ¶
-
- Package
froute
.
- Methods
- Method: collect-inherited-routes ((class
froute-class
)) ¶
-
Retrieves all routes in the inheritance tree that are froutes.
- Source
routes.lisp
.
- Generic Function: num-segments (route) ¶
-
- Package
froute
.
- Methods
- Method: num-segments ((route
route
)) ¶
-
- Source
routes.lisp
.
- Generic Function: push-route (class) ¶
-
- Package
froute
.
- Methods
- Method: push-route ((class
froute-class
)) ¶
-
Pushes a new route into our route tree
- Source
routes.lisp
.
- Generic Reader: route (object) ¶
-
- Package
froute
.
- Methods
- Reader Method: route ((froute-class
froute-class
)) ¶
-
automatically generated reader method
- Source
froute-class.lisp
.
- Target Slot
route
.
- Generic Writer: (setf route) (object) ¶
-
- Package
froute
.
- Methods
- Writer Method: (setf route) ((froute-class
froute-class
)) ¶
-
automatically generated writer method
- Source
froute-class.lisp
.
- Target Slot
route
.
Appendix A Indexes
A.2 Functions
| |
|
( | | |
| (setf route) : | | Private generic functions |
| (setf route) : | | Private generic functions |
| (setf route-children) : | | Private ordinary functions |
| (setf route-class) : | | Private ordinary functions |
| (setf route-path) : | | Private ordinary functions |
|
A | | |
| add-to-vars : | | Private ordinary functions |
|
B | | |
| build-routes : | | Private ordinary functions |
|
C | | |
| clean-route : | | Private generic functions |
| clean-route : | | Private generic functions |
| collect-inherited-routes : | | Private generic functions |
| collect-inherited-routes : | | Private generic functions |
| copy-route : | | Private ordinary functions |
| create-route-instance : | | Private ordinary functions |
|
F | | |
| find-route : | | Private ordinary functions |
| Function, (setf route-children) : | | Private ordinary functions |
| Function, (setf route-class) : | | Private ordinary functions |
| Function, (setf route-path) : | | Private ordinary functions |
| Function, add-to-vars : | | Private ordinary functions |
| Function, build-routes : | | Private ordinary functions |
| Function, copy-route : | | Private ordinary functions |
| Function, create-route-instance : | | Private ordinary functions |
| Function, find-route : | | Private ordinary functions |
| Function, insert-into-position : | | Private ordinary functions |
| Function, invoke-route : | | Public ordinary functions |
| Function, is-variable-param : | | Private ordinary functions |
| Function, is-wildcard-variable : | | Private ordinary functions |
| Function, join-segments : | | Private ordinary functions |
| Function, make-keyword : | | Private ordinary functions |
| Function, make-route : | | Private ordinary functions |
| Function, match-segments : | | Private ordinary functions |
| Function, remove-wildcard : | | Private ordinary functions |
| Function, route-children : | | Private ordinary functions |
| Function, route-class : | | Private ordinary functions |
| Function, route-matches : | | Private ordinary functions |
| Function, route-p : | | Private ordinary functions |
| Function, route-path : | | Private ordinary functions |
| Function, split-route : | | Private ordinary functions |
| Function, trim-slashes : | | Private ordinary functions |
| Function, walk-routes : | | Private ordinary functions |
|
G | | |
| Generic Function, (setf route) : | | Private generic functions |
| Generic Function, clean-route : | | Private generic functions |
| Generic Function, collect-inherited-routes : | | Private generic functions |
| Generic Function, num-segments : | | Private generic functions |
| Generic Function, push-route : | | Private generic functions |
| Generic Function, route : | | Private generic functions |
| Generic Function, run : | | Public generic functions |
|
I | | |
| initialize-instance : | | Public standalone methods |
| insert-into-position : | | Private ordinary functions |
| invoke-route : | | Public ordinary functions |
| is-variable-param : | | Private ordinary functions |
| is-wildcard-variable : | | Private ordinary functions |
|
J | | |
| join-segments : | | Private ordinary functions |
|
M | | |
| make-keyword : | | Private ordinary functions |
| make-route : | | Private ordinary functions |
| match-segments : | | Private ordinary functions |
| Method, (setf route) : | | Private generic functions |
| Method, clean-route : | | Private generic functions |
| Method, collect-inherited-routes : | | Private generic functions |
| Method, initialize-instance : | | Public standalone methods |
| Method, num-segments : | | Private generic functions |
| Method, push-route : | | Private generic functions |
| Method, reinitialize-instance : | | Public standalone methods |
| Method, route : | | Private generic functions |
| Method, validate-superclass : | | Public standalone methods |
|
N | | |
| num-segments : | | Private generic functions |
| num-segments : | | Private generic functions |
|
P | | |
| push-route : | | Private generic functions |
| push-route : | | Private generic functions |
|
R | | |
| reinitialize-instance : | | Public standalone methods |
| remove-wildcard : | | Private ordinary functions |
| route : | | Private generic functions |
| route : | | Private generic functions |
| route-children : | | Private ordinary functions |
| route-class : | | Private ordinary functions |
| route-matches : | | Private ordinary functions |
| route-p : | | Private ordinary functions |
| route-path : | | Private ordinary functions |
| run : | | Public generic functions |
|
S | | |
| split-route : | | Private ordinary functions |
|
T | | |
| trim-slashes : | | Private ordinary functions |
|
V | | |
| validate-superclass : | | Public standalone methods |
|
W | | |
| walk-routes : | | Private ordinary functions |
|
A.4 Data types
| |
|
C | | |
| Class, froute-class : | | Public classes |
|
F | | |
| File, froute-class.lisp : | | The froute/src/froute-class․lisp file |
| File, froute.asd : | | The froute/froute․asd file |
| File, invoke-route.lisp : | | The froute/src/invoke-route․lisp file |
| File, package.lisp : | | The froute/src/package․lisp file |
| File, routes.lisp : | | The froute/src/routes․lisp file |
| froute : | | The froute system |
| froute : | | The froute package |
| froute-class : | | Public classes |
| froute-class.lisp : | | The froute/src/froute-class․lisp file |
| froute-system : | | The froute-system package |
| froute.asd : | | The froute/froute․asd file |
|
I | | |
| invoke-route.lisp : | | The froute/src/invoke-route․lisp file |
|
M | | |
| Module, src : | | The froute/src module |
|
P | | |
| Package, froute : | | The froute package |
| Package, froute-system : | | The froute-system package |
| package.lisp : | | The froute/src/package․lisp file |
|
R | | |
| route : | | Private structures |
| routes.lisp : | | The froute/src/routes․lisp file |
|
S | | |
| src : | | The froute/src module |
| Structure, route : | | Private structures |
| System, froute : | | The froute system |
|