diff options
author | 2018-01-15 09:59:29 -0800 | |
---|---|---|
committer | 2018-01-15 09:59:29 -0800 | |
commit | 584dd87c70e29abc373f88be52bd2eee287ecace (patch) | |
tree | 6b4ac5286a5345c796071e4e9f7a9e6fce47a5ca /vendor/github.com/emicklei/go-restful/parameter.go | |
parent | d699b89063843d81cee35f128aaef9881439151f (diff) | |
download | coredns-584dd87c70e29abc373f88be52bd2eee287ecace.tar.gz coredns-584dd87c70e29abc373f88be52bd2eee287ecace.tar.zst coredns-584dd87c70e29abc373f88be52bd2eee287ecace.zip |
Add route53 plugin (#1390)
* Update vendor
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add route53 plugin
This fix adds route53 plugin so that it is possible to
query route53 record through CoreDNS.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Diffstat (limited to 'vendor/github.com/emicklei/go-restful/parameter.go')
-rw-r--r-- | vendor/github.com/emicklei/go-restful/parameter.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vendor/github.com/emicklei/go-restful/parameter.go b/vendor/github.com/emicklei/go-restful/parameter.go index e11c8162a..e8793304b 100644 --- a/vendor/github.com/emicklei/go-restful/parameter.go +++ b/vendor/github.com/emicklei/go-restful/parameter.go @@ -19,8 +19,30 @@ const ( // FormParameterKind = indicator of Request parameter type "form" FormParameterKind + + // CollectionFormatCSV comma separated values `foo,bar` + CollectionFormatCSV = CollectionFormat("csv") + + // CollectionFormatSSV space separated values `foo bar` + CollectionFormatSSV = CollectionFormat("ssv") + + // CollectionFormatTSV tab separated values `foo\tbar` + CollectionFormatTSV = CollectionFormat("tsv") + + // CollectionFormatPipes pipe separated values `foo|bar` + CollectionFormatPipes = CollectionFormat("pipes") + + // CollectionFormatMulti corresponds to multiple parameter instances instead of multiple values for a single + // instance `foo=bar&foo=baz`. This is valid only for QueryParameters and FormParameters + CollectionFormatMulti = CollectionFormat("multi") ) +type CollectionFormat string + +func (cf CollectionFormat) String() string { + return string(cf) +} + // Parameter is for documententing the parameter used in a Http Request // ParameterData kinds are Path,Query and Body type Parameter struct { @@ -36,6 +58,7 @@ type ParameterData struct { AllowableValues map[string]string AllowMultiple bool DefaultValue string + CollectionFormat string } // Data returns the state of the Parameter @@ -112,3 +135,9 @@ func (p *Parameter) Description(doc string) *Parameter { p.data.Description = doc return p } + +// CollectionFormat sets the collection format for an array type +func (p *Parameter) CollectionFormat(format CollectionFormat) *Parameter { + p.data.CollectionFormat = format.String() + return p +} |