1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 13:05:56 +00:00
Former-commit-id: 06ad874613c270383be5a7355cbb23a2dcf7a903
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-03-23 02:34:45 +02:00
parent 7e94befac8
commit 64ecc88195
4 changed files with 81 additions and 42 deletions

View File

@@ -21,3 +21,20 @@ Of course no breaking-changes to the user's workflow.
I should not and not need to touch the existing router adaptors.
*/
/* 23 March 2017
Essentially almost finish, on "dirty" code:
- we can define custom macros, custom validators per custom macro or to all of the available macros,
- parse the macro and macro funcs to iris.HandlerFunc and passed as middleware
- use reflection to add custom function signature without need to convert and check for arguments length
(same performance as with the 'hard-manual' way because the func which does all these checks is executed on boot time)
Todo:
- Make this new syntax compatible with the already router adaptors (can be done easy)
- We need to clean the code and think a way to adapt that to Iris in order to be
easy-to-use while in the same time provide the necessary api for advanced use cases.
I should also think if this feature worths the time to be extended into
a complete interpreter(with tokens, lexers, parsers and AST) and name it 'iel/Iris Expression Language' which could be used everywhere in the framework.
*/