mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 10:18:13 +00:00 
			
		
		
		
	Update go-restful dependency
This commit is contained in:
		
							
								
								
									
										20
									
								
								Godeps/Godeps.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										20
									
								
								Godeps/Godeps.json
									
									
									
										generated
									
									
									
								
							| @@ -1,7 +1,7 @@ | |||||||
| { | { | ||||||
| 	"ImportPath": "k8s.io/kubernetes", | 	"ImportPath": "k8s.io/kubernetes", | ||||||
| 	"GoVersion": "go1.7", | 	"GoVersion": "go1.7", | ||||||
| 	"GodepVersion": "v79", | 	"GodepVersion": "v74", | ||||||
| 	"Packages": [ | 	"Packages": [ | ||||||
| 		"github.com/ugorji/go/codec/codecgen", | 		"github.com/ugorji/go/codec/codecgen", | ||||||
| 		"github.com/onsi/ginkgo/ginkgo", | 		"github.com/onsi/ginkgo/ginkgo", | ||||||
| @@ -980,18 +980,18 @@ | |||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful", | 			"ImportPath": "github.com/emicklei/go-restful", | ||||||
| 			"Comment": "v1.2-96-g09691a3", | 			"Comment": "2.2.0-4-gff4f55a", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"ImportPath": "github.com/emicklei/go-restful-swagger12", | ||||||
|  | 			"Comment": "1.0.1", | ||||||
|  | 			"Rev": "dcef7f55730566d41eae5db10e7d6981829720f6" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful/log", | 			"ImportPath": "github.com/emicklei/go-restful/log", | ||||||
| 			"Comment": "v1.2-96-g09691a3", | 			"Comment": "2.2.0-4-gff4f55a", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
| 		}, |  | ||||||
| 		{ |  | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful/swagger", |  | ||||||
| 			"Comment": "v1.2-96-g09691a3", |  | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" |  | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/evanphx/json-patch", | 			"ImportPath": "github.com/evanphx/json-patch", | ||||||
|   | |||||||
							
								
								
									
										8
									
								
								Godeps/LICENSES
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										8
									
								
								Godeps/LICENSES
									
									
									
										generated
									
									
									
								
							| @@ -34674,9 +34674,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| ================================================================================ | ================================================================================ | ||||||
| = vendor/github.com/emicklei/go-restful/log licensed under: = | = vendor/github.com/emicklei/go-restful-swagger12 licensed under: = | ||||||
| 
 | 
 | ||||||
| Copyright (c) 2012,2013 Ernest Micklei | Copyright (c) 2017 Ernest Micklei | ||||||
| 
 | 
 | ||||||
| MIT License | MIT License | ||||||
| 
 | 
 | ||||||
| @@ -34698,12 +34698,12 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |||||||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||||||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||||||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||||
| = vendor/github.com/emicklei/go-restful/LICENSE 2ebc1c12a0f4eae5394522e31961e1de  - | = vendor/github.com/emicklei/go-restful-swagger12/LICENSE b1ce415d97e837c8677d332b274d4f0b  - | ||||||
| ================================================================================ | ================================================================================ | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| ================================================================================ | ================================================================================ | ||||||
| = vendor/github.com/emicklei/go-restful/swagger licensed under: = | = vendor/github.com/emicklei/go-restful/log licensed under: = | ||||||
| 
 | 
 | ||||||
| Copyright (c) 2012,2013 Ernest Micklei | Copyright (c) 2012,2013 Ernest Micklei | ||||||
| 
 | 
 | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ go_library( | |||||||
|         "//pkg/capabilities:go_default_library", |         "//pkg/capabilities:go_default_library", | ||||||
|         "//pkg/features:go_default_library", |         "//pkg/features:go_default_library", | ||||||
|         "//pkg/security/apparmor:go_default_library", |         "//pkg/security/apparmor:go_default_library", | ||||||
|         "//vendor/github.com/emicklei/go-restful/swagger:go_default_library", |         "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", | ||||||
|         "//vendor/github.com/exponent-io/jsonpath:go_default_library", |         "//vendor/github.com/exponent-io/jsonpath:go_default_library", | ||||||
|         "//vendor/github.com/golang/glog:go_default_library", |         "//vendor/github.com/golang/glog:go_default_library", | ||||||
|         "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", |         "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ import ( | |||||||
| 	"regexp" | 	"regexp" | ||||||
| 	"strings" | 	"strings" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
| 	ejson "github.com/exponent-io/jsonpath" | 	ejson "github.com/exponent-io/jsonpath" | ||||||
| 	"github.com/golang/glog" | 	"github.com/golang/glog" | ||||||
| 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" | 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" | ||||||
|   | |||||||
| @@ -83,7 +83,7 @@ go_library( | |||||||
|         "//pkg/printers/internalversion:go_default_library", |         "//pkg/printers/internalversion:go_default_library", | ||||||
|         "//pkg/util:go_default_library", |         "//pkg/util:go_default_library", | ||||||
|         "//pkg/util/slice:go_default_library", |         "//pkg/util/slice:go_default_library", | ||||||
|         "//vendor/github.com/emicklei/go-restful/swagger:go_default_library", |         "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", | ||||||
|         "//vendor/github.com/golang/glog:go_default_library", |         "//vendor/github.com/golang/glog:go_default_library", | ||||||
|         "//vendor/github.com/spf13/cobra:go_default_library", |         "//vendor/github.com/spf13/cobra:go_default_library", | ||||||
|         "//vendor/github.com/spf13/pflag:go_default_library", |         "//vendor/github.com/spf13/pflag:go_default_library", | ||||||
|   | |||||||
| @@ -23,7 +23,7 @@ go_library( | |||||||
|         "//pkg/kubectl/plugins:go_default_library", |         "//pkg/kubectl/plugins:go_default_library", | ||||||
|         "//pkg/kubectl/resource:go_default_library", |         "//pkg/kubectl/resource:go_default_library", | ||||||
|         "//pkg/printers:go_default_library", |         "//pkg/printers:go_default_library", | ||||||
|         "//vendor/github.com/emicklei/go-restful/swagger:go_default_library", |         "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", | ||||||
|         "//vendor/github.com/spf13/cobra:go_default_library", |         "//vendor/github.com/spf13/cobra:go_default_library", | ||||||
|         "//vendor/github.com/spf13/pflag:go_default_library", |         "//vendor/github.com/spf13/pflag:go_default_library", | ||||||
|         "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", |         "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", | ||||||
|   | |||||||
| @@ -23,7 +23,7 @@ import ( | |||||||
| 	"path/filepath" | 	"path/filepath" | ||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
| 	"github.com/spf13/cobra" | 	"github.com/spf13/cobra" | ||||||
| 	"github.com/spf13/pflag" | 	"github.com/spf13/pflag" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -44,7 +44,7 @@ go_library( | |||||||
|         "//pkg/printers/internalversion:go_default_library", |         "//pkg/printers/internalversion:go_default_library", | ||||||
|         "//pkg/util/exec:go_default_library", |         "//pkg/util/exec:go_default_library", | ||||||
|         "//pkg/version:go_default_library", |         "//pkg/version:go_default_library", | ||||||
|         "//vendor/github.com/emicklei/go-restful/swagger:go_default_library", |         "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", | ||||||
|         "//vendor/github.com/evanphx/json-patch:go_default_library", |         "//vendor/github.com/evanphx/json-patch:go_default_library", | ||||||
|         "//vendor/github.com/go-openapi/spec:go_default_library", |         "//vendor/github.com/go-openapi/spec:go_default_library", | ||||||
|         "//vendor/github.com/golang/glog:go_default_library", |         "//vendor/github.com/golang/glog:go_default_library", | ||||||
| @@ -104,7 +104,7 @@ go_test( | |||||||
|         "//pkg/kubectl:go_default_library", |         "//pkg/kubectl:go_default_library", | ||||||
|         "//pkg/kubectl/resource:go_default_library", |         "//pkg/kubectl/resource:go_default_library", | ||||||
|         "//pkg/util/exec:go_default_library", |         "//pkg/util/exec:go_default_library", | ||||||
|         "//vendor/github.com/emicklei/go-restful/swagger:go_default_library", |         "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", | ||||||
|         "//vendor/github.com/go-openapi/spec:go_default_library", |         "//vendor/github.com/go-openapi/spec:go_default_library", | ||||||
|         "//vendor/github.com/stretchr/testify/assert:go_default_library", |         "//vendor/github.com/stretchr/testify/assert:go_default_library", | ||||||
|         "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", |         "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
| 	"github.com/go-openapi/spec" | 	"github.com/go-openapi/spec" | ||||||
| 	"github.com/golang/glog" | 	"github.com/golang/glog" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ import ( | |||||||
| 	"testing" | 	"testing" | ||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
| 	"github.com/go-openapi/spec" | 	"github.com/go-openapi/spec" | ||||||
| 	"github.com/stretchr/testify/assert" | 	"github.com/stretchr/testify/assert" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ import ( | |||||||
| 	"strings" | 	"strings" | ||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
| 	"github.com/golang/glog" | 	"github.com/golang/glog" | ||||||
| 	"github.com/spf13/cobra" | 	"github.com/spf13/cobra" | ||||||
| 	"github.com/spf13/pflag" | 	"github.com/spf13/pflag" | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
|  |  | ||||||
| 	"k8s.io/apimachinery/pkg/api/meta" | 	"k8s.io/apimachinery/pkg/api/meta" | ||||||
| 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ import ( | |||||||
| 	"io" | 	"io" | ||||||
| 	"strings" | 	"strings" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
|  |  | ||||||
| 	"k8s.io/apimachinery/pkg/api/meta" | 	"k8s.io/apimachinery/pkg/api/meta" | ||||||
| 	apiutil "k8s.io/kubernetes/pkg/api/util" | 	apiutil "k8s.io/kubernetes/pkg/api/util" | ||||||
|   | |||||||
| @@ -32,11 +32,11 @@ | |||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful", | 			"ImportPath": "github.com/emicklei/go-restful", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful/log", | 			"ImportPath": "github.com/emicklei/go-restful/log", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/evanphx/json-patch", | 			"ImportPath": "github.com/evanphx/json-patch", | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								staging/src/k8s.io/apiserver/Godeps/Godeps.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										12
									
								
								staging/src/k8s.io/apiserver/Godeps/Godeps.json
									
									
									
										generated
									
									
									
								
							| @@ -316,15 +316,15 @@ | |||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful", | 			"ImportPath": "github.com/emicklei/go-restful", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"ImportPath": "github.com/emicklei/go-restful-swagger12", | ||||||
|  | 			"Rev": "dcef7f55730566d41eae5db10e7d6981829720f6" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful/log", | 			"ImportPath": "github.com/emicklei/go-restful/log", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
| 		}, |  | ||||||
| 		{ |  | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful/swagger", |  | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" |  | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/evanphx/json-patch", | 			"ImportPath": "github.com/evanphx/json-patch", | ||||||
|   | |||||||
| @@ -55,7 +55,7 @@ go_library( | |||||||
|     tags = ["automanaged"], |     tags = ["automanaged"], | ||||||
|     deps = [ |     deps = [ | ||||||
|         "//vendor/github.com/coreos/go-systemd/daemon:go_default_library", |         "//vendor/github.com/coreos/go-systemd/daemon:go_default_library", | ||||||
|         "//vendor/github.com/emicklei/go-restful/swagger:go_default_library", |         "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", | ||||||
|         "//vendor/github.com/go-openapi/spec:go_default_library", |         "//vendor/github.com/go-openapi/spec:go_default_library", | ||||||
|         "//vendor/github.com/golang/glog:go_default_library", |         "//vendor/github.com/golang/glog:go_default_library", | ||||||
|         "//vendor/github.com/pborman/uuid:go_default_library", |         "//vendor/github.com/pborman/uuid:go_default_library", | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ import ( | |||||||
| 	"strings" | 	"strings" | ||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
| 	"github.com/go-openapi/spec" | 	"github.com/go-openapi/spec" | ||||||
| 	"github.com/pborman/uuid" | 	"github.com/pborman/uuid" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -25,7 +25,7 @@ import ( | |||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	systemd "github.com/coreos/go-systemd/daemon" | 	systemd "github.com/coreos/go-systemd/daemon" | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
| 	"github.com/golang/glog" | 	"github.com/golang/glog" | ||||||
|  |  | ||||||
| 	"k8s.io/apimachinery/pkg/apimachinery" | 	"k8s.io/apimachinery/pkg/apimachinery" | ||||||
|   | |||||||
| @@ -23,7 +23,7 @@ go_library( | |||||||
|     deps = [ |     deps = [ | ||||||
|         "//vendor/github.com/elazarl/go-bindata-assetfs:go_default_library", |         "//vendor/github.com/elazarl/go-bindata-assetfs:go_default_library", | ||||||
|         "//vendor/github.com/emicklei/go-restful:go_default_library", |         "//vendor/github.com/emicklei/go-restful:go_default_library", | ||||||
|         "//vendor/github.com/emicklei/go-restful/swagger:go_default_library", |         "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", | ||||||
|         "//vendor/github.com/golang/glog:go_default_library", |         "//vendor/github.com/golang/glog:go_default_library", | ||||||
|         "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", |         "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", | ||||||
|         "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", |         "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", | ||||||
|   | |||||||
| @@ -19,7 +19,7 @@ package routes | |||||||
| import ( | import ( | ||||||
| 	"k8s.io/apiserver/pkg/server/mux" | 	"k8s.io/apiserver/pkg/server/mux" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| // Swagger installs the /swaggerapi/ endpoint to allow schema discovery | // Swagger installs the /swaggerapi/ endpoint to allow schema discovery | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								staging/src/k8s.io/client-go/Godeps/Godeps.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										12
									
								
								staging/src/k8s.io/client-go/Godeps/Godeps.json
									
									
									
										generated
									
									
									
								
							| @@ -68,15 +68,15 @@ | |||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful", | 			"ImportPath": "github.com/emicklei/go-restful", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"ImportPath": "github.com/emicklei/go-restful-swagger12", | ||||||
|  | 			"Rev": "dcef7f55730566d41eae5db10e7d6981829720f6" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful/log", | 			"ImportPath": "github.com/emicklei/go-restful/log", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
| 		}, |  | ||||||
| 		{ |  | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful/swagger", |  | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" |  | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/ghodss/yaml", | 			"ImportPath": "github.com/ghodss/yaml", | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ go_library( | |||||||
|     ], |     ], | ||||||
|     tags = ["automanaged"], |     tags = ["automanaged"], | ||||||
|     deps = [ |     deps = [ | ||||||
|         "//vendor/github.com/emicklei/go-restful/swagger:go_default_library", |         "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", | ||||||
|         "//vendor/github.com/go-openapi/loads:go_default_library", |         "//vendor/github.com/go-openapi/loads:go_default_library", | ||||||
|         "//vendor/github.com/go-openapi/spec:go_default_library", |         "//vendor/github.com/go-openapi/spec:go_default_library", | ||||||
|         "//vendor/github.com/golang/glog:go_default_library", |         "//vendor/github.com/golang/glog:go_default_library", | ||||||
| @@ -45,7 +45,7 @@ go_test( | |||||||
|     ], |     ], | ||||||
|     tags = ["automanaged"], |     tags = ["automanaged"], | ||||||
|     deps = [ |     deps = [ | ||||||
|         "//vendor/github.com/emicklei/go-restful/swagger:go_default_library", |         "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", | ||||||
|         "//vendor/github.com/go-openapi/spec:go_default_library", |         "//vendor/github.com/go-openapi/spec:go_default_library", | ||||||
|         "//vendor/github.com/stretchr/testify/assert:go_default_library", |         "//vendor/github.com/stretchr/testify/assert:go_default_library", | ||||||
|         "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", |         "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", | ||||||
|   | |||||||
| @@ -23,7 +23,7 @@ import ( | |||||||
| 	"sort" | 	"sort" | ||||||
| 	"strings" | 	"strings" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
|  |  | ||||||
| 	"github.com/go-openapi/loads" | 	"github.com/go-openapi/loads" | ||||||
| 	"github.com/go-openapi/spec" | 	"github.com/go-openapi/spec" | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ import ( | |||||||
| 	"reflect" | 	"reflect" | ||||||
| 	"testing" | 	"testing" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
|  |  | ||||||
| 	"github.com/go-openapi/spec" | 	"github.com/go-openapi/spec" | ||||||
| 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||||
|   | |||||||
| @@ -12,7 +12,7 @@ go_library( | |||||||
|     srcs = ["discovery.go"], |     srcs = ["discovery.go"], | ||||||
|     tags = ["automanaged"], |     tags = ["automanaged"], | ||||||
|     deps = [ |     deps = [ | ||||||
|         "//vendor/github.com/emicklei/go-restful/swagger:go_default_library", |         "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", | ||||||
|         "//vendor/github.com/go-openapi/spec:go_default_library", |         "//vendor/github.com/go-openapi/spec:go_default_library", | ||||||
|         "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", |         "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", | ||||||
|         "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", |         "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", | ||||||
|   | |||||||
| @@ -19,7 +19,7 @@ package fake | |||||||
| import ( | import ( | ||||||
| 	"fmt" | 	"fmt" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
|  |  | ||||||
| 	"github.com/go-openapi/spec" | 	"github.com/go-openapi/spec" | ||||||
| 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ import ( | |||||||
| 	restclient "k8s.io/client-go/rest" | 	restclient "k8s.io/client-go/rest" | ||||||
| 	"k8s.io/client-go/rest/fake" | 	"k8s.io/client-go/rest/fake" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/swagger" | 	"github.com/emicklei/go-restful-swagger12" | ||||||
| 	"github.com/go-openapi/spec" | 	"github.com/go-openapi/spec" | ||||||
| 	"github.com/stretchr/testify/assert" | 	"github.com/stretchr/testify/assert" | ||||||
| ) | ) | ||||||
|   | |||||||
| @@ -104,15 +104,15 @@ | |||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful", | 			"ImportPath": "github.com/emicklei/go-restful", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"ImportPath": "github.com/emicklei/go-restful-swagger12", | ||||||
|  | 			"Rev": "dcef7f55730566d41eae5db10e7d6981829720f6" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful/log", | 			"ImportPath": "github.com/emicklei/go-restful/log", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
| 		}, |  | ||||||
| 		{ |  | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful/swagger", |  | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" |  | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/evanphx/json-patch", | 			"ImportPath": "github.com/evanphx/json-patch", | ||||||
|   | |||||||
| @@ -96,15 +96,15 @@ | |||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful", | 			"ImportPath": "github.com/emicklei/go-restful", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"ImportPath": "github.com/emicklei/go-restful-swagger12", | ||||||
|  | 			"Rev": "dcef7f55730566d41eae5db10e7d6981829720f6" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful/log", | 			"ImportPath": "github.com/emicklei/go-restful/log", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
| 		}, |  | ||||||
| 		{ |  | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful/swagger", |  | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" |  | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/evanphx/json-patch", | 			"ImportPath": "github.com/evanphx/json-patch", | ||||||
|   | |||||||
| @@ -96,15 +96,15 @@ | |||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful", | 			"ImportPath": "github.com/emicklei/go-restful", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"ImportPath": "github.com/emicklei/go-restful-swagger12", | ||||||
|  | 			"Rev": "dcef7f55730566d41eae5db10e7d6981829720f6" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful/log", | 			"ImportPath": "github.com/emicklei/go-restful/log", | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" | 			"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" | ||||||
| 		}, |  | ||||||
| 		{ |  | ||||||
| 			"ImportPath": "github.com/emicklei/go-restful/swagger", |  | ||||||
| 			"Rev": "09691a3b6378b740595c1002f40c34dd5f218a22" |  | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/evanphx/json-patch", | 			"ImportPath": "github.com/evanphx/json-patch", | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								vendor/BUILD
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/BUILD
									
									
									
									
										vendored
									
									
								
							| @@ -143,6 +143,7 @@ filegroup( | |||||||
|         "//vendor/github.com/elazarl/go-bindata-assetfs:all-srcs", |         "//vendor/github.com/elazarl/go-bindata-assetfs:all-srcs", | ||||||
|         "//vendor/github.com/elazarl/goproxy:all-srcs", |         "//vendor/github.com/elazarl/goproxy:all-srcs", | ||||||
|         "//vendor/github.com/emicklei/go-restful:all-srcs", |         "//vendor/github.com/emicklei/go-restful:all-srcs", | ||||||
|  |         "//vendor/github.com/emicklei/go-restful-swagger12:all-srcs", | ||||||
|         "//vendor/github.com/evanphx/json-patch:all-srcs", |         "//vendor/github.com/evanphx/json-patch:all-srcs", | ||||||
|         "//vendor/github.com/exponent-io/jsonpath:all-srcs", |         "//vendor/github.com/exponent-io/jsonpath:all-srcs", | ||||||
|         "//vendor/github.com/fatih/camelcase:all-srcs", |         "//vendor/github.com/fatih/camelcase:all-srcs", | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								vendor/github.com/emicklei/go-restful-swagger12/.travis.yml
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/emicklei/go-restful-swagger12/.travis.yml
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | |||||||
|  | language: go | ||||||
|  |  | ||||||
|  | go: | ||||||
|  |   - 1.x | ||||||
| @@ -37,6 +37,9 @@ filegroup( | |||||||
| 
 | 
 | ||||||
| filegroup( | filegroup( | ||||||
|     name = "all-srcs", |     name = "all-srcs", | ||||||
|     srcs = [":package-srcs"], |     srcs = [ | ||||||
|  |         ":package-srcs", | ||||||
|  |         "//vendor/github.com/emicklei/go-restful-swagger12/test_package:all-srcs", | ||||||
|  |     ], | ||||||
|     tags = ["automanaged"], |     tags = ["automanaged"], | ||||||
| ) | ) | ||||||
| @@ -1,5 +1,8 @@ | |||||||
| Change history of swagger | Change history of swagger | ||||||
| = | = | ||||||
|  | 2017-01-30 | ||||||
|  | - moved from go-restful/swagger to go-restful-swagger12 | ||||||
|  | 
 | ||||||
| 2015-10-16 | 2015-10-16 | ||||||
| - add type override mechanism for swagger models (MR 254, nathanejohnson) | - add type override mechanism for swagger models (MR 254, nathanejohnson) | ||||||
| - replace uses of wildcard in generated apidocs (issue 251) | - replace uses of wildcard in generated apidocs (issue 251) | ||||||
							
								
								
									
										22
									
								
								vendor/github.com/emicklei/go-restful-swagger12/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								vendor/github.com/emicklei/go-restful-swagger12/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | |||||||
|  | Copyright (c) 2017 Ernest Micklei | ||||||
|  |  | ||||||
|  | MIT License | ||||||
|  |  | ||||||
|  | Permission is hereby granted, free of charge, to any person obtaining | ||||||
|  | a copy of this software and associated documentation files (the | ||||||
|  | "Software"), to deal in the Software without restriction, including | ||||||
|  | without limitation the rights to use, copy, modify, merge, publish, | ||||||
|  | distribute, sublicense, and/or sell copies of the Software, and to | ||||||
|  | permit persons to whom the Software is furnished to do so, subject to | ||||||
|  | the following conditions: | ||||||
|  |  | ||||||
|  | The above copyright notice and this permission notice shall be | ||||||
|  | included in all copies or substantial portions of the Software. | ||||||
|  |  | ||||||
|  | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||||
|  | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||||
|  | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||||||
|  | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||||||
|  | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||||||
|  | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||||||
|  | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||||
| @@ -1,3 +1,8 @@ | |||||||
|  | # go-restful-swagger12 | ||||||
|  | 
 | ||||||
|  | [](https://travis-ci.org/emicklei/go-restful-swagger12) | ||||||
|  | [](https://godoc.org/github.com/emicklei/go-restful-swagger12) | ||||||
|  | 
 | ||||||
| How to use Swagger UI with go-restful | How to use Swagger UI with go-restful | ||||||
| = | = | ||||||
| 
 | 
 | ||||||
| @@ -74,3 +79,5 @@ Notes | |||||||
| -- | -- | ||||||
| - The Nickname of an Operation is automatically set by finding the name of the function. You can override it using RouteBuilder.Operation(..)  | - The Nickname of an Operation is automatically set by finding the name of the function. You can override it using RouteBuilder.Operation(..)  | ||||||
| - The WebServices field of swagger.Config can be used to control which service you want to expose and document ; you can have multiple configs and therefore multiple endpoints. | - The WebServices field of swagger.Config can be used to control which service you want to expose and document ; you can have multiple configs and therefore multiple endpoints. | ||||||
|  | 
 | ||||||
|  | © 2017, ernestmicklei.com.  MIT License. Contributions welcome. | ||||||
| @@ -226,6 +226,9 @@ func (sws SwaggerService) composeDeclaration(ws *restful.WebService, pathPrefix | |||||||
| 	pathToRoutes := newOrderedRouteMap() | 	pathToRoutes := newOrderedRouteMap() | ||||||
| 	for _, other := range ws.Routes() { | 	for _, other := range ws.Routes() { | ||||||
| 		if strings.HasPrefix(other.Path, pathPrefix) { | 		if strings.HasPrefix(other.Path, pathPrefix) { | ||||||
|  | 			if len(pathPrefix) > 1 && len(other.Path) > len(pathPrefix) && other.Path[len(pathPrefix)] != '/' { | ||||||
|  | 				continue | ||||||
|  | 			} | ||||||
| 			pathToRoutes.Add(other.Path, other) | 			pathToRoutes.Add(other.Path, other) | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| @@ -290,13 +293,12 @@ func composeResponseMessages(route restful.Route, decl *ApiDeclaration, config * | |||||||
| 		if each.Model != nil { | 		if each.Model != nil { | ||||||
| 			st := reflect.TypeOf(each.Model) | 			st := reflect.TypeOf(each.Model) | ||||||
| 			isCollection, st := detectCollectionType(st) | 			isCollection, st := detectCollectionType(st) | ||||||
| 			modelName := modelBuilder{}.keyFrom(st) | 			// collection cannot be in responsemodel | ||||||
| 			if isCollection { | 			if !isCollection { | ||||||
| 				modelName = "array[" + modelName + "]" | 				modelName := modelBuilder{}.keyFrom(st) | ||||||
|  | 				modelBuilder{Models: &decl.Models, Config: config}.addModel(st, "") | ||||||
|  | 				message.ResponseModel = modelName | ||||||
| 			} | 			} | ||||||
| 			modelBuilder{Models: &decl.Models, Config: config}.addModel(st, "") |  | ||||||
| 			// reference the model |  | ||||||
| 			message.ResponseModel = modelName |  | ||||||
| 		} | 		} | ||||||
| 		messages = append(messages, message) | 		messages = append(messages, message) | ||||||
| 	} | 	} | ||||||
| @@ -331,12 +333,13 @@ func detectCollectionType(st reflect.Type) (bool, reflect.Type) { | |||||||
| 
 | 
 | ||||||
| // addModelFromSample creates and adds (or overwrites) a Model from a sample resource | // addModelFromSample creates and adds (or overwrites) a Model from a sample resource | ||||||
| func (sws SwaggerService) addModelFromSampleTo(operation *Operation, isResponse bool, sample interface{}, models *ModelList) { | func (sws SwaggerService) addModelFromSampleTo(operation *Operation, isResponse bool, sample interface{}, models *ModelList) { | ||||||
|  | 	mb := modelBuilder{Models: models, Config: &sws.config} | ||||||
| 	if isResponse { | 	if isResponse { | ||||||
| 		type_, items := asDataType(sample, &sws.config) | 		sampleType, items := asDataType(sample, &sws.config) | ||||||
| 		operation.Type = type_ | 		operation.Type = sampleType | ||||||
| 		operation.Items = items | 		operation.Items = items | ||||||
| 	} | 	} | ||||||
| 	modelBuilder{Models: models, Config: &sws.config}.addModelFrom(sample) | 	mb.addModelFrom(sample) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func asSwaggerParameter(param restful.ParameterData) Parameter { | func asSwaggerParameter(param restful.ParameterData) Parameter { | ||||||
							
								
								
									
										16
									
								
								vendor/github.com/emicklei/go-restful-swagger12/test_package/BUILD
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								vendor/github.com/emicklei/go-restful-swagger12/test_package/BUILD
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | |||||||
|  | package(default_visibility = ["//visibility:public"]) | ||||||
|  |  | ||||||
|  | licenses(["notice"]) | ||||||
|  |  | ||||||
|  | filegroup( | ||||||
|  |     name = "package-srcs", | ||||||
|  |     srcs = glob(["**"]), | ||||||
|  |     tags = ["automanaged"], | ||||||
|  |     visibility = ["//visibility:private"], | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | filegroup( | ||||||
|  |     name = "all-srcs", | ||||||
|  |     srcs = [":package-srcs"], | ||||||
|  |     tags = ["automanaged"], | ||||||
|  | ) | ||||||
							
								
								
									
										6
									
								
								vendor/github.com/emicklei/go-restful/.travis.yml
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								vendor/github.com/emicklei/go-restful/.travis.yml
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | |||||||
|  | language: go | ||||||
|  |  | ||||||
|  | go: | ||||||
|  |   - 1.x | ||||||
|  |  | ||||||
|  | script: go test -v | ||||||
							
								
								
									
										1
									
								
								vendor/github.com/emicklei/go-restful/BUILD
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/github.com/emicklei/go-restful/BUILD
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -53,7 +53,6 @@ filegroup( | |||||||
|     srcs = [ |     srcs = [ | ||||||
|         ":package-srcs", |         ":package-srcs", | ||||||
|         "//vendor/github.com/emicklei/go-restful/log:all-srcs", |         "//vendor/github.com/emicklei/go-restful/log:all-srcs", | ||||||
|         "//vendor/github.com/emicklei/go-restful/swagger:all-srcs", |  | ||||||
|     ], |     ], | ||||||
|     tags = ["automanaged"], |     tags = ["automanaged"], | ||||||
| ) | ) | ||||||
|   | |||||||
							
								
								
									
										110
									
								
								vendor/github.com/emicklei/go-restful/CHANGES.md
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										110
									
								
								vendor/github.com/emicklei/go-restful/CHANGES.md
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,39 +1,71 @@ | |||||||
| Change history of go-restful | Change history of go-restful | ||||||
| = | = | ||||||
|  | 2017-02-16 | ||||||
|  | - solved issue #304, make operation names unique | ||||||
|  |  | ||||||
|  | 2017-01-30 | ||||||
|  |   | ||||||
|  | 	[IMPORTANT] For swagger users, change your import statement to:	 | ||||||
|  | 	swagger "github.com/emicklei/go-restful-swagger12" | ||||||
|  |  | ||||||
|  | - moved swagger 1.2 code to go-restful-swagger12 | ||||||
|  | - created TAG 2.0.0 | ||||||
|  |  | ||||||
|  | 2017-01-27 | ||||||
|  |  | ||||||
|  | - remove defer request body close | ||||||
|  | - expose Dispatch for testing filters and Routefunctions | ||||||
|  | - swagger response model cannot be array  | ||||||
|  | - created TAG 1.0.0 | ||||||
|  |  | ||||||
|  | 2016-12-22 | ||||||
|  |  | ||||||
|  | - (API change) Remove code related to caching request content. Removes SetCacheReadEntity(doCache bool) | ||||||
|  |  | ||||||
| 2016-11-26 | 2016-11-26 | ||||||
|  |  | ||||||
| - Default change! now use CurlyRouter (was RouterJSR311) | - Default change! now use CurlyRouter (was RouterJSR311) | ||||||
| - Default change! no more caching of request content | - Default change! no more caching of request content | ||||||
| - Default change! do not recover from panics | - Default change! do not recover from panics | ||||||
|  |  | ||||||
| 2016-09-22 | 2016-09-22 | ||||||
|  |  | ||||||
| - fix the DefaultRequestContentType feature | - fix the DefaultRequestContentType feature | ||||||
|  |  | ||||||
| 2016-02-14 | 2016-02-14 | ||||||
|  |  | ||||||
| - take the qualify factor of the Accept header mediatype into account when deciding the contentype of the response | - take the qualify factor of the Accept header mediatype into account when deciding the contentype of the response | ||||||
| - add constructors for custom entity accessors for xml and json  | - add constructors for custom entity accessors for xml and json  | ||||||
|  |  | ||||||
| 2015-09-27 | 2015-09-27 | ||||||
|  |  | ||||||
| - rename new WriteStatusAnd... to WriteHeaderAnd... for consistency | - rename new WriteStatusAnd... to WriteHeaderAnd... for consistency | ||||||
|  |  | ||||||
| 2015-09-25 | 2015-09-25 | ||||||
|  |  | ||||||
| - fixed problem with changing Header after WriteHeader (issue 235) | - fixed problem with changing Header after WriteHeader (issue 235) | ||||||
|  |  | ||||||
| 2015-09-14 | 2015-09-14 | ||||||
|  |  | ||||||
| - changed behavior of WriteHeader (immediate write) and WriteEntity (no status write) | - changed behavior of WriteHeader (immediate write) and WriteEntity (no status write) | ||||||
| - added support for custom EntityReaderWriters. | - added support for custom EntityReaderWriters. | ||||||
|  |  | ||||||
| 2015-08-06 | 2015-08-06 | ||||||
|  |  | ||||||
| - add support for reading entities from compressed request content | - add support for reading entities from compressed request content | ||||||
| - use sync.Pool for compressors of http response and request body | - use sync.Pool for compressors of http response and request body | ||||||
| - add Description to Parameter for documentation in Swagger UI | - add Description to Parameter for documentation in Swagger UI | ||||||
|  |  | ||||||
| 2015-03-20 | 2015-03-20 | ||||||
|  |  | ||||||
| - add configurable logging | - add configurable logging | ||||||
|  |  | ||||||
| 2015-03-18 | 2015-03-18 | ||||||
|  |  | ||||||
| - if not specified, the Operation is derived from the Route function | - if not specified, the Operation is derived from the Route function | ||||||
|  |  | ||||||
| 2015-03-17 | 2015-03-17 | ||||||
|  |  | ||||||
| - expose Parameter creation functions | - expose Parameter creation functions | ||||||
| - make trace logger an interface | - make trace logger an interface | ||||||
| - fix OPTIONSFilter | - fix OPTIONSFilter | ||||||
| @@ -42,21 +74,26 @@ Change history of go-restful | |||||||
| - add Notes to Route | - add Notes to Route | ||||||
|  |  | ||||||
| 2014-11-27 | 2014-11-27 | ||||||
|  |  | ||||||
| - (api add) PrettyPrint per response. (as proposed in #167) | - (api add) PrettyPrint per response. (as proposed in #167) | ||||||
|  |  | ||||||
| 2014-11-12 | 2014-11-12 | ||||||
|  |  | ||||||
| - (api add) ApiVersion(.) for documentation in Swagger UI | - (api add) ApiVersion(.) for documentation in Swagger UI | ||||||
|  |  | ||||||
| 2014-11-10 | 2014-11-10 | ||||||
|  |  | ||||||
| - (api change) struct fields tagged with "description" show up in Swagger UI | - (api change) struct fields tagged with "description" show up in Swagger UI | ||||||
|  |  | ||||||
| 2014-10-31 | 2014-10-31 | ||||||
|  |  | ||||||
| - (api change) ReturnsError -> Returns | - (api change) ReturnsError -> Returns | ||||||
| - (api add)    RouteBuilder.Do(aBuilder) for DRY use of RouteBuilder | - (api add)    RouteBuilder.Do(aBuilder) for DRY use of RouteBuilder | ||||||
| - fix swagger nested structs | - fix swagger nested structs | ||||||
| - sort Swagger response messages by code | - sort Swagger response messages by code | ||||||
|  |  | ||||||
| 2014-10-23 | 2014-10-23 | ||||||
|  |  | ||||||
| - (api add) ReturnsError allows you to document Http codes in swagger | - (api add) ReturnsError allows you to document Http codes in swagger | ||||||
| - fixed problem with greedy CurlyRouter | - fixed problem with greedy CurlyRouter | ||||||
| - (api add) Access-Control-Max-Age in CORS | - (api add) Access-Control-Max-Age in CORS | ||||||
| @@ -70,102 +107,117 @@ Change history of go-restful | |||||||
| - (api add) ParameterNamed for detailed documentation | - (api add) ParameterNamed for detailed documentation | ||||||
|  |  | ||||||
| 2014-04-16 | 2014-04-16 | ||||||
|  |  | ||||||
| - (api add) expose constructor of Request for testing. | - (api add) expose constructor of Request for testing. | ||||||
|  |  | ||||||
| 2014-06-27 | 2014-06-27 | ||||||
|  |  | ||||||
| - (api add) ParameterNamed gives access to a Parameter definition and its data (for further specification). | - (api add) ParameterNamed gives access to a Parameter definition and its data (for further specification). | ||||||
| - (api add) SetCacheReadEntity allow scontrol over whether or not the request body is being cached (default true for compatibility reasons). | - (api add) SetCacheReadEntity allow scontrol over whether or not the request body is being cached (default true for compatibility reasons). | ||||||
|  |  | ||||||
| 2014-07-03 | 2014-07-03 | ||||||
|  |  | ||||||
| - (api add) CORS can be configured with a list of allowed domains | - (api add) CORS can be configured with a list of allowed domains | ||||||
|  |  | ||||||
| 2014-03-12 | 2014-03-12 | ||||||
|  |  | ||||||
| - (api add) Route path parameters can use wildcard or regular expressions. (requires CurlyRouter) | - (api add) Route path parameters can use wildcard or regular expressions. (requires CurlyRouter) | ||||||
|  |  | ||||||
| 2014-02-26 | 2014-02-26 | ||||||
|  |  | ||||||
| - (api add) Request now provides information about the matched Route, see method SelectedRoutePath  | - (api add) Request now provides information about the matched Route, see method SelectedRoutePath  | ||||||
|  |  | ||||||
| 2014-02-17 | 2014-02-17 | ||||||
|  |  | ||||||
| - (api change) renamed parameter constants (go-lint checks) | - (api change) renamed parameter constants (go-lint checks) | ||||||
|  |  | ||||||
| 2014-01-10 | 2014-01-10 | ||||||
|  - (api add) support for CloseNotify, see http://golang.org/pkg/net/http/#CloseNotifier |  | ||||||
|  | - (api add) support for CloseNotify, see http://golang.org/pkg/net/http/#CloseNotifier | ||||||
|  |  | ||||||
| 2014-01-07 | 2014-01-07 | ||||||
|  - (api change) Write* methods in Response now return the error or nil. |  | ||||||
|  - added example of serving HTML from a Go template. | - (api change) Write* methods in Response now return the error or nil. | ||||||
|  - fixed comparing Allowed headers in CORS (is now case-insensitive) | - added example of serving HTML from a Go template. | ||||||
|  | - fixed comparing Allowed headers in CORS (is now case-insensitive) | ||||||
|  |  | ||||||
| 2013-11-13 | 2013-11-13 | ||||||
|  - (api add) Response knows how many bytes are written to the response body. |  | ||||||
|  | - (api add) Response knows how many bytes are written to the response body. | ||||||
|  |  | ||||||
| 2013-10-29 | 2013-10-29 | ||||||
|  - (api add) RecoverHandler(handler RecoverHandleFunction) to change how panic recovery is handled. Default behavior is to log and return a stacktrace. This may be a security issue as it exposes sourcecode information. |  | ||||||
|  | - (api add) RecoverHandler(handler RecoverHandleFunction) to change how panic recovery is handled. Default behavior is to log and return a stacktrace. This may be a security issue as it exposes sourcecode information. | ||||||
|  |  | ||||||
| 2013-10-04 | 2013-10-04 | ||||||
|  - (api add) Response knows what HTTP status has been written |  | ||||||
|  - (api add) Request can have attributes (map of string->interface, also called request-scoped variables | - (api add) Response knows what HTTP status has been written | ||||||
|  | - (api add) Request can have attributes (map of string->interface, also called request-scoped variables | ||||||
|  |  | ||||||
| 2013-09-12 | 2013-09-12 | ||||||
|  - (api change) Router interface simplified |  | ||||||
|  - Implemented CurlyRouter, a Router that does not use|allow regular expressions in paths | - (api change) Router interface simplified | ||||||
|  | - Implemented CurlyRouter, a Router that does not use|allow regular expressions in paths | ||||||
|  |  | ||||||
| 2013-08-05 | 2013-08-05 | ||||||
|  - add OPTIONS support |  - add OPTIONS support | ||||||
|  - add CORS support |  - add CORS support | ||||||
|  |  | ||||||
| 2013-08-27 | 2013-08-27 | ||||||
|  - fixed some reported issues (see github) |  | ||||||
|  - (api change) deprecated use of WriteError; use WriteErrorString instead | - fixed some reported issues (see github) | ||||||
|  | - (api change) deprecated use of WriteError; use WriteErrorString instead | ||||||
|  |  | ||||||
| 2014-04-15 | 2014-04-15 | ||||||
|  - (fix) v1.0.1 tag: fix Issue 111: WriteErrorString |  | ||||||
|  | - (fix) v1.0.1 tag: fix Issue 111: WriteErrorString | ||||||
|  |  | ||||||
| 2013-08-08 | 2013-08-08 | ||||||
|  - (api add) Added implementation Container: a WebServices collection with its own http.ServeMux allowing multiple endpoints per program. Existing uses of go-restful will register their services to the DefaultContainer. |  | ||||||
|  - (api add) the swagger package has be extended to have a UI per container. | - (api add) Added implementation Container: a WebServices collection with its own http.ServeMux allowing multiple endpoints per program. Existing uses of go-restful will register their services to the DefaultContainer. | ||||||
|  - if panic is detected then a small stack trace is printed (thanks to runner-mei) | - (api add) the swagger package has be extended to have a UI per container. | ||||||
|  - (api add) WriteErrorString to Response | - if panic is detected then a small stack trace is printed (thanks to runner-mei) | ||||||
|  | - (api add) WriteErrorString to Response | ||||||
|  |  | ||||||
| Important API changes: | Important API changes: | ||||||
|  |  | ||||||
|  - (api remove) package variable DoNotRecover no longer works ; use restful.DefaultContainer.DoNotRecover(true) instead. | - (api remove) package variable DoNotRecover no longer works ; use restful.DefaultContainer.DoNotRecover(true) instead. | ||||||
|  - (api remove) package variable EnableContentEncoding no longer works ; use restful.DefaultContainer.EnableContentEncoding(true) instead. | - (api remove) package variable EnableContentEncoding no longer works ; use restful.DefaultContainer.EnableContentEncoding(true) instead. | ||||||
|   |   | ||||||
|   |   | ||||||
| 2013-07-06 | 2013-07-06 | ||||||
|  |  | ||||||
|  - (api add) Added support for response encoding (gzip and deflate(zlib)). This feature is disabled on default (for backwards compatibility). Use restful.EnableContentEncoding = true in your initialization to enable this feature. | - (api add) Added support for response encoding (gzip and deflate(zlib)). This feature is disabled on default (for backwards compatibility). Use restful.EnableContentEncoding = true in your initialization to enable this feature. | ||||||
|  |  | ||||||
| 2013-06-19 | 2013-06-19 | ||||||
|  |  | ||||||
|  - (improve) DoNotRecover option, moved request body closer, improved ReadEntity | - (improve) DoNotRecover option, moved request body closer, improved ReadEntity | ||||||
|  |  | ||||||
| 2013-06-03 | 2013-06-03 | ||||||
|  |  | ||||||
|  - (api change) removed Dispatcher interface, hide PathExpression | - (api change) removed Dispatcher interface, hide PathExpression | ||||||
|  - changed receiver names of type functions to be more idiomatic Go | - changed receiver names of type functions to be more idiomatic Go | ||||||
|  |  | ||||||
| 2013-06-02 | 2013-06-02 | ||||||
|  |  | ||||||
|  - (optimize) Cache the RegExp compilation of Paths. | - (optimize) Cache the RegExp compilation of Paths. | ||||||
|  |  | ||||||
| 2013-05-22 | 2013-05-22 | ||||||
| 	 | 	 | ||||||
|  - (api add) Added support for request/response filter functions | - (api add) Added support for request/response filter functions | ||||||
|  |  | ||||||
| 2013-05-18 | 2013-05-18 | ||||||
|  |  | ||||||
|  |  | ||||||
|  - (api add) Added feature to change the default Http Request Dispatch function (travis cline) | - (api add) Added feature to change the default Http Request Dispatch function (travis cline) | ||||||
|  - (api change) Moved Swagger Webservice to swagger package (see example restful-user) | - (api change) Moved Swagger Webservice to swagger package (see example restful-user) | ||||||
|  |  | ||||||
| [2012-11-14 .. 2013-05-18> | [2012-11-14 .. 2013-05-18> | ||||||
|   |   | ||||||
|  - See https://github.com/emicklei/go-restful/commits | - See https://github.com/emicklei/go-restful/commits | ||||||
|  |  | ||||||
| 2012-11-14 | 2012-11-14 | ||||||
|  |  | ||||||
|  - Initial commit | - Initial commit | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										7
									
								
								vendor/github.com/emicklei/go-restful/Makefile
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								vendor/github.com/emicklei/go-restful/Makefile
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | |||||||
|  | all: test | ||||||
|  |  | ||||||
|  | test: | ||||||
|  | 	go test -v . | ||||||
|  |  | ||||||
|  | ex: | ||||||
|  | 	cd examples && ls *.go | xargs go build -o /tmp/ignore | ||||||
							
								
								
									
										24
									
								
								vendor/github.com/emicklei/go-restful/README.md
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								vendor/github.com/emicklei/go-restful/README.md
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,8 +1,13 @@ | |||||||
| go-restful | go-restful | ||||||
| ========== | ========== | ||||||
|  |  | ||||||
| package for building REST-style Web Services using Google Go | package for building REST-style Web Services using Google Go | ||||||
|  |  | ||||||
|  | [](https://travis-ci.org/emicklei/go-restful) | ||||||
|  | [](https://goreportcard.com/report/github.com/emicklei/go-restful) | ||||||
|  | [](https://godoc.org/github.com/emicklei/go-restful) | ||||||
|  |  | ||||||
|  | - [Code examples](https://github.com/emicklei/go-restful/tree/master/examples) | ||||||
|  |  | ||||||
| REST asks developers to use HTTP methods explicitly and in a way that's consistent with the protocol definition. This basic REST design principle establishes a one-to-one mapping between create, read, update, and delete (CRUD) operations and HTTP methods. According to this mapping: | REST asks developers to use HTTP methods explicitly and in a way that's consistent with the protocol definition. This basic REST design principle establishes a one-to-one mapping between create, read, update, and delete (CRUD) operations and HTTP methods. According to this mapping: | ||||||
|  |  | ||||||
| - GET = Retrieve a representation of a resource | - GET = Retrieve a representation of a resource | ||||||
| @@ -40,35 +45,30 @@ func (u UserResource) findUser(request *restful.Request, response *restful.Respo | |||||||
|  |  | ||||||
| - Routes for request → function mapping with path parameter (e.g. {id}) support | - Routes for request → function mapping with path parameter (e.g. {id}) support | ||||||
| - Configurable router: | - Configurable router: | ||||||
| 	- Routing algorithm after [JSR311](http://jsr311.java.net/nonav/releases/1.1/spec/spec.html) that is implemented using (but does **not** accept) regular expressions (See RouterJSR311 which is used by default) | 	- (default) Fast routing algorithm that allows static elements, regular expressions and dynamic parameters in the URL path (e.g. /meetings/{id} or /static/{subpath:*} | ||||||
| 	- Fast routing algorithm that allows static elements, regular expressions and dynamic parameters in the URL path (e.g. /meetings/{id} or /static/{subpath:*}, See CurlyRouter) | 	- Routing algorithm after [JSR311](http://jsr311.java.net/nonav/releases/1.1/spec/spec.html) that is implemented using (but does **not** accept) regular expressions | ||||||
| - Request API for reading structs from JSON/XML and accesing parameters (path,query,header) | - Request API for reading structs from JSON/XML and accesing parameters (path,query,header) | ||||||
| - Response API for writing structs to JSON/XML and setting headers | - Response API for writing structs to JSON/XML and setting headers | ||||||
|  | - Customizable encoding using EntityReaderWriter registration | ||||||
| - Filters for intercepting the request → response flow on Service or Route level | - Filters for intercepting the request → response flow on Service or Route level | ||||||
| - Request-scoped variables using attributes | - Request-scoped variables using attributes | ||||||
| - Containers for WebServices on different HTTP endpoints | - Containers for WebServices on different HTTP endpoints | ||||||
| - Content encoding (gzip,deflate) of request and response payloads | - Content encoding (gzip,deflate) of request and response payloads | ||||||
| - Automatic responses on OPTIONS (using a filter) | - Automatic responses on OPTIONS (using a filter) | ||||||
| - Automatic CORS request handling (using a filter) | - Automatic CORS request handling (using a filter) | ||||||
| - API declaration for Swagger UI (see swagger package) | - API declaration for Swagger UI (see [go-restful-swagger12](https://github.com/emicklei/go-restful-swagger12),[go-restful-openapi](https://github.com/emicklei/go-restful-openapi)) | ||||||
| - Panic recovery to produce HTTP 500, customizable using RecoverHandler(...) | - Panic recovery to produce HTTP 500, customizable using RecoverHandler(...) | ||||||
| - Route errors produce HTTP 404/405/406/415 errors, customizable using ServiceErrorHandler(...) | - Route errors produce HTTP 404/405/406/415 errors, customizable using ServiceErrorHandler(...) | ||||||
| - Configurable (trace) logging | - Configurable (trace) logging | ||||||
| - Customizable encoding using EntityReaderWriter registration |  | ||||||
| - Customizable gzip/deflate readers and writers using CompressorProvider registration | - Customizable gzip/deflate readers and writers using CompressorProvider registration | ||||||
| 	 | 	 | ||||||
| ### Resources | ### Resources | ||||||
|  |  | ||||||
| - [Documentation on godoc.org](http://godoc.org/github.com/emicklei/go-restful) |  | ||||||
| - [Code examples](https://github.com/emicklei/go-restful/tree/master/examples) |  | ||||||
| - [Example posted on blog](http://ernestmicklei.com/2012/11/go-restful-first-working-example/) | - [Example posted on blog](http://ernestmicklei.com/2012/11/go-restful-first-working-example/) | ||||||
| - [Design explained on blog](http://ernestmicklei.com/2012/11/go-restful-api-design/) | - [Design explained on blog](http://ernestmicklei.com/2012/11/go-restful-api-design/) | ||||||
| - [sourcegraph](https://sourcegraph.com/github.com/emicklei/go-restful) | - [sourcegraph](https://sourcegraph.com/github.com/emicklei/go-restful) | ||||||
| - [gopkg.in](https://gopkg.in/emicklei/go-restful.v1) |  | ||||||
| - [showcase: Mora - MongoDB REST Api server](https://github.com/emicklei/mora) | - [showcase: Mora - MongoDB REST Api server](https://github.com/emicklei/mora) | ||||||
|  |  | ||||||
| [](https://drone.io/github.com/emicklei/go-restful/latest) |  | ||||||
|  |  | ||||||
| (c) 2012 - 2015, http://ernestmicklei.com. MIT License |  | ||||||
|  |  | ||||||
| Type ```git shortlog -s``` for a full list of contributors. | Type ```git shortlog -s``` for a full list of contributors. | ||||||
|  |  | ||||||
|  | © 2012 - 2017, http://ernestmicklei.com. MIT License. Contributions are welcome. | ||||||
							
								
								
									
										1
									
								
								vendor/github.com/emicklei/go-restful/compressors.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/github.com/emicklei/go-restful/compressors.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -9,6 +9,7 @@ import ( | |||||||
| 	"compress/zlib" | 	"compress/zlib" | ||||||
| ) | ) | ||||||
|  |  | ||||||
|  | // CompressorProvider describes a component that can provider compressors for the std methods. | ||||||
| type CompressorProvider interface { | type CompressorProvider interface { | ||||||
| 	// Returns a *gzip.Writer which needs to be released later. | 	// Returns a *gzip.Writer which needs to be released later. | ||||||
| 	// Before using it, call Reset(). | 	// Before using it, call Reset(). | ||||||
|   | |||||||
							
								
								
									
										21
									
								
								vendor/github.com/emicklei/go-restful/container.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								vendor/github.com/emicklei/go-restful/container.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -32,7 +32,7 @@ type Container struct { | |||||||
| 	contentEncodingEnabled bool          // default is false | 	contentEncodingEnabled bool          // default is false | ||||||
| } | } | ||||||
|  |  | ||||||
| // NewContainer creates a new Container using a new ServeMux and default router (RouterJSR311) | // NewContainer creates a new Container using a new ServeMux and default router (CurlyRouter) | ||||||
| func NewContainer() *Container { | func NewContainer() *Container { | ||||||
| 	return &Container{ | 	return &Container{ | ||||||
| 		webServices:            []*WebService{}, | 		webServices:            []*WebService{}, | ||||||
| @@ -74,7 +74,7 @@ func (c *Container) DoNotRecover(doNot bool) { | |||||||
| 	c.doNotRecover = doNot | 	c.doNotRecover = doNot | ||||||
| } | } | ||||||
|  |  | ||||||
| // Router changes the default Router (currently RouterJSR311) | // Router changes the default Router (currently CurlyRouter) | ||||||
| func (c *Container) Router(aRouter RouteSelector) { | func (c *Container) Router(aRouter RouteSelector) { | ||||||
| 	c.router = aRouter | 	c.router = aRouter | ||||||
| } | } | ||||||
| @@ -188,6 +188,17 @@ func writeServiceError(err ServiceError, req *Request, resp *Response) { | |||||||
| 	resp.WriteErrorString(err.Code, err.Message) | 	resp.WriteErrorString(err.Code, err.Message) | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // Dispatch the incoming Http Request to a matching WebService. | ||||||
|  | func (c *Container) Dispatch(httpWriter http.ResponseWriter, httpRequest *http.Request) { | ||||||
|  | 	if httpWriter == nil { | ||||||
|  | 		panic("httpWriter cannot be nil") | ||||||
|  | 	} | ||||||
|  | 	if httpRequest == nil { | ||||||
|  | 		panic("httpRequest cannot be nil") | ||||||
|  | 	} | ||||||
|  | 	c.dispatch(httpWriter, httpRequest) | ||||||
|  | } | ||||||
|  |  | ||||||
| // Dispatch the incoming Http Request to a matching WebService. | // Dispatch the incoming Http Request to a matching WebService. | ||||||
| func (c *Container) dispatch(httpWriter http.ResponseWriter, httpRequest *http.Request) { | func (c *Container) dispatch(httpWriter http.ResponseWriter, httpRequest *http.Request) { | ||||||
| 	writer := httpWriter | 	writer := httpWriter | ||||||
| @@ -208,12 +219,6 @@ func (c *Container) dispatch(httpWriter http.ResponseWriter, httpRequest *http.R | |||||||
| 			} | 			} | ||||||
| 		}() | 		}() | ||||||
| 	} | 	} | ||||||
| 	// Install closing the request body (if any) |  | ||||||
| 	defer func() { |  | ||||||
| 		if nil != httpRequest.Body { |  | ||||||
| 			httpRequest.Body.Close() |  | ||||||
| 		} |  | ||||||
| 	}() |  | ||||||
|  |  | ||||||
| 	// Detect if compression is needed | 	// Detect if compression is needed | ||||||
| 	// assume without compression, test for override | 	// assume without compression, test for override | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								vendor/github.com/emicklei/go-restful/doc.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/emicklei/go-restful/doc.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,5 +1,5 @@ | |||||||
| /* | /* | ||||||
| Package restful, a lean package for creating REST-style WebServices without magic. | Package restful , a lean package for creating REST-style WebServices without magic. | ||||||
|  |  | ||||||
| WebServices and Routes | WebServices and Routes | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										10
									
								
								vendor/github.com/emicklei/go-restful/install.sh
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								vendor/github.com/emicklei/go-restful/install.sh
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,10 +0,0 @@ | |||||||
| go test -test.v ...restful && \ |  | ||||||
| go test -test.v ...swagger && \ |  | ||||||
| go vet ...restful && \ |  | ||||||
| go fmt ...swagger && \ |  | ||||||
| go install ...swagger && \ |  | ||||||
| go fmt ...restful && \ |  | ||||||
| go install ...restful |  | ||||||
| cd examples |  | ||||||
| 	ls *.go | xargs -I {} go build -o /tmp/ignore {} |  | ||||||
| 	cd .. |  | ||||||
							
								
								
									
										5
									
								
								vendor/github.com/emicklei/go-restful/log/log.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								vendor/github.com/emicklei/go-restful/log/log.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -5,7 +5,7 @@ import ( | |||||||
| 	"os" | 	"os" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| // Logger corresponds to a minimal subset of the interface satisfied by stdlib log.Logger | // StdLogger corresponds to a minimal subset of the interface satisfied by stdlib log.Logger | ||||||
| type StdLogger interface { | type StdLogger interface { | ||||||
| 	Print(v ...interface{}) | 	Print(v ...interface{}) | ||||||
| 	Printf(format string, v ...interface{}) | 	Printf(format string, v ...interface{}) | ||||||
| @@ -18,14 +18,17 @@ func init() { | |||||||
| 	SetLogger(stdlog.New(os.Stderr, "[restful] ", stdlog.LstdFlags|stdlog.Lshortfile)) | 	SetLogger(stdlog.New(os.Stderr, "[restful] ", stdlog.LstdFlags|stdlog.Lshortfile)) | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // SetLogger sets the logger for this package | ||||||
| func SetLogger(customLogger StdLogger) { | func SetLogger(customLogger StdLogger) { | ||||||
| 	Logger = customLogger | 	Logger = customLogger | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // Print delegates to the Logger | ||||||
| func Print(v ...interface{}) { | func Print(v ...interface{}) { | ||||||
| 	Logger.Print(v...) | 	Logger.Print(v...) | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // Printf delegates to the Logger | ||||||
| func Printf(format string, v ...interface{}) { | func Printf(format string, v ...interface{}) { | ||||||
| 	Logger.Printf(format, v...) | 	Logger.Printf(format, v...) | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										23
									
								
								vendor/github.com/emicklei/go-restful/request.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								vendor/github.com/emicklei/go-restful/request.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -5,20 +5,15 @@ package restful | |||||||
| // that can be found in the LICENSE file. | // that can be found in the LICENSE file. | ||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"bytes" |  | ||||||
| 	"compress/zlib" | 	"compress/zlib" | ||||||
| 	"io/ioutil" |  | ||||||
| 	"net/http" | 	"net/http" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| var defaultRequestContentType string | var defaultRequestContentType string | ||||||
|  |  | ||||||
| var doCacheReadEntityBytes = false |  | ||||||
|  |  | ||||||
| // Request is a wrapper for a http Request that provides convenience methods | // Request is a wrapper for a http Request that provides convenience methods | ||||||
| type Request struct { | type Request struct { | ||||||
| 	Request           *http.Request | 	Request           *http.Request | ||||||
| 	bodyContent       *[]byte // to cache the request body for multiple reads of ReadEntity |  | ||||||
| 	pathParameters    map[string]string | 	pathParameters    map[string]string | ||||||
| 	attributes        map[string]interface{} // for storing request-scoped values | 	attributes        map[string]interface{} // for storing request-scoped values | ||||||
| 	selectedRoutePath string                 // root path + route path that matched the request, e.g. /meetings/{id}/attendees | 	selectedRoutePath string                 // root path + route path that matched the request, e.g. /meetings/{id}/attendees | ||||||
| @@ -41,12 +36,6 @@ func DefaultRequestContentType(mime string) { | |||||||
| 	defaultRequestContentType = mime | 	defaultRequestContentType = mime | ||||||
| } | } | ||||||
|  |  | ||||||
| // SetCacheReadEntity controls whether the response data ([]byte) is cached such that ReadEntity is repeatable. |  | ||||||
| // Default is true (due to backwardcompatibility). For better performance, you should set it to false if you don't need it. |  | ||||||
| func SetCacheReadEntity(doCache bool) { |  | ||||||
| 	doCacheReadEntityBytes = doCache |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // PathParameter accesses the Path parameter value by its name | // PathParameter accesses the Path parameter value by its name | ||||||
| func (r *Request) PathParameter(name string) string { | func (r *Request) PathParameter(name string) string { | ||||||
| 	return r.pathParameters[name] | 	return r.pathParameters[name] | ||||||
| @@ -81,18 +70,6 @@ func (r *Request) ReadEntity(entityPointer interface{}) (err error) { | |||||||
| 	contentType := r.Request.Header.Get(HEADER_ContentType) | 	contentType := r.Request.Header.Get(HEADER_ContentType) | ||||||
| 	contentEncoding := r.Request.Header.Get(HEADER_ContentEncoding) | 	contentEncoding := r.Request.Header.Get(HEADER_ContentEncoding) | ||||||
|  |  | ||||||
| 	// OLD feature, cache the body for reads |  | ||||||
| 	if doCacheReadEntityBytes { |  | ||||||
| 		if r.bodyContent == nil { |  | ||||||
| 			data, err := ioutil.ReadAll(r.Request.Body) |  | ||||||
| 			if err != nil { |  | ||||||
| 				return err |  | ||||||
| 			} |  | ||||||
| 			r.bodyContent = &data |  | ||||||
| 		} |  | ||||||
| 		r.Request.Body = ioutil.NopCloser(bytes.NewReader(*r.bodyContent)) |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	// check if the request body needs decompression | 	// check if the request body needs decompression | ||||||
| 	if ENCODING_GZIP == contentEncoding { | 	if ENCODING_GZIP == contentEncoding { | ||||||
| 		gzipReader := currentCompressorProvider.AcquireGzipReader() | 		gzipReader := currentCompressorProvider.AcquireGzipReader() | ||||||
|   | |||||||
							
								
								
									
										5
									
								
								vendor/github.com/emicklei/go-restful/response.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								vendor/github.com/emicklei/go-restful/response.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -9,7 +9,7 @@ import ( | |||||||
| 	"net/http" | 	"net/http" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| // DEPRECATED, use DefaultResponseContentType(mime) | // DefaultResponseMimeType is DEPRECATED, use DefaultResponseContentType(mime) | ||||||
| var DefaultResponseMimeType string | var DefaultResponseMimeType string | ||||||
|  |  | ||||||
| //PrettyPrintResponses controls the indentation feature of XML and JSON serialization | //PrettyPrintResponses controls the indentation feature of XML and JSON serialization | ||||||
| @@ -27,11 +27,12 @@ type Response struct { | |||||||
| 	err           error    // err property is kept when WriteError is called | 	err           error    // err property is kept when WriteError is called | ||||||
| } | } | ||||||
|  |  | ||||||
| // Creates a new response based on a http ResponseWriter. | // NewResponse creates a new response based on a http ResponseWriter. | ||||||
| func NewResponse(httpWriter http.ResponseWriter) *Response { | func NewResponse(httpWriter http.ResponseWriter) *Response { | ||||||
| 	return &Response{httpWriter, "", []string{}, http.StatusOK, 0, PrettyPrintResponses, nil} // empty content-types | 	return &Response{httpWriter, "", []string{}, http.StatusOK, 0, PrettyPrintResponses, nil} // empty content-types | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // DefaultResponseContentType set a default. | ||||||
| // If Accept header matching fails, fall back to this type. | // If Accept header matching fails, fall back to this type. | ||||||
| // Valid values are restful.MIME_JSON and restful.MIME_XML | // Valid values are restful.MIME_JSON and restful.MIME_XML | ||||||
| // Example: | // Example: | ||||||
|   | |||||||
							
								
								
									
										3
									
								
								vendor/github.com/emicklei/go-restful/route.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/github.com/emicklei/go-restful/route.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -34,6 +34,9 @@ type Route struct { | |||||||
| 	ParameterDocs           []*Parameter | 	ParameterDocs           []*Parameter | ||||||
| 	ResponseErrors          map[int]ResponseError | 	ResponseErrors          map[int]ResponseError | ||||||
| 	ReadSample, WriteSample interface{} // structs that model an example request or response payload | 	ReadSample, WriteSample interface{} // structs that model an example request or response payload | ||||||
|  |  | ||||||
|  | 	// Extra information used to store custom information about the route. | ||||||
|  | 	Metadata map[string]interface{} | ||||||
| } | } | ||||||
|  |  | ||||||
| // Initialize for Route | // Initialize for Route | ||||||
|   | |||||||
							
								
								
									
										69
									
								
								vendor/github.com/emicklei/go-restful/route_builder.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										69
									
								
								vendor/github.com/emicklei/go-restful/route_builder.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -5,10 +5,12 @@ package restful | |||||||
| // that can be found in the LICENSE file. | // that can be found in the LICENSE file. | ||||||
|  |  | ||||||
| import ( | import ( | ||||||
|  | 	"fmt" | ||||||
| 	"os" | 	"os" | ||||||
| 	"reflect" | 	"reflect" | ||||||
| 	"runtime" | 	"runtime" | ||||||
| 	"strings" | 	"strings" | ||||||
|  | 	"sync/atomic" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/log" | 	"github.com/emicklei/go-restful/log" | ||||||
| ) | ) | ||||||
| @@ -22,6 +24,9 @@ type RouteBuilder struct { | |||||||
| 	httpMethod  string        // required | 	httpMethod  string        // required | ||||||
| 	function    RouteFunction // required | 	function    RouteFunction // required | ||||||
| 	filters     []FilterFunction | 	filters     []FilterFunction | ||||||
|  |  | ||||||
|  | 	typeNameHandleFunc TypeNameHandleFunction // required | ||||||
|  |  | ||||||
| 	// documentation | 	// documentation | ||||||
| 	doc                     string | 	doc                     string | ||||||
| 	notes                   string | 	notes                   string | ||||||
| @@ -29,6 +34,7 @@ type RouteBuilder struct { | |||||||
| 	readSample, writeSample interface{} | 	readSample, writeSample interface{} | ||||||
| 	parameters              []*Parameter | 	parameters              []*Parameter | ||||||
| 	errorMap                map[int]ResponseError | 	errorMap                map[int]ResponseError | ||||||
|  | 	metadata                map[string]interface{} | ||||||
| } | } | ||||||
|  |  | ||||||
| // Do evaluates each argument with the RouteBuilder itself. | // Do evaluates each argument with the RouteBuilder itself. | ||||||
| @@ -92,8 +98,13 @@ func (b *RouteBuilder) Notes(notes string) *RouteBuilder { | |||||||
| // Reads tells what resource type will be read from the request payload. Optional. | // Reads tells what resource type will be read from the request payload. Optional. | ||||||
| // A parameter of type "body" is added ,required is set to true and the dataType is set to the qualified name of the sample's type. | // A parameter of type "body" is added ,required is set to true and the dataType is set to the qualified name of the sample's type. | ||||||
| func (b *RouteBuilder) Reads(sample interface{}) *RouteBuilder { | func (b *RouteBuilder) Reads(sample interface{}) *RouteBuilder { | ||||||
|  | 	fn := b.typeNameHandleFunc | ||||||
|  | 	if fn == nil { | ||||||
|  | 		fn = reflectTypeName | ||||||
|  | 	} | ||||||
|  | 	typeAsName := fn(sample) | ||||||
|  |  | ||||||
| 	b.readSample = sample | 	b.readSample = sample | ||||||
| 	typeAsName := reflect.TypeOf(sample).String() |  | ||||||
| 	bodyParameter := &Parameter{&ParameterData{Name: "body"}} | 	bodyParameter := &Parameter{&ParameterData{Name: "body"}} | ||||||
| 	bodyParameter.beBody() | 	bodyParameter.beBody() | ||||||
| 	bodyParameter.Required(true) | 	bodyParameter.Required(true) | ||||||
| @@ -145,9 +156,10 @@ func (b *RouteBuilder) ReturnsError(code int, message string, model interface{}) | |||||||
| // The model parameter is optional ; either pass a struct instance or use nil if not applicable. | // The model parameter is optional ; either pass a struct instance or use nil if not applicable. | ||||||
| func (b *RouteBuilder) Returns(code int, message string, model interface{}) *RouteBuilder { | func (b *RouteBuilder) Returns(code int, message string, model interface{}) *RouteBuilder { | ||||||
| 	err := ResponseError{ | 	err := ResponseError{ | ||||||
| 		Code:    code, | 		Code:      code, | ||||||
| 		Message: message, | 		Message:   message, | ||||||
| 		Model:   model, | 		Model:     model, | ||||||
|  | 		IsDefault: false, | ||||||
| 	} | 	} | ||||||
| 	// lazy init because there is no NewRouteBuilder (yet) | 	// lazy init because there is no NewRouteBuilder (yet) | ||||||
| 	if b.errorMap == nil { | 	if b.errorMap == nil { | ||||||
| @@ -157,10 +169,36 @@ func (b *RouteBuilder) Returns(code int, message string, model interface{}) *Rou | |||||||
| 	return b | 	return b | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // DefaultReturns is a special Returns call that sets the default of the response ; the code is zero. | ||||||
|  | func (b *RouteBuilder) DefaultReturns(message string, model interface{}) *RouteBuilder { | ||||||
|  | 	b.Returns(0, message, model) | ||||||
|  | 	// Modify the ResponseError just added/updated | ||||||
|  | 	re := b.errorMap[0] | ||||||
|  | 	// errorMap is initialized | ||||||
|  | 	b.errorMap[0] = ResponseError{ | ||||||
|  | 		Code:      re.Code, | ||||||
|  | 		Message:   re.Message, | ||||||
|  | 		Model:     re.Model, | ||||||
|  | 		IsDefault: true, | ||||||
|  | 	} | ||||||
|  | 	return b | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // Metadata adds or updates a key=value pair to the metadata map. | ||||||
|  | func (b *RouteBuilder) Metadata(key string, value interface{}) *RouteBuilder { | ||||||
|  | 	if b.metadata == nil { | ||||||
|  | 		b.metadata = map[string]interface{}{} | ||||||
|  | 	} | ||||||
|  | 	b.metadata[key] = value | ||||||
|  | 	return b | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // ResponseError represents a response; not necessarily an error. | ||||||
| type ResponseError struct { | type ResponseError struct { | ||||||
| 	Code    int | 	Code      int | ||||||
| 	Message string | 	Message   string | ||||||
| 	Model   interface{} | 	Model     interface{} | ||||||
|  | 	IsDefault bool | ||||||
| } | } | ||||||
|  |  | ||||||
| func (b *RouteBuilder) servicePath(path string) *RouteBuilder { | func (b *RouteBuilder) servicePath(path string) *RouteBuilder { | ||||||
| @@ -186,6 +224,13 @@ func (b *RouteBuilder) copyDefaults(rootProduces, rootConsumes []string) { | |||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // typeNameHandler sets the function that will convert types to strings in the parameter | ||||||
|  | // and model definitions. | ||||||
|  | func (b *RouteBuilder) typeNameHandler(handler TypeNameHandleFunction) *RouteBuilder { | ||||||
|  | 	b.typeNameHandleFunc = handler | ||||||
|  | 	return b | ||||||
|  | } | ||||||
|  |  | ||||||
| // Build creates a new Route using the specification details collected by the RouteBuilder | // Build creates a new Route using the specification details collected by the RouteBuilder | ||||||
| func (b *RouteBuilder) Build() Route { | func (b *RouteBuilder) Build() Route { | ||||||
| 	pathExpr, err := newPathExpression(b.currentPath) | 	pathExpr, err := newPathExpression(b.currentPath) | ||||||
| @@ -217,7 +262,8 @@ func (b *RouteBuilder) Build() Route { | |||||||
| 		ParameterDocs:  b.parameters, | 		ParameterDocs:  b.parameters, | ||||||
| 		ResponseErrors: b.errorMap, | 		ResponseErrors: b.errorMap, | ||||||
| 		ReadSample:     b.readSample, | 		ReadSample:     b.readSample, | ||||||
| 		WriteSample:    b.writeSample} | 		WriteSample:    b.writeSample, | ||||||
|  | 		Metadata:       b.metadata} | ||||||
| 	route.postBuild() | 	route.postBuild() | ||||||
| 	return route | 	return route | ||||||
| } | } | ||||||
| @@ -226,6 +272,8 @@ func concatPath(path1, path2 string) string { | |||||||
| 	return strings.TrimRight(path1, "/") + "/" + strings.TrimLeft(path2, "/") | 	return strings.TrimRight(path1, "/") + "/" + strings.TrimLeft(path2, "/") | ||||||
| } | } | ||||||
|  |  | ||||||
|  | var anonymousFuncCount int32 | ||||||
|  |  | ||||||
| // nameOfFunction returns the short name of the function f for documentation. | // nameOfFunction returns the short name of the function f for documentation. | ||||||
| // It uses a runtime feature for debugging ; its value may change for later Go versions. | // It uses a runtime feature for debugging ; its value may change for later Go versions. | ||||||
| func nameOfFunction(f interface{}) string { | func nameOfFunction(f interface{}) string { | ||||||
| @@ -236,5 +284,10 @@ func nameOfFunction(f interface{}) string { | |||||||
| 	last = strings.TrimSuffix(last, ")-fm") // Go 1.5 | 	last = strings.TrimSuffix(last, ")-fm") // Go 1.5 | ||||||
| 	last = strings.TrimSuffix(last, "·fm")  // < Go 1.5 | 	last = strings.TrimSuffix(last, "·fm")  // < Go 1.5 | ||||||
| 	last = strings.TrimSuffix(last, "-fm")  // Go 1.5 | 	last = strings.TrimSuffix(last, "-fm")  // Go 1.5 | ||||||
|  | 	if last == "func1" {                    // this could mean conflicts in API docs | ||||||
|  | 		val := atomic.AddInt32(&anonymousFuncCount, 1) | ||||||
|  | 		last = "func" + fmt.Sprintf("%d", val) | ||||||
|  | 		atomic.StoreInt32(&anonymousFuncCount, val) | ||||||
|  | 	} | ||||||
| 	return last | 	return last | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										36
									
								
								vendor/github.com/emicklei/go-restful/web_service.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										36
									
								
								vendor/github.com/emicklei/go-restful/web_service.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -3,6 +3,7 @@ package restful | |||||||
| import ( | import ( | ||||||
| 	"errors" | 	"errors" | ||||||
| 	"os" | 	"os" | ||||||
|  | 	"reflect" | ||||||
| 	"sync" | 	"sync" | ||||||
|  |  | ||||||
| 	"github.com/emicklei/go-restful/log" | 	"github.com/emicklei/go-restful/log" | ||||||
| @@ -24,6 +25,8 @@ type WebService struct { | |||||||
| 	documentation  string | 	documentation  string | ||||||
| 	apiVersion     string | 	apiVersion     string | ||||||
|  |  | ||||||
|  | 	typeNameHandleFunc TypeNameHandleFunction | ||||||
|  |  | ||||||
| 	dynamicRoutes bool | 	dynamicRoutes bool | ||||||
|  |  | ||||||
| 	// protects 'routes' if dynamic routes are enabled | 	// protects 'routes' if dynamic routes are enabled | ||||||
| @@ -34,6 +37,25 @@ func (w *WebService) SetDynamicRoutes(enable bool) { | |||||||
| 	w.dynamicRoutes = enable | 	w.dynamicRoutes = enable | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // TypeNameHandleFunction declares functions that can handle translating the name of a sample object | ||||||
|  | // into the restful documentation for the service. | ||||||
|  | type TypeNameHandleFunction func(sample interface{}) string | ||||||
|  |  | ||||||
|  | // TypeNameHandler sets the function that will convert types to strings in the parameter | ||||||
|  | // and model definitions. If not set, the web service will invoke | ||||||
|  | // reflect.TypeOf(object).String(). | ||||||
|  | func (w *WebService) TypeNameHandler(handler TypeNameHandleFunction) *WebService { | ||||||
|  | 	w.typeNameHandleFunc = handler | ||||||
|  | 	return w | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // reflectTypeName is the default TypeNameHandleFunction and for a given object | ||||||
|  | // returns the name that Go identifies it with (e.g. "string" or "v1.Object") via | ||||||
|  | // the reflection API. | ||||||
|  | func reflectTypeName(sample interface{}) string { | ||||||
|  | 	return reflect.TypeOf(sample).String() | ||||||
|  | } | ||||||
|  |  | ||||||
| // compilePathExpression ensures that the path is compiled into a RegEx for those routers that need it. | // compilePathExpression ensures that the path is compiled into a RegEx for those routers that need it. | ||||||
| func (w *WebService) compilePathExpression() { | func (w *WebService) compilePathExpression() { | ||||||
| 	compiled, err := newPathExpression(w.rootPath) | 	compiled, err := newPathExpression(w.rootPath) | ||||||
| @@ -174,7 +196,7 @@ func (w *WebService) RemoveRoute(path, method string) error { | |||||||
|  |  | ||||||
| // Method creates a new RouteBuilder and initialize its http method | // Method creates a new RouteBuilder and initialize its http method | ||||||
| func (w *WebService) Method(httpMethod string) *RouteBuilder { | func (w *WebService) Method(httpMethod string) *RouteBuilder { | ||||||
| 	return new(RouteBuilder).servicePath(w.rootPath).Method(httpMethod) | 	return new(RouteBuilder).typeNameHandler(w.typeNameHandleFunc).servicePath(w.rootPath).Method(httpMethod) | ||||||
| } | } | ||||||
|  |  | ||||||
| // Produces specifies that this WebService can produce one or more MIME types. | // Produces specifies that this WebService can produce one or more MIME types. | ||||||
| @@ -239,30 +261,30 @@ func (w *WebService) Documentation() string { | |||||||
|  |  | ||||||
| // HEAD is a shortcut for .Method("HEAD").Path(subPath) | // HEAD is a shortcut for .Method("HEAD").Path(subPath) | ||||||
| func (w *WebService) HEAD(subPath string) *RouteBuilder { | func (w *WebService) HEAD(subPath string) *RouteBuilder { | ||||||
| 	return new(RouteBuilder).servicePath(w.rootPath).Method("HEAD").Path(subPath) | 	return new(RouteBuilder).typeNameHandler(w.typeNameHandleFunc).servicePath(w.rootPath).Method("HEAD").Path(subPath) | ||||||
| } | } | ||||||
|  |  | ||||||
| // GET is a shortcut for .Method("GET").Path(subPath) | // GET is a shortcut for .Method("GET").Path(subPath) | ||||||
| func (w *WebService) GET(subPath string) *RouteBuilder { | func (w *WebService) GET(subPath string) *RouteBuilder { | ||||||
| 	return new(RouteBuilder).servicePath(w.rootPath).Method("GET").Path(subPath) | 	return new(RouteBuilder).typeNameHandler(w.typeNameHandleFunc).servicePath(w.rootPath).Method("GET").Path(subPath) | ||||||
| } | } | ||||||
|  |  | ||||||
| // POST is a shortcut for .Method("POST").Path(subPath) | // POST is a shortcut for .Method("POST").Path(subPath) | ||||||
| func (w *WebService) POST(subPath string) *RouteBuilder { | func (w *WebService) POST(subPath string) *RouteBuilder { | ||||||
| 	return new(RouteBuilder).servicePath(w.rootPath).Method("POST").Path(subPath) | 	return new(RouteBuilder).typeNameHandler(w.typeNameHandleFunc).servicePath(w.rootPath).Method("POST").Path(subPath) | ||||||
| } | } | ||||||
|  |  | ||||||
| // PUT is a shortcut for .Method("PUT").Path(subPath) | // PUT is a shortcut for .Method("PUT").Path(subPath) | ||||||
| func (w *WebService) PUT(subPath string) *RouteBuilder { | func (w *WebService) PUT(subPath string) *RouteBuilder { | ||||||
| 	return new(RouteBuilder).servicePath(w.rootPath).Method("PUT").Path(subPath) | 	return new(RouteBuilder).typeNameHandler(w.typeNameHandleFunc).servicePath(w.rootPath).Method("PUT").Path(subPath) | ||||||
| } | } | ||||||
|  |  | ||||||
| // PATCH is a shortcut for .Method("PATCH").Path(subPath) | // PATCH is a shortcut for .Method("PATCH").Path(subPath) | ||||||
| func (w *WebService) PATCH(subPath string) *RouteBuilder { | func (w *WebService) PATCH(subPath string) *RouteBuilder { | ||||||
| 	return new(RouteBuilder).servicePath(w.rootPath).Method("PATCH").Path(subPath) | 	return new(RouteBuilder).typeNameHandler(w.typeNameHandleFunc).servicePath(w.rootPath).Method("PATCH").Path(subPath) | ||||||
| } | } | ||||||
|  |  | ||||||
| // DELETE is a shortcut for .Method("DELETE").Path(subPath) | // DELETE is a shortcut for .Method("DELETE").Path(subPath) | ||||||
| func (w *WebService) DELETE(subPath string) *RouteBuilder { | func (w *WebService) DELETE(subPath string) *RouteBuilder { | ||||||
| 	return new(RouteBuilder).servicePath(w.rootPath).Method("DELETE").Path(subPath) | 	return new(RouteBuilder).typeNameHandler(w.typeNameHandleFunc).servicePath(w.rootPath).Method("DELETE").Path(subPath) | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 mbohlool
					mbohlool