Gerasimos (Makis) Maropoulos
3945fa68d1
obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository
...
We have to do the same on iris-contrib/examples, iris-contrib/middleware and e.t.c.
Former-commit-id: 0860688158f374bc137bc934b81b26dcd0e10964
2019-10-25 01:27:02 +03:00
Gerasimos (Makis) Maropoulos
221978e41a
Upgrade to new go errors and some minor fixes and improvements including easier debugging of invalid routes and e.t.c.
...
Former-commit-id: 5809157b952ccc61a67a9861470774b3a6fee024
2019-10-24 18:57:05 +03:00
Gerasimos (Makis) Maropoulos
44765c7d77
add test case for https://github.com/kataras/iris/pull/1364
...
Former-commit-id: 836fb947642976f609f97cd5aeb4226e1fb991b8
2019-10-05 22:24:35 +03:00
BenLampson(赵元源)
9115745e4f
Update controller_test.go
...
Former-commit-id: 2f2576255b988f29e8745bc62f5a14a848349bc5
2019-09-26 09:07:34 +08:00
BenLampson
986be58702
Fix bug:about the MVC package route binding
...
I found there has some little bug in the controller_method_parser.go
the bug is : if someone use the code like this:
func (cc *HelloWorld) GetInfoXYT()
We can't create the Url that he want.
We lose the T, our's url is: info/x/y
Cause// it doesn't count the last uppercase and the last append is
words = append(words, s[start:end])
Former-commit-id: 9ff6ad4a220aea2730243ba44912d5a6acc66266
2019-09-25 16:11:39 +08:00
Gerasimos (Makis) Maropoulos
da73c1817f
fix https://github.com/kataras/iris/issues/1349
...
Former-commit-id: 1e2c7185fc3c536ceb8b269c75b9a2c19323960b
2019-09-07 05:57:35 +03:00
Gerasimos (Makis) Maropoulos
c0136f0d84
minor
...
Former-commit-id: 3aeb222d0cc273553c5b97905425e9f81956fa27
2019-09-01 23:49:09 +03:00
Gerasimos (Makis) Maropoulos
bd5f96086b
Add status code 103 Early Hints. Add the ability to customize and change the order of controller's fields and their registered valid dependencies relative to: #1343
...
Former-commit-id: 5bd9e02e5fafca135d17cad87f4a9aec526b333b
2019-08-26 16:43:02 +03:00
Gerasimos (Makis) Maropoulos
07046ab978
formatting
...
Former-commit-id: 037081db5d6d4434e873ca8b75334ee43e046b6a
2019-08-17 10:06:20 +03:00
Gerasimos (Makis) Maropoulos
1c2472c53f
update the online visitors and vuejs +iris mvc todo app (this gave me some ideas to make the api a bit easier)
...
Former-commit-id: 8c84486a22505b7137669bde52383d2564a6b382
2019-07-15 18:45:22 +03:00
Gerasimos (Makis) Maropoulos
657e0133d0
add support for b.HandleMany(GET, /custom3/{ps:string}/{pssecond:string} /custom3/{ps:string}, CtrlMethodName) relative to: https://github.com/kataras/iris/issues/1292
...
Former-commit-id: de08c5eeab7a1c2729fbff7260de00cc2516f78c
2019-07-11 16:33:20 +03:00
Gerasimos (Makis) Maropoulos
f8d19b3ed2
add HandleMany to controller's Before/AfterActivation feature as requested at: https://github.com/kataras/iris/issues/1292
...
Former-commit-id: c021f49522a214ddc3978a1c8f5e8d32f029eb2d
2019-07-11 15:07:39 +03:00
Gerasimos (Makis) Maropoulos
33dfb42d73
add the new neffos StackExchange feature to the type aliases and shortcuts of the websocket subpackage and auto-enable debug mode on websocket MVC application when iris logger's level is set to debug
...
Former-commit-id: 4d8cb79d01a4172fc1ed7a9b626da0228d902b3c
2019-07-11 12:59:11 +03:00
Gerasimos (Makis) Maropoulos
450f20902d
MVC improvements: add HandleWebsocket that now registers events automatically based on the struct's methods(!) and fix a bug when more than one value of the same type is registered to a static field of a controller
...
Former-commit-id: e369d1426ac1a6b58314930a18362670317da3c1
2019-07-09 12:16:19 +03:00
Gerasimos (Makis) Maropoulos
0d4d2bd3fa
implement mvc HandleError as requested at #1244
...
Former-commit-id: 58a69f9cffe67c3aa1bab5d9425c5df65e2367ed
2019-04-16 18:01:48 +03:00
Gerasimos (Makis) Maropoulos
df3a68255c
fix https://github.com/kataras/iris/issues/1205
...
Former-commit-id: d95be1456a78fbafd7ec5fec22f2066454eb76c6
2019-03-01 14:10:07 +02:00
Gerasimos (Makis) Maropoulos
bda36145e5
some cleanup, and remove the test 'testwebocket2' package at all; A lower-level fast websocket impl based on gobwas/ws will be published on a different repo, it is a WIP
...
Former-commit-id: b680974c593196ce20865ed12778929ced6afea1
2019-02-22 21:24:10 +02:00
Gerasimos (Makis) Maropoulos
9cfaff07d6
add support for mvc and hero dynamic dependencies to understand the error type as a second output value as requested at: https://github.com/kataras/iris/issues/1187
...
Former-commit-id: 49e29c06aaaa22743354981342c29fc9d5953d0e
2019-02-16 00:42:26 +02:00
Gerasimos (Makis) Maropoulos
443776c423
add a warning on mvc if someone didn't read the examples or the godocs and .Register dependencies after .Handle
...
a developer sent a direct question message from our facebook page: https://www.facebook.com/iris.framework/
Former-commit-id: ebd7b4bc9078d4952799b4498ce4dfb0ed4c8072
2019-01-20 14:06:06 +02:00
Gerasimos (Makis) Maropoulos
02d94041f9
fix grammar and misspell
...
Former-commit-id: 1816619f891df77a5d1925d43c25243dcadbceb5
2018-11-29 04:01:05 +02:00
Gerasimos (Makis) Maropoulos
3962710d3d
Version 11 released. Read https://github.com/kataras/iris/blob/master/HISTORY.md#su-21-october-2018--v1100
...
Former-commit-id: fe6305deed00e170bf4d39a12c0644fe686e0a24
2018-10-21 19:20:05 +03:00
Gerasimos Maropoulos
4993918a12
remove the complicated fallback handlers, that didn't work and not approve the coblexity addition of the https://github.com/kataras/iris/pull/919 , RouteExists accepts first argument the Context, add new AllowMethods per party and fix cors by 048e2be034
https://github.com/kataras/iris/issues/922 , rel: https://github.com/iris-contrib/middleware/issues/36 , https://github.com/iris-contrib/middleware/issues/34 , https://github.com/iris-contrib/middleware/issues/32 , https://github.com/iris-contrib/middleware/issues/30 , https://github.com/kataras/iris/pull/909
...
Former-commit-id: 5576c44b64014fb00dd79e618b815b5f52b705e4
2018-03-10 14:22:56 +02:00
Frédéric Meyer
66209cae4f
Save
...
Former-commit-id: 592e9cddf3511fc08e87f19ad39fdaac479b453f
2018-02-21 08:18:53 +03:00
Gerasimos (Makis) Maropoulos
617258890e
add GetRoute
for MVC Controllers. Give the chance to change rsome route's properties like Name (used for reverse routing in templates, optionally).
...
Former-commit-id: 5ee9b1f97ff3c98cd8e5faddd23a87bbafb8e2e0
2017-12-30 22:04:26 +02:00
Gerasimos (Makis) Maropoulos
685954d341
add a simple context#YAML function to render yaml data and make sure that the cookie's values are url escaped and unescaped when retrieve from client's headers
...
Former-commit-id: cad1e09679f6b646c12bb6ffdeba62738bdeef5d
2017-12-27 15:38:06 +02:00
Gerasimos (Makis) Maropoulos
19e9ed330d
add sharable package-level hero dependencies with the mvc controllers instances
...
Former-commit-id: 6c53190e40fa42d242a73eb80361830b65f0d077
2017-12-27 15:09:52 +02:00
Gerasimos (Makis) Maropoulos
b4827c2b5e
fix examples link in the /mvc and a controller test
...
Former-commit-id: 1384d7297f79f47a395701433034c57ad361f5ab
2017-12-27 04:20:42 +02:00
Gerasimos (Makis) Maropoulos
b282e7c563
Replace controller's .Register with .Handle and AddDependencies with .Register in order to be aligned with the 'hero' package, all examples and docs are updated, it's crazy how I can't stop even on Christmas
...
Former-commit-id: 3b42963e9806e327ee42942cf156bda6059eaf8f
2017-12-27 04:15:41 +02:00
Gerasimos (Makis) Maropoulos
38ff34ee1e
fix trailing parenthesis on the mvc/ideas/1/main.go which will be removed at the next commits, this was my dream and I made it reality in just 50 hours :P
...
Former-commit-id: 9c01ab4d684897815dccb02ab6515f568b22a1cc
2017-12-25 21:00:14 +02:00
Gerasimos (Makis) Maropoulos
2ab1456414
split of the mvc and the new hero package is completed, now handlers with input and output binding feature is a different feature than the mvc, however the mvc controller's methods can use the hero dependency injection as before (v10+)
...
Former-commit-id: d67f5a5ed9033286bcc4c04f6be612823cba2a57
2017-12-25 20:57:04 +02:00
Gerasimos (Makis) Maropoulos
46505f62db
create a new package, name it as hero, I was thinking super or superb but hero is better name for what it does - the goal is to split the new 'mvc handlers' from the mvc system because they are not the same, users should know that they can use these type of rich binded handlers without controllers as well, like a normal handler and that I implemented here, the old files exist on the mvc package but will be removed at the next commit, I have to decide if we want type aliases for Result or no
...
Former-commit-id: cb775edc72bedc88aeab4c5a6de6bfc6bd56fae2
2017-12-25 20:05:32 +02:00
Gerasimos (Makis) Maropoulos
e1c65d23fb
finish the first state of the vuejs todo mvc example, a simple rest api - todo: websocket and live updates between browser tabs with the same session id
...
Former-commit-id: 0bd859420cff87014479c44a471ec273c621c1a2
2017-12-23 17:07:39 +02:00
Gerasimos (Makis) Maropoulos
a5a87706c1
misspell fix
...
Former-commit-id: e301671f86118ad6ac686fd3e43b3cba92dbbff1
2017-12-22 11:08:16 +02:00
Gerasimos (Makis) Maropoulos
12ef034ea1
add some comment docs at the mvc/controller.go
...
Former-commit-id: 6ff3c8694c3e581c3e28fc706bddbc6759492280
2017-12-22 11:07:13 +02:00
Gerasimos (Makis) Maropoulos
ef3a09c126
update the documents for the new MVC API and some of its new features but not finished yet, README big examples and _examples/mvc/login is are yet updated and I'm thinking of removing the big examples on README.md, they exist on the _examples/mvc updated.
...
Former-commit-id: c2938d4bcaa3520744526f7975ee3cce632499b3
2017-12-22 10:18:31 +02:00
Gerasimos (Makis) Maropoulos
254a4ede95
add explanation why the 'globalVisitorsController' example is a Singleton, because it was not clear for new gophers previously.
...
Former-commit-id: 9267c415e53eeb00adadf6fde9e0aeeb415cf24a
2017-12-20 18:09:31 +02:00
Gerasimos (Makis) Maropoulos
b78698f6c0
fix all _examples to the newest mvc, add comments to those examples and add a package-level .Configure in order to make it easier for new users. Add a deprecated panic if app.Controller is used with a small tutorial and future resource link so they can re-write their mvc app's definitions
...
Former-commit-id: bf07696041be9e3d178ce3c42ccec2df4bfdb2af
2017-12-20 08:33:53 +02:00
Gerasimos (Makis) Maropoulos
fd0f3ed6cb
fix check for singleton on fillStruct - no problem let's set all the static values on the first value although it may never be needed if request-scoped/stateless (No Singleton di.State)
...
Former-commit-id: a72bcd720d900fdc009cabb1e4a0b455026710fd
2017-12-20 00:09:17 +02:00
Gerasimos (Makis) Maropoulos
6285622cfa
controller's struct: if unexported field(s) is set-ed manually (binder cannot do that) and no other dynamic dependency(depends on context) then tag the controller as singleton, use a single controller instance to serve all clients (the controller's methods are per-request of course but its(controller's) fields will be 'global'- users should be careful because parallel access of those fields are up to them by using mutex or atomic or values that are safe for concurrent access.
...
Former-commit-id: dfafcb3a37a9b33d713bf47f16dd60764b026a08
2017-12-20 00:01:50 +02:00
Gerasimos (Makis) Maropoulos
c15763c556
ok make it cleaner, it's working well and blazing fast but I have to do a lot cleaning and commenting and docs as well before push it to master --- hope at christmas day, also thinking some internal ideas - the whole code is not ready to be readen by a third person yet.
...
Former-commit-id: 0b3fb2841d5032ff47bdca42a6f4ccfeb789ce3c
2017-12-19 23:40:42 +02:00
Gerasimos (Makis) Maropoulos
20ba72aecf
fix typo
...
Former-commit-id: b6f9de4cf8d62210ffefba5d33dc8372d236748d
2017-12-18 06:47:05 +02:00
Gerasimos (Makis) Maropoulos
4fb46bf1f3
fix mvc/ideas/1/main.go->AfterActivation
...
Former-commit-id: bf3d8227793fba76f0f7349d82d1200275ac9147
2017-12-18 02:24:53 +02:00
Gerasimos (Makis) Maropoulos
d5a38a0cd6
more checks about creating new instance of controller on each request - this time if all bindings are static then set them to the initial-devpassed controller and if the total number of lengths are equal with these static dependencies then we ignore the injector and use the initial controller on each request - maximize the performance when simple controller is used - need more cleanup before new release but I hope until Christmas iris developers will be amazed
...
Former-commit-id: 32ed69368d1df2c25cdb712bb7f0cf47b2e36c05
2017-12-18 00:16:10 +02:00
Gerasimos (Makis) Maropoulos
40b40fa7d3
don't create new controller instance when all fields are set-ed by the end-dev - but we keep show those fields' values as Dependencies on the BeforeActivate in order to the future custom controllers authors to be able to check if something is added as dependecy or even manually set-ed before bind their own dependecies, otherwise they could override the manually set-ing
...
Former-commit-id: 72d3a0f1299781ee9a5e3e35e4a543354f8cd63d
2017-12-17 06:34:16 +02:00
Gerasimos (Makis) Maropoulos
6120e755e8
update mvc/README.md
...
Former-commit-id: 1aa80921e6b28d0492046424292e727c4e99e6b0
2017-12-16 23:27:04 +02:00
Gerasimos (Makis) Maropoulos
e67621b8ec
grammar fixes(?)
...
Former-commit-id: bf2ff1df8c841643eb2ebfc8524ba869d02c99b3
2017-12-16 23:12:49 +02:00
Gerasimos (Makis) Maropoulos
68cc6641d4
Add session.Destroy (before I've added: Increment & Decrement entry helpers as well) | Improve the debug messages for the controllers
...
Former-commit-id: f5f17b05252a5032ace1e2d0fdd2304fc4004635
2017-12-16 23:09:00 +02:00
Gerasimos (Makis) Maropoulos
b8cafce6b9
add simple tests for _examples/mvc/hello-world and session-controller
...
Former-commit-id: d88a792ba57cd869d2888f41bca6eb3e5b4f7d49
2017-12-16 21:27:20 +02:00
Gerasimos (Makis) Maropoulos
a25c0557de
don't create a new controller instance if it doesn't have struct dependencies and the fields length is 0 - 0.4MB/s difference from the raw handlers now.
...
Former-commit-id: f808291fe84bc2cdd83f60f62f8b3140204110a5
2017-12-16 17:57:20 +02:00
Gerasimos (Makis) Maropoulos
34664aa311
OK, my dream-idea is implemented. TODO: Some examples and doc.go is not updated yet, comments on the mvc/di subpackage, the tutorial/vuejs-todo-mvc is running but not finished yet (it's using browser's localstorage and it should be replaced by the http requests that are registered via iris mvc
...
Former-commit-id: 0ea7e01ce1d78bcb78b40f3b0f5c03ad7c9abaea
2017-12-16 06:38:28 +02:00