1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 18:37:05 +00:00
Former-commit-id: 9e5f0a08049b83605aa847b8f51fb856427354a6
This commit is contained in:
hiveminded
2017-09-07 16:20:31 +03:00
parent fcfc65a7bc
commit 8a9a498316
15 changed files with 184 additions and 25 deletions

14
doc.go
View File

@@ -832,7 +832,6 @@ Register one or more relative paths and able to get path parameters, i.e
- `func(*Controller) PostProfileFollowers()` - `POST:/user/profile/followers`
- `func(*Controller) GetBy(id int64)` - `GET:/user/{param:long}`
- `func(*Controller) PostBy(id int64)` - `POST:/user/{param:long}`
If `app.Controller("/profile", new(profile.Controller))`
- `func(*Controller) GetBy(username string)` - `GET:/profile/{param:string}`
@@ -841,6 +840,12 @@ Register one or more relative paths and able to get path parameters, i.e
- `func(*Controller) GetByWildard(path string)` - `GET:/assets/{param:path}`
If `app.Controller("/equality", new(profile.Equality))`
- `func(*Controller) GetBy(is bool)` - `GET:/equality/{param:boolean}`
Supported types for method functions receivers: int, int64, bool and string.
Using Iris MVC for code reuse
@@ -901,6 +906,13 @@ Standard macro types for parameters:
int64 type
only numbers (0-9)
+------------------------+
| {param:boolean} |
+------------------------+
bool type
only "1" or "t" or "T" or "TRUE" or "true" or "True"
or "0" or "f" or "F" or "FALSE" or "false" or "False"
+------------------------+
| {param:alphabetical} |
+------------------------+