2017-03-27 03:09:44 +02:00
|
|
|
package ast
|
|
|
|
|
|
|
|
import (
|
2017-11-02 04:54:33 +01:00
|
|
|
"reflect"
|
2017-03-27 03:09:44 +02:00
|
|
|
)
|
|
|
|
|
2017-06-12 03:47:16 +02:00
|
|
|
// ParamType is a specific uint8 type
|
|
|
|
// which holds the parameter types' type.
|
Publish the new version :airplane: | Look description please!
# FAQ
### Looking for free support?
http://support.iris-go.com
https://kataras.rocket.chat/channel/iris
### Looking for previous versions?
https://github.com/kataras/iris#version
### Should I upgrade my Iris?
Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready.
> Iris uses the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature, so you get truly reproducible builds, as this method guards against upstream renames and deletes.
**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
For further installation support, please click [here](http://support.iris-go.com/d/16-how-to-install-iris-web-framework).
### About our new home page
http://iris-go.com
Thanks to [Santosh Anand](https://github.com/santoshanand) the http://iris-go.com has been upgraded and it's really awesome!
[Santosh](https://github.com/santoshanand) is a freelancer, he has a great knowledge of nodejs and express js, Android, iOS, React Native, Vue.js etc, if you need a developer to find or create a solution for your problem or task, please contact with him.
The amount of the next two or three donations you'll send they will be immediately transferred to his own account balance, so be generous please!
Read more at https://github.com/kataras/iris/blob/master/HISTORY.md
Former-commit-id: eec2d71bbe011d6b48d2526eb25919e36e5ad94e
2017-06-03 22:22:52 +02:00
|
|
|
type ParamType uint8
|
|
|
|
|
|
|
|
const (
|
2017-06-12 03:47:16 +02:00
|
|
|
// ParamTypeUnExpected is an unexpected parameter type.
|
Publish the new version :airplane: | Look description please!
# FAQ
### Looking for free support?
http://support.iris-go.com
https://kataras.rocket.chat/channel/iris
### Looking for previous versions?
https://github.com/kataras/iris#version
### Should I upgrade my Iris?
Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready.
> Iris uses the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature, so you get truly reproducible builds, as this method guards against upstream renames and deletes.
**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
For further installation support, please click [here](http://support.iris-go.com/d/16-how-to-install-iris-web-framework).
### About our new home page
http://iris-go.com
Thanks to [Santosh Anand](https://github.com/santoshanand) the http://iris-go.com has been upgraded and it's really awesome!
[Santosh](https://github.com/santoshanand) is a freelancer, he has a great knowledge of nodejs and express js, Android, iOS, React Native, Vue.js etc, if you need a developer to find or create a solution for your problem or task, please contact with him.
The amount of the next two or three donations you'll send they will be immediately transferred to his own account balance, so be generous please!
Read more at https://github.com/kataras/iris/blob/master/HISTORY.md
Former-commit-id: eec2d71bbe011d6b48d2526eb25919e36e5ad94e
2017-06-03 22:22:52 +02:00
|
|
|
ParamTypeUnExpected ParamType = iota
|
2017-06-12 03:47:16 +02:00
|
|
|
// ParamTypeString is the string type.
|
|
|
|
// If parameter type is missing then it defaults to String type.
|
|
|
|
// Allows anything
|
2018-08-23 05:30:12 +02:00
|
|
|
// Declaration: /mypath/{myparam:string} or {myparam}
|
Publish the new version :airplane: | Look description please!
# FAQ
### Looking for free support?
http://support.iris-go.com
https://kataras.rocket.chat/channel/iris
### Looking for previous versions?
https://github.com/kataras/iris#version
### Should I upgrade my Iris?
Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready.
> Iris uses the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature, so you get truly reproducible builds, as this method guards against upstream renames and deletes.
**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
For further installation support, please click [here](http://support.iris-go.com/d/16-how-to-install-iris-web-framework).
### About our new home page
http://iris-go.com
Thanks to [Santosh Anand](https://github.com/santoshanand) the http://iris-go.com has been upgraded and it's really awesome!
[Santosh](https://github.com/santoshanand) is a freelancer, he has a great knowledge of nodejs and express js, Android, iOS, React Native, Vue.js etc, if you need a developer to find or create a solution for your problem or task, please contact with him.
The amount of the next two or three donations you'll send they will be immediately transferred to his own account balance, so be generous please!
Read more at https://github.com/kataras/iris/blob/master/HISTORY.md
Former-commit-id: eec2d71bbe011d6b48d2526eb25919e36e5ad94e
2017-06-03 22:22:52 +02:00
|
|
|
ParamTypeString
|
2018-08-23 05:30:12 +02:00
|
|
|
|
|
|
|
// ParamTypeNumber is the integer, a number type.
|
|
|
|
// Allows both positive and negative numbers, any number of digits.
|
|
|
|
// Declaration: /mypath/{myparam:number} or {myparam:int} for backwards-compatibility
|
|
|
|
ParamTypeNumber
|
|
|
|
|
|
|
|
// ParamTypeInt64 is a number type.
|
|
|
|
// Allows only -9223372036854775808 to 9223372036854775807.
|
|
|
|
// Declaration: /mypath/{myparam:int64} or {myparam:long}
|
|
|
|
ParamTypeInt64
|
2018-08-23 23:56:54 +02:00
|
|
|
// ParamTypeUint8 a number type.
|
|
|
|
// Allows only 0 to 255.
|
|
|
|
// Declaration: /mypath/{myparam:uint8}
|
|
|
|
ParamTypeUint8
|
2018-08-23 05:30:12 +02:00
|
|
|
// ParamTypeUint64 a number type.
|
|
|
|
// Allows only 0 to 18446744073709551615.
|
|
|
|
// Declaration: /mypath/{myparam:uint64}
|
|
|
|
ParamTypeUint64
|
|
|
|
|
2017-09-07 15:20:31 +02:00
|
|
|
// ParamTypeBoolean is the bool type.
|
|
|
|
// Allows only "1" or "t" or "T" or "TRUE" or "true" or "True"
|
|
|
|
// or "0" or "f" or "F" or "FALSE" or "false" or "False".
|
2018-08-23 05:30:12 +02:00
|
|
|
// Declaration: /mypath/{myparam:bool} or {myparam:boolean}
|
2017-09-07 15:20:31 +02:00
|
|
|
ParamTypeBoolean
|
2017-06-12 03:47:16 +02:00
|
|
|
// ParamTypeAlphabetical is the alphabetical/letter type type.
|
|
|
|
// Allows letters only (upper or lowercase)
|
|
|
|
// Declaration: /mypath/{myparam:alphabetical}
|
Publish the new version :airplane: | Look description please!
# FAQ
### Looking for free support?
http://support.iris-go.com
https://kataras.rocket.chat/channel/iris
### Looking for previous versions?
https://github.com/kataras/iris#version
### Should I upgrade my Iris?
Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready.
> Iris uses the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature, so you get truly reproducible builds, as this method guards against upstream renames and deletes.
**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
For further installation support, please click [here](http://support.iris-go.com/d/16-how-to-install-iris-web-framework).
### About our new home page
http://iris-go.com
Thanks to [Santosh Anand](https://github.com/santoshanand) the http://iris-go.com has been upgraded and it's really awesome!
[Santosh](https://github.com/santoshanand) is a freelancer, he has a great knowledge of nodejs and express js, Android, iOS, React Native, Vue.js etc, if you need a developer to find or create a solution for your problem or task, please contact with him.
The amount of the next two or three donations you'll send they will be immediately transferred to his own account balance, so be generous please!
Read more at https://github.com/kataras/iris/blob/master/HISTORY.md
Former-commit-id: eec2d71bbe011d6b48d2526eb25919e36e5ad94e
2017-06-03 22:22:52 +02:00
|
|
|
ParamTypeAlphabetical
|
2017-06-12 03:47:16 +02:00
|
|
|
// ParamTypeFile is the file single path type.
|
|
|
|
// Allows:
|
|
|
|
// letters (upper or lowercase)
|
|
|
|
// numbers (0-9)
|
|
|
|
// underscore (_)
|
|
|
|
// dash (-)
|
|
|
|
// point (.)
|
|
|
|
// no spaces! or other character
|
|
|
|
// Declaration: /mypath/{myparam:file}
|
Publish the new version :airplane: | Look description please!
# FAQ
### Looking for free support?
http://support.iris-go.com
https://kataras.rocket.chat/channel/iris
### Looking for previous versions?
https://github.com/kataras/iris#version
### Should I upgrade my Iris?
Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready.
> Iris uses the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature, so you get truly reproducible builds, as this method guards against upstream renames and deletes.
**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
For further installation support, please click [here](http://support.iris-go.com/d/16-how-to-install-iris-web-framework).
### About our new home page
http://iris-go.com
Thanks to [Santosh Anand](https://github.com/santoshanand) the http://iris-go.com has been upgraded and it's really awesome!
[Santosh](https://github.com/santoshanand) is a freelancer, he has a great knowledge of nodejs and express js, Android, iOS, React Native, Vue.js etc, if you need a developer to find or create a solution for your problem or task, please contact with him.
The amount of the next two or three donations you'll send they will be immediately transferred to his own account balance, so be generous please!
Read more at https://github.com/kataras/iris/blob/master/HISTORY.md
Former-commit-id: eec2d71bbe011d6b48d2526eb25919e36e5ad94e
2017-06-03 22:22:52 +02:00
|
|
|
ParamTypeFile
|
2017-06-12 03:47:16 +02:00
|
|
|
// ParamTypePath is the multi path (or wildcard) type.
|
|
|
|
// Allows anything, should be the last part
|
|
|
|
// Declaration: /mypath/{myparam:path}
|
Publish the new version :airplane: | Look description please!
# FAQ
### Looking for free support?
http://support.iris-go.com
https://kataras.rocket.chat/channel/iris
### Looking for previous versions?
https://github.com/kataras/iris#version
### Should I upgrade my Iris?
Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready.
> Iris uses the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature, so you get truly reproducible builds, as this method guards against upstream renames and deletes.
**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
For further installation support, please click [here](http://support.iris-go.com/d/16-how-to-install-iris-web-framework).
### About our new home page
http://iris-go.com
Thanks to [Santosh Anand](https://github.com/santoshanand) the http://iris-go.com has been upgraded and it's really awesome!
[Santosh](https://github.com/santoshanand) is a freelancer, he has a great knowledge of nodejs and express js, Android, iOS, React Native, Vue.js etc, if you need a developer to find or create a solution for your problem or task, please contact with him.
The amount of the next two or three donations you'll send they will be immediately transferred to his own account balance, so be generous please!
Read more at https://github.com/kataras/iris/blob/master/HISTORY.md
Former-commit-id: eec2d71bbe011d6b48d2526eb25919e36e5ad94e
2017-06-03 22:22:52 +02:00
|
|
|
ParamTypePath
|
|
|
|
)
|
|
|
|
|
2017-12-04 04:06:03 +01:00
|
|
|
func (pt ParamType) String() string {
|
|
|
|
for k, v := range paramTypes {
|
|
|
|
if v == pt {
|
|
|
|
return k
|
|
|
|
}
|
2017-11-23 11:30:13 +01:00
|
|
|
}
|
2017-12-04 04:06:03 +01:00
|
|
|
|
|
|
|
return "unexpected"
|
2017-11-23 11:30:13 +01:00
|
|
|
}
|
|
|
|
|
2017-11-02 04:54:33 +01:00
|
|
|
// Not because for a single reason
|
|
|
|
// a string may be a
|
|
|
|
// ParamTypeString or a ParamTypeFile
|
|
|
|
// or a ParamTypePath or ParamTypeAlphabetical.
|
|
|
|
//
|
|
|
|
// func ParamTypeFromStd(k reflect.Kind) ParamType {
|
|
|
|
|
|
|
|
// Kind returns the std kind of this param type.
|
|
|
|
func (pt ParamType) Kind() reflect.Kind {
|
|
|
|
switch pt {
|
|
|
|
case ParamTypeAlphabetical:
|
|
|
|
fallthrough
|
|
|
|
case ParamTypeFile:
|
|
|
|
fallthrough
|
|
|
|
case ParamTypePath:
|
|
|
|
fallthrough
|
|
|
|
case ParamTypeString:
|
|
|
|
return reflect.String
|
2018-08-23 05:30:12 +02:00
|
|
|
case ParamTypeNumber:
|
2017-11-02 04:54:33 +01:00
|
|
|
return reflect.Int
|
2018-08-23 05:30:12 +02:00
|
|
|
case ParamTypeInt64:
|
2017-11-02 04:54:33 +01:00
|
|
|
return reflect.Int64
|
2018-08-23 23:56:54 +02:00
|
|
|
case ParamTypeUint8:
|
|
|
|
return reflect.Uint8
|
2018-08-23 05:30:12 +02:00
|
|
|
case ParamTypeUint64:
|
|
|
|
return reflect.Uint64
|
2017-11-02 04:54:33 +01:00
|
|
|
case ParamTypeBoolean:
|
|
|
|
return reflect.Bool
|
|
|
|
}
|
|
|
|
return reflect.Invalid // 0
|
|
|
|
}
|
|
|
|
|
2017-12-04 04:06:03 +01:00
|
|
|
// ValidKind will return true if at least one param type is supported
|
|
|
|
// for this std kind.
|
|
|
|
func ValidKind(k reflect.Kind) bool {
|
|
|
|
switch k {
|
|
|
|
case reflect.String:
|
|
|
|
fallthrough
|
|
|
|
case reflect.Int:
|
|
|
|
fallthrough
|
|
|
|
case reflect.Int64:
|
|
|
|
fallthrough
|
2018-08-23 23:56:54 +02:00
|
|
|
case reflect.Uint8:
|
|
|
|
fallthrough
|
2018-08-23 05:30:12 +02:00
|
|
|
case reflect.Uint64:
|
|
|
|
fallthrough
|
2017-12-04 04:06:03 +01:00
|
|
|
case reflect.Bool:
|
|
|
|
return true
|
|
|
|
default:
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-02 04:54:33 +01:00
|
|
|
// Assignable returns true if the "k" standard type
|
|
|
|
// is assignabled to this ParamType.
|
|
|
|
func (pt ParamType) Assignable(k reflect.Kind) bool {
|
|
|
|
return pt.Kind() == k
|
|
|
|
}
|
|
|
|
|
Publish the new version :airplane: | Look description please!
# FAQ
### Looking for free support?
http://support.iris-go.com
https://kataras.rocket.chat/channel/iris
### Looking for previous versions?
https://github.com/kataras/iris#version
### Should I upgrade my Iris?
Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready.
> Iris uses the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature, so you get truly reproducible builds, as this method guards against upstream renames and deletes.
**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
For further installation support, please click [here](http://support.iris-go.com/d/16-how-to-install-iris-web-framework).
### About our new home page
http://iris-go.com
Thanks to [Santosh Anand](https://github.com/santoshanand) the http://iris-go.com has been upgraded and it's really awesome!
[Santosh](https://github.com/santoshanand) is a freelancer, he has a great knowledge of nodejs and express js, Android, iOS, React Native, Vue.js etc, if you need a developer to find or create a solution for your problem or task, please contact with him.
The amount of the next two or three donations you'll send they will be immediately transferred to his own account balance, so be generous please!
Read more at https://github.com/kataras/iris/blob/master/HISTORY.md
Former-commit-id: eec2d71bbe011d6b48d2526eb25919e36e5ad94e
2017-06-03 22:22:52 +02:00
|
|
|
var paramTypes = map[string]ParamType{
|
2018-08-23 05:30:12 +02:00
|
|
|
"string": ParamTypeString,
|
|
|
|
|
|
|
|
"number": ParamTypeNumber,
|
|
|
|
"int": ParamTypeNumber, // same as number.
|
|
|
|
"long": ParamTypeInt64,
|
|
|
|
"int64": ParamTypeInt64, // same as long.
|
2018-08-23 23:56:54 +02:00
|
|
|
"uint8": ParamTypeUint8,
|
2018-08-23 05:30:12 +02:00
|
|
|
"uint64": ParamTypeUint64,
|
|
|
|
|
|
|
|
"boolean": ParamTypeBoolean,
|
|
|
|
"bool": ParamTypeBoolean, // same as boolean.
|
|
|
|
|
Publish the new version :airplane: | Look description please!
# FAQ
### Looking for free support?
http://support.iris-go.com
https://kataras.rocket.chat/channel/iris
### Looking for previous versions?
https://github.com/kataras/iris#version
### Should I upgrade my Iris?
Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready.
> Iris uses the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature, so you get truly reproducible builds, as this method guards against upstream renames and deletes.
**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
For further installation support, please click [here](http://support.iris-go.com/d/16-how-to-install-iris-web-framework).
### About our new home page
http://iris-go.com
Thanks to [Santosh Anand](https://github.com/santoshanand) the http://iris-go.com has been upgraded and it's really awesome!
[Santosh](https://github.com/santoshanand) is a freelancer, he has a great knowledge of nodejs and express js, Android, iOS, React Native, Vue.js etc, if you need a developer to find or create a solution for your problem or task, please contact with him.
The amount of the next two or three donations you'll send they will be immediately transferred to his own account balance, so be generous please!
Read more at https://github.com/kataras/iris/blob/master/HISTORY.md
Former-commit-id: eec2d71bbe011d6b48d2526eb25919e36e5ad94e
2017-06-03 22:22:52 +02:00
|
|
|
"alphabetical": ParamTypeAlphabetical,
|
|
|
|
"file": ParamTypeFile,
|
|
|
|
"path": ParamTypePath,
|
|
|
|
// could be named also:
|
|
|
|
// "tail":
|
|
|
|
// "wild"
|
|
|
|
// "wildcard"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-06-12 03:47:16 +02:00
|
|
|
// LookupParamType accepts the string
|
|
|
|
// representation of a parameter type.
|
|
|
|
// Available:
|
|
|
|
// "string"
|
2018-08-23 05:30:12 +02:00
|
|
|
// "number" or "int"
|
|
|
|
// "long" or "int64"
|
2018-08-23 23:56:54 +02:00
|
|
|
// "uint8"
|
2018-08-23 05:30:12 +02:00
|
|
|
// "uint64"
|
|
|
|
// "boolean" or "bool"
|
2017-06-12 03:47:16 +02:00
|
|
|
// "alphabetical"
|
|
|
|
// "file"
|
|
|
|
// "path"
|
Publish the new version :airplane: | Look description please!
# FAQ
### Looking for free support?
http://support.iris-go.com
https://kataras.rocket.chat/channel/iris
### Looking for previous versions?
https://github.com/kataras/iris#version
### Should I upgrade my Iris?
Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready.
> Iris uses the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature, so you get truly reproducible builds, as this method guards against upstream renames and deletes.
**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
For further installation support, please click [here](http://support.iris-go.com/d/16-how-to-install-iris-web-framework).
### About our new home page
http://iris-go.com
Thanks to [Santosh Anand](https://github.com/santoshanand) the http://iris-go.com has been upgraded and it's really awesome!
[Santosh](https://github.com/santoshanand) is a freelancer, he has a great knowledge of nodejs and express js, Android, iOS, React Native, Vue.js etc, if you need a developer to find or create a solution for your problem or task, please contact with him.
The amount of the next two or three donations you'll send they will be immediately transferred to his own account balance, so be generous please!
Read more at https://github.com/kataras/iris/blob/master/HISTORY.md
Former-commit-id: eec2d71bbe011d6b48d2526eb25919e36e5ad94e
2017-06-03 22:22:52 +02:00
|
|
|
func LookupParamType(ident string) ParamType {
|
|
|
|
if typ, ok := paramTypes[ident]; ok {
|
|
|
|
return typ
|
|
|
|
}
|
|
|
|
return ParamTypeUnExpected
|
|
|
|
}
|
|
|
|
|
2017-12-04 04:06:03 +01:00
|
|
|
// LookupParamTypeFromStd accepts the string representation of a standard go type.
|
|
|
|
// It returns a ParamType, but it may differs for example
|
|
|
|
// the alphabetical, file, path and string are all string go types, so
|
|
|
|
// make sure that caller resolves these types before this call.
|
|
|
|
//
|
|
|
|
// string matches to string
|
2018-08-23 05:30:12 +02:00
|
|
|
// int matches to int/number
|
|
|
|
// int64 matches to int64/long
|
|
|
|
// uint64 matches to uint64
|
|
|
|
// bool matches to bool/boolean
|
2017-12-04 04:06:03 +01:00
|
|
|
func LookupParamTypeFromStd(goType string) ParamType {
|
|
|
|
switch goType {
|
|
|
|
case "string":
|
|
|
|
return ParamTypeString
|
|
|
|
case "int":
|
2018-08-23 05:30:12 +02:00
|
|
|
return ParamTypeNumber
|
2017-12-04 04:06:03 +01:00
|
|
|
case "int64":
|
2018-08-23 05:30:12 +02:00
|
|
|
return ParamTypeInt64
|
2018-08-23 23:56:54 +02:00
|
|
|
case "uint8":
|
|
|
|
return ParamTypeUint8
|
2018-08-23 05:30:12 +02:00
|
|
|
case "uint64":
|
|
|
|
return ParamTypeUint64
|
2017-12-04 04:06:03 +01:00
|
|
|
case "bool":
|
|
|
|
return ParamTypeBoolean
|
|
|
|
default:
|
|
|
|
return ParamTypeUnExpected
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-06-12 03:47:16 +02:00
|
|
|
// ParamStatement is a struct
|
|
|
|
// which holds all the necessary information about a macro parameter.
|
|
|
|
// It holds its type (string, int, alphabetical, file, path),
|
|
|
|
// its source ({param:type}),
|
|
|
|
// its name ("param"),
|
|
|
|
// its attached functions by the user (min, max...)
|
|
|
|
// and the http error code if that parameter
|
|
|
|
// failed to be evaluated.
|
Publish the new version :airplane: | Look description please!
# FAQ
### Looking for free support?
http://support.iris-go.com
https://kataras.rocket.chat/channel/iris
### Looking for previous versions?
https://github.com/kataras/iris#version
### Should I upgrade my Iris?
Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready.
> Iris uses the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature, so you get truly reproducible builds, as this method guards against upstream renames and deletes.
**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
For further installation support, please click [here](http://support.iris-go.com/d/16-how-to-install-iris-web-framework).
### About our new home page
http://iris-go.com
Thanks to [Santosh Anand](https://github.com/santoshanand) the http://iris-go.com has been upgraded and it's really awesome!
[Santosh](https://github.com/santoshanand) is a freelancer, he has a great knowledge of nodejs and express js, Android, iOS, React Native, Vue.js etc, if you need a developer to find or create a solution for your problem or task, please contact with him.
The amount of the next two or three donations you'll send they will be immediately transferred to his own account balance, so be generous please!
Read more at https://github.com/kataras/iris/blob/master/HISTORY.md
Former-commit-id: eec2d71bbe011d6b48d2526eb25919e36e5ad94e
2017-06-03 22:22:52 +02:00
|
|
|
type ParamStatement struct {
|
|
|
|
Src string // the original unparsed source, i.e: {id:int range(1,5) else 404}
|
|
|
|
Name string // id
|
|
|
|
Type ParamType // int
|
|
|
|
Funcs []ParamFunc // range
|
|
|
|
ErrorCode int // 404
|
|
|
|
}
|
|
|
|
|
2017-06-12 03:47:16 +02:00
|
|
|
// ParamFunc holds the name of a parameter's function
|
|
|
|
// and its arguments (values)
|
|
|
|
// A param func is declared with:
|
|
|
|
// {param:int range(1,5)},
|
|
|
|
// the range is the
|
|
|
|
// param function name
|
|
|
|
// the 1 and 5 are the two param function arguments
|
2017-03-27 03:09:44 +02:00
|
|
|
// range(1,5)
|
|
|
|
type ParamFunc struct {
|
2018-08-23 16:29:39 +02:00
|
|
|
Name string // range
|
|
|
|
Args []string // ["1","5"]
|
2017-03-27 03:09:44 +02:00
|
|
|
}
|