From ada1ceddea1e8eab6caafbce175ad3ab6e73e86b Mon Sep 17 00:00:00 2001 From: Yuki Yugui Sonoda Date: Tue, 24 Apr 2018 16:09:38 +0900 Subject: [PATCH 1/8] Replace "golang.org/x/net/context" with the standard "context" because it is not a big issue even if just an example won't work with Go 1.6 or earlier. --- examples/BUILD.bazel | 1 - examples/integration_test.go | 3 +-- examples/main_test.go | 2 +- examples/proto_error_test.go | 2 +- examples/server/BUILD.bazel | 1 - examples/server/a_bit_of_everything.go | 2 +- examples/server/echo.go | 1 + examples/server/flow_combination.go | 2 +- examples/server/main.go | 2 +- 9 files changed, 7 insertions(+), 9 deletions(-) diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index 5ca5fa4ae2e..062d69912d7 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -41,6 +41,5 @@ go_test( "@com_github_golang_protobuf//ptypes/empty:go_default_library", "@org_golang_google_genproto//googleapis/rpc/status:go_default_library", "@org_golang_google_grpc//codes:go_default_library", - "@org_golang_x_net//context:go_default_library", ], ) diff --git a/examples/integration_test.go b/examples/integration_test.go index a00379795a7..69512e2cefb 100644 --- a/examples/integration_test.go +++ b/examples/integration_test.go @@ -2,6 +2,7 @@ package main import ( "bytes" + "context" "encoding/json" "fmt" "io" @@ -14,8 +15,6 @@ import ( "testing" "time" - "context" - "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/empty" diff --git a/examples/main_test.go b/examples/main_test.go index 9c98c6f7a4e..c321fa986b6 100644 --- a/examples/main_test.go +++ b/examples/main_test.go @@ -1,6 +1,7 @@ package main import ( + "context" "flag" "fmt" "os" @@ -9,7 +10,6 @@ import ( "github.com/golang/glog" server "github.com/grpc-ecosystem/grpc-gateway/examples/server" - "golang.org/x/net/context" ) func runServers(ctx context.Context) <-chan error { diff --git a/examples/proto_error_test.go b/examples/proto_error_test.go index df0a99487b8..c94b32f9f88 100644 --- a/examples/proto_error_test.go +++ b/examples/proto_error_test.go @@ -1,6 +1,7 @@ package main import ( + "context" "fmt" "io/ioutil" "net/http" @@ -10,7 +11,6 @@ import ( "github.com/golang/protobuf/jsonpb" "github.com/grpc-ecosystem/grpc-gateway/runtime" - "golang.org/x/net/context" spb "google.golang.org/genproto/googleapis/rpc/status" "google.golang.org/grpc/codes" ) diff --git a/examples/server/BUILD.bazel b/examples/server/BUILD.bazel index 8c34fc6d6c1..0982db9636f 100644 --- a/examples/server/BUILD.bazel +++ b/examples/server/BUILD.bazel @@ -25,6 +25,5 @@ go_library( "@org_golang_google_grpc//codes:go_default_library", "@org_golang_google_grpc//metadata:go_default_library", "@org_golang_google_grpc//status:go_default_library", - "@org_golang_x_net//context:go_default_library", ], ) diff --git a/examples/server/a_bit_of_everything.go b/examples/server/a_bit_of_everything.go index e0be51157b0..91f255d435c 100644 --- a/examples/server/a_bit_of_everything.go +++ b/examples/server/a_bit_of_everything.go @@ -1,11 +1,11 @@ package server import ( + "context" "fmt" "io" "sync" - "context" "github.com/golang/glog" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/duration" diff --git a/examples/server/echo.go b/examples/server/echo.go index e9658d418ed..f2c063d1536 100644 --- a/examples/server/echo.go +++ b/examples/server/echo.go @@ -2,6 +2,7 @@ package server import ( "context" + "github.com/golang/glog" examples "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" "google.golang.org/grpc" diff --git a/examples/server/flow_combination.go b/examples/server/flow_combination.go index cb054d3e43a..71e65eada18 100644 --- a/examples/server/flow_combination.go +++ b/examples/server/flow_combination.go @@ -1,9 +1,9 @@ package server import ( + "context" "io" - "context" examples "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" ) diff --git a/examples/server/main.go b/examples/server/main.go index a24f16b7cab..67eaa5077ec 100644 --- a/examples/server/main.go +++ b/examples/server/main.go @@ -1,11 +1,11 @@ package server import ( + "context" "net" "github.com/golang/glog" examples "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" - "golang.org/x/net/context" "google.golang.org/grpc" ) From e00479e95c0081dd5fa88ac52176dd48dcf7bfcf Mon Sep 17 00:00:00 2001 From: Yuki Yugui Sonoda Date: Tue, 24 Apr 2018 16:24:10 +0900 Subject: [PATCH 2/8] Simplify the abstraction of network types --- examples/gateway/BUILD.bazel | 1 + examples/gateway/gateway.go | 89 +++++++++++++++++------------------- examples/main.go | 14 +----- 3 files changed, 45 insertions(+), 59 deletions(-) diff --git a/examples/gateway/BUILD.bazel b/examples/gateway/BUILD.bazel index 6aefb52a02b..092edb3827f 100644 --- a/examples/gateway/BUILD.bazel +++ b/examples/gateway/BUILD.bazel @@ -8,6 +8,7 @@ go_library( deps = [ "//examples/examplepb:go_default_library", "//runtime:go_default_library", + "@com_github_golang_glog//:go_default_library", "@org_golang_google_grpc//:go_default_library", ], ) diff --git a/examples/gateway/gateway.go b/examples/gateway/gateway.go index cc503dd2814..75d7d66aaf6 100644 --- a/examples/gateway/gateway.go +++ b/examples/gateway/gateway.go @@ -2,70 +2,67 @@ package gateway import ( "context" + "fmt" "net" "net/http" "time" + "github.com/golang/glog" "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "google.golang.org/grpc" ) -type optSet struct { - mux []gwruntime.ServeMuxOption - dial []grpc.DialOption - - echoEndpoint, abeEndpoint, flowEndpoint string -} - -// newGateway returns a new gateway server which translates HTTP into gRPC. -func newGateway(ctx context.Context, opts optSet) (http.Handler, error) { - mux := gwruntime.NewServeMux(opts.mux...) - - err := examplepb.RegisterEchoServiceHandlerFromEndpoint(ctx, mux, opts.echoEndpoint, opts.dial) - if err != nil { - return nil, err - } - err = examplepb.RegisterStreamServiceHandlerFromEndpoint(ctx, mux, opts.abeEndpoint, opts.dial) - if err != nil { - return nil, err - } - err = examplepb.RegisterABitOfEverythingServiceHandlerFromEndpoint(ctx, mux, opts.abeEndpoint, opts.dial) +// NewGateway returns a new gateway server which translates HTTP into gRPC. +func NewGateway(ctx context.Context, network, addr string, opts []gwruntime.ServeMuxOption) (http.Handler, error) { + conn, err := dial(ctx, network, addr) if err != nil { return nil, err } - err = examplepb.RegisterFlowCombinationHandlerFromEndpoint(ctx, mux, opts.flowEndpoint, opts.dial) - if err != nil { - return nil, err + go func() { + <-ctx.Done() + if err := conn.Close(); err != nil { + glog.Errorf("Failed to close a client connection to the gRPC server: %v", err) + } + }() + + mux := gwruntime.NewServeMux(opts...) + + for _, f := range []func(context.Context, *gwruntime.ServeMux, *grpc.ClientConn) error{ + examplepb.RegisterEchoServiceHandler, + examplepb.RegisterStreamServiceHandler, + examplepb.RegisterABitOfEverythingServiceHandler, + examplepb.RegisterFlowCombinationHandler, + } { + if err := f(ctx, mux, conn); err != nil { + return nil, err + } } return mux, nil } -// NewTCPGateway returns a new gateway server which connect to the gRPC service with TCP. +func dial(ctx context.Context, network, addr string) (*grpc.ClientConn, error) { + switch network { + case "tcp": + return dialTCP(ctx, addr) + case "unix": + return dialUnix(ctx, addr) + default: + return nil, fmt.Errorf("unsupported network type %q", network) + } +} + +// dialTCP creates a client connection via TCP. // "addr" must be a valid TCP address with a port number. -func NewTCPGateway(ctx context.Context, addr string, opts ...gwruntime.ServeMuxOption) (http.Handler, error) { - return newGateway(ctx, optSet{ - mux: opts, - dial: []grpc.DialOption{grpc.WithInsecure()}, - echoEndpoint: addr, - abeEndpoint: addr, - flowEndpoint: addr, - }) +func dialTCP(ctx context.Context, addr string) (*grpc.ClientConn, error) { + return grpc.DialContext(ctx, addr, grpc.WithInsecure()) } -// NewUnixGatway returns a new gateway server which connect to the gRPC service with a unix domain socket. +// dialUnix creates a client connection via a unix domain socket. // "addr" must be a valid path to the socket. -func NewUnixGateway(ctx context.Context, addr string, opts ...gwruntime.ServeMuxOption) (http.Handler, error) { - return newGateway(ctx, optSet{ - mux: opts, - dial: []grpc.DialOption{ - grpc.WithInsecure(), - grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) { - return net.DialTimeout("unix", addr, timeout) - }), - }, - echoEndpoint: addr, - abeEndpoint: addr, - flowEndpoint: addr, - }) +func dialUnix(ctx context.Context, addr string) (*grpc.ClientConn, error) { + d := func(addr string, timeout time.Duration) (net.Conn, error) { + return net.DialTimeout("unix", addr, timeout) + } + return grpc.DialContext(ctx, addr, grpc.WithInsecure(), grpc.WithDialer(d)) } diff --git a/examples/main.go b/examples/main.go index bb2b55614da..0672d73b0fd 100644 --- a/examples/main.go +++ b/examples/main.go @@ -3,7 +3,6 @@ package main import ( "context" "flag" - "fmt" "net/http" "path" "strings" @@ -56,17 +55,6 @@ func preflightHandler(w http.ResponseWriter, r *http.Request) { return } -func newGateway(ctx context.Context, opts ...runtime.ServeMuxOption) (http.Handler, error) { - switch *network { - case "tcp": - return gateway.NewTCPGateway(ctx, *endpoint, opts...) - case "unix": - return gateway.NewUnixGateway(ctx, *endpoint, opts...) - default: - return nil, fmt.Errorf("unsupported network type %q:", *network) - } -} - // Run starts a HTTP server and blocks forever if successful. func Run(ctx context.Context, address string, opts ...runtime.ServeMuxOption) error { ctx, cancel := context.WithCancel(ctx) @@ -75,7 +63,7 @@ func Run(ctx context.Context, address string, opts ...runtime.ServeMuxOption) er mux := http.NewServeMux() mux.HandleFunc("/swagger/", serveSwagger) - gw, err := newGateway(ctx, opts...) + gw, err := gateway.NewGateway(ctx, *network, *endpoint, opts) if err != nil { return err } From d520340d3e87fae7600cec66d66c2695ab261c00 Mon Sep 17 00:00:00 2001 From: Yuki Yugui Sonoda Date: Tue, 24 Apr 2018 17:53:26 +0900 Subject: [PATCH 3/8] Move example gateway into the same subdirectory as its network abstraction --- examples/BUILD.bazel | 2 +- examples/gateway/BUILD.bazel | 7 ++- examples/gateway/doc.go | 2 + examples/gateway/handlers.go | 48 ++++++++++++++++++++ examples/gateway/main.go | 65 +++++++++++++++++++++++++++ examples/integration_test.go | 4 +- examples/main.go | 85 ++++-------------------------------- examples/main_test.go | 16 ++++++- examples/proto_error_test.go | 4 +- 9 files changed, 150 insertions(+), 83 deletions(-) create mode 100644 examples/gateway/doc.go create mode 100644 examples/gateway/handlers.go create mode 100644 examples/gateway/main.go diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index 062d69912d7..cec0f4c1521 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -8,7 +8,6 @@ go_library( importpath = "github.com/grpc-ecosystem/grpc-gateway/examples", deps = [ "//examples/gateway:go_default_library", - "//runtime:go_default_library", "@com_github_golang_glog//:go_default_library", ], ) @@ -32,6 +31,7 @@ go_test( "//examples/clients/abe:go_default_library", "//examples/clients/echo:go_default_library", "//examples/examplepb:go_default_library", + "//examples/gateway:go_default_library", "//examples/server:go_default_library", "//examples/sub:go_default_library", "//runtime:go_default_library", diff --git a/examples/gateway/BUILD.bazel b/examples/gateway/BUILD.bazel index 092edb3827f..1d6df0ea634 100644 --- a/examples/gateway/BUILD.bazel +++ b/examples/gateway/BUILD.bazel @@ -2,7 +2,12 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", - srcs = ["gateway.go"], + srcs = [ + "doc.go", + "gateway.go", + "handlers.go", + "main.go", + ], importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/gateway", visibility = ["//visibility:public"], deps = [ diff --git a/examples/gateway/doc.go b/examples/gateway/doc.go new file mode 100644 index 00000000000..a9ca836960e --- /dev/null +++ b/examples/gateway/doc.go @@ -0,0 +1,2 @@ +// Package gateway is an example of grpc-gateway server +package gateway diff --git a/examples/gateway/handlers.go b/examples/gateway/handlers.go new file mode 100644 index 00000000000..7581125b91c --- /dev/null +++ b/examples/gateway/handlers.go @@ -0,0 +1,48 @@ +package gateway + +import ( + "net/http" + "path" + "strings" + + "github.com/golang/glog" +) + +func swaggerServer(dir string) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + if !strings.HasSuffix(r.URL.Path, ".swagger.json") { + glog.Errorf("Not Found: %s", r.URL.Path) + http.NotFound(w, r) + return + } + + glog.Infof("Serving %s", r.URL.Path) + p := strings.TrimPrefix(r.URL.Path, "/swagger/") + p = path.Join(dir, p) + http.ServeFile(w, r, p) + } +} + +// allowCORS allows Cross Origin Resoruce Sharing from any origin. +// Don't do this without consideration in production systems. +func allowCORS(h http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if origin := r.Header.Get("Origin"); origin != "" { + w.Header().Set("Access-Control-Allow-Origin", origin) + if r.Method == "OPTIONS" && r.Header.Get("Access-Control-Request-Method") != "" { + preflightHandler(w, r) + return + } + } + h.ServeHTTP(w, r) + }) +} + +func preflightHandler(w http.ResponseWriter, r *http.Request) { + headers := []string{"Content-Type", "Accept"} + w.Header().Set("Access-Control-Allow-Headers", strings.Join(headers, ",")) + methods := []string{"GET", "HEAD", "POST", "PUT", "DELETE"} + w.Header().Set("Access-Control-Allow-Methods", strings.Join(methods, ",")) + glog.Infof("preflight request for %s", r.URL.Path) + return +} diff --git a/examples/gateway/main.go b/examples/gateway/main.go new file mode 100644 index 00000000000..95e8b87919c --- /dev/null +++ b/examples/gateway/main.go @@ -0,0 +1,65 @@ +package gateway + +import ( + "context" + "net/http" + + "github.com/golang/glog" + gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" +) + +// Endpoint describes a gRPC endpoint +type Endpoint struct { + Network, Addr string +} + +// Options is a set of options to be passed to Run +type Options struct { + // Addr is the address to listen + Addr string + + // GRPCServer defines an endpoint of a gRPC service + GRPCServer Endpoint + + // SwaggerDir is a path to a directory from which the server + // serves swagger specs. + SwaggerDir string + + // Mux is a list of options to be passed to the grpc-gateway multiplexer + Mux []gwruntime.ServeMuxOption +} + +// Run starts a HTTP server and blocks while running if successful. +// The server will be shutdown when "ctx" is canceled. +func Run(ctx context.Context, opts Options) error { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + + mux := http.NewServeMux() + mux.HandleFunc("/swagger/", swaggerServer(opts.SwaggerDir)) + + gw, err := NewGateway(ctx, opts.GRPCServer.Network, opts.GRPCServer.Addr, opts.Mux) + if err != nil { + return err + } + mux.Handle("/", gw) + + s := &http.Server{ + Addr: opts.Addr, + Handler: allowCORS(mux), + } + go func() { + <-ctx.Done() + glog.Infof("Shutting down the http server") + if err := s.Shutdown(context.Background()); err != nil { + glog.Errorf("Failed to shutdown http server: %v", err) + } + }() + + glog.Infof("Starting listening at %s", opts.Addr) + if err := s.ListenAndServe(); err != http.ErrServerClosed { + glog.Errorf("Failed to listen and serve: %v", err) + return err + } + return nil +} diff --git a/examples/integration_test.go b/examples/integration_test.go index 69512e2cefb..265dac41416 100644 --- a/examples/integration_test.go +++ b/examples/integration_test.go @@ -46,7 +46,7 @@ func TestForwardResponseOption(t *testing.T) { defer cancel() go func() { - if err := Run( + if err := runGateway( ctx, ":8081", runtime.WithForwardResponseOption( @@ -56,7 +56,7 @@ func TestForwardResponseOption(t *testing.T) { }, ), ); err != nil { - t.Errorf("gw.Run() failed with %v; want success", err) + t.Errorf("runGateway() failed with %v; want success", err) return } }() diff --git a/examples/main.go b/examples/main.go index 0672d73b0fd..22983ba8518 100644 --- a/examples/main.go +++ b/examples/main.go @@ -3,13 +3,9 @@ package main import ( "context" "flag" - "net/http" - "path" - "strings" "github.com/golang/glog" "github.com/grpc-ecosystem/grpc-gateway/examples/gateway" - "github.com/grpc-ecosystem/grpc-gateway/runtime" ) var ( @@ -18,83 +14,20 @@ var ( swaggerDir = flag.String("swagger_dir", "examples/examplepb", "path to the directory which contains swagger definitions") ) -func serveSwagger(w http.ResponseWriter, r *http.Request) { - if !strings.HasSuffix(r.URL.Path, ".swagger.json") { - glog.Errorf("Not Found: %s", r.URL.Path) - http.NotFound(w, r) - return - } - - glog.Infof("Serving %s", r.URL.Path) - p := strings.TrimPrefix(r.URL.Path, "/swagger/") - p = path.Join(*swaggerDir, p) - http.ServeFile(w, r, p) -} - -// allowCORS allows Cross Origin Resoruce Sharing from any origin. -// Don't do this without consideration in production systems. -func allowCORS(h http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if origin := r.Header.Get("Origin"); origin != "" { - w.Header().Set("Access-Control-Allow-Origin", origin) - if r.Method == "OPTIONS" && r.Header.Get("Access-Control-Request-Method") != "" { - preflightHandler(w, r) - return - } - } - h.ServeHTTP(w, r) - }) -} - -func preflightHandler(w http.ResponseWriter, r *http.Request) { - headers := []string{"Content-Type", "Accept"} - w.Header().Set("Access-Control-Allow-Headers", strings.Join(headers, ",")) - methods := []string{"GET", "HEAD", "POST", "PUT", "DELETE"} - w.Header().Set("Access-Control-Allow-Methods", strings.Join(methods, ",")) - glog.Infof("preflight request for %s", r.URL.Path) - return -} - -// Run starts a HTTP server and blocks forever if successful. -func Run(ctx context.Context, address string, opts ...runtime.ServeMuxOption) error { - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - mux := http.NewServeMux() - mux.HandleFunc("/swagger/", serveSwagger) - - gw, err := gateway.NewGateway(ctx, *network, *endpoint, opts) - if err != nil { - return err - } - mux.Handle("/", gw) - - s := &http.Server{ - Addr: address, - Handler: allowCORS(mux), - } - go func() { - <-ctx.Done() - glog.Infof("Shutting down the http server") - if err := s.Shutdown(context.Background()); err != nil { - glog.Errorf("Failed to shutdown http server: %v", err) - } - }() - - glog.Infof("Starting listening at %s", address) - if err := s.ListenAndServe(); err != http.ErrServerClosed { - glog.Errorf("Failed to listen and serve: %v", err) - return err - } - return nil -} - func main() { flag.Parse() defer glog.Flush() ctx := context.Background() - if err := Run(ctx, ":8080"); err != nil { + opts := gateway.Options{ + Addr: ":8080", + GRPCServer: gateway.Endpoint{ + Network: *network, + Addr: *endpoint, + }, + SwaggerDir: *swaggerDir, + } + if err := gateway.Run(ctx, opts); err != nil { glog.Fatal(err) } } diff --git a/examples/main_test.go b/examples/main_test.go index c321fa986b6..9df826c7e32 100644 --- a/examples/main_test.go +++ b/examples/main_test.go @@ -9,9 +9,23 @@ import ( "time" "github.com/golang/glog" + "github.com/grpc-ecosystem/grpc-gateway/examples/gateway" server "github.com/grpc-ecosystem/grpc-gateway/examples/server" + gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" ) +func runGateway(ctx context.Context, addr string, opts ...gwruntime.ServeMuxOption) error { + return gateway.Run(ctx, gateway.Options{ + Addr: addr, + GRPCServer: gateway.Endpoint{ + Network: *network, + Addr: *endpoint, + }, + SwaggerDir: *swaggerDir, + Mux: opts, + }) +} + func runServers(ctx context.Context) <-chan error { ch := make(chan error, 2) go func() { @@ -20,7 +34,7 @@ func runServers(ctx context.Context) <-chan error { } }() go func() { - if err := Run(ctx, ":8080"); err != nil { + if err := runGateway(ctx, ":8080"); err != nil { ch <- fmt.Errorf("cannot run gateway service: %v", err) } }() diff --git a/examples/proto_error_test.go b/examples/proto_error_test.go index c94b32f9f88..a71021ec898 100644 --- a/examples/proto_error_test.go +++ b/examples/proto_error_test.go @@ -17,8 +17,8 @@ import ( func runServer(ctx context.Context, t *testing.T, port uint16) { opt := runtime.WithProtoErrorHandler(runtime.DefaultHTTPProtoErrorHandler) - if err := Run(ctx, fmt.Sprintf(":%d", port), opt); err != nil { - t.Errorf("gw.Run() failed with %v; want success", err) + if err := runGateway(ctx, fmt.Sprintf(":%d", port), opt); err != nil { + t.Errorf("runGateway() failed with %v; want success", err) } } From 66c14c7ebd82ec7916bef64cdbd79fa2589b1903 Mon Sep 17 00:00:00 2001 From: Yuki Yugui Sonoda Date: Tue, 24 Apr 2018 18:18:10 +0900 Subject: [PATCH 4/8] Move example servers under the same directory to keep them consistent and keep their subdirectories shallower. --- examples/BUILD.bazel | 18 +----------------- examples/browser/gulpfile.js | 4 ++-- .../cmd/example-gateway-server/BUILD.bazel | 18 ++++++++++++++++++ .../{ => cmd/example-gateway-server}/main.go | 4 ++++ .../example-grpc-server}/BUILD.bazel | 3 ++- .../example-grpc-server}/main.go | 4 ++++ examples/gateway/gateway.go | 4 ++-- examples/gateway/main.go | 2 +- examples/main_test.go | 6 ++++++ 9 files changed, 40 insertions(+), 23 deletions(-) create mode 100644 examples/cmd/example-gateway-server/BUILD.bazel rename examples/{ => cmd/example-gateway-server}/main.go (85%) rename examples/{server/cmd/example-server => cmd/example-grpc-server}/BUILD.bazel (86%) rename examples/{server/cmd/example-server => cmd/example-grpc-server}/main.go (82%) diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index cec0f4c1521..c1a5b9f9d35 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -1,22 +1,7 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test") +load("@io_bazel_rules_go//go:def.bzl", "go_test") package(default_visibility = ["//visibility:private"]) -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "github.com/grpc-ecosystem/grpc-gateway/examples", - deps = [ - "//examples/gateway:go_default_library", - "@com_github_golang_glog//:go_default_library", - ], -) - -go_binary( - name = "examples", - embed = [":go_default_library"], -) - go_test( name = "go_default_test", size = "small", @@ -26,7 +11,6 @@ go_test( "main_test.go", "proto_error_test.go", ], - embed = [":go_default_library"], deps = [ "//examples/clients/abe:go_default_library", "//examples/clients/echo:go_default_library", diff --git a/examples/browser/gulpfile.js b/examples/browser/gulpfile.js index 3964888c949..dec2b9cc5ea 100644 --- a/examples/browser/gulpfile.js +++ b/examples/browser/gulpfile.js @@ -16,11 +16,11 @@ gulp.task('bower', function(){ }); gulp.task('server', shell.task([ - 'go build -o bin/example-server github.com/grpc-ecosystem/grpc-gateway/examples/server/cmd/example-server', + 'go build -o bin/example-server github.com/grpc-ecosystem/grpc-gateway/examples/cmd/example-grpc-server', ])); gulp.task('gateway', shell.task([ - 'go build -o bin/example-gw github.com/grpc-ecosystem/grpc-gateway/examples', + 'go build -o bin/example-gw github.com/grpc-ecosystem/grpc-gateway/examples/cmd/example-gateway-server', ])); gulp.task('serve-server', ['server'], function(){ diff --git a/examples/cmd/example-gateway-server/BUILD.bazel b/examples/cmd/example-gateway-server/BUILD.bazel new file mode 100644 index 00000000000..0f7c5052e7e --- /dev/null +++ b/examples/cmd/example-gateway-server/BUILD.bazel @@ -0,0 +1,18 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["main.go"], + importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/cmd/example-gateway-server", + visibility = ["//visibility:private"], + deps = [ + "//examples/gateway:go_default_library", + "@com_github_golang_glog//:go_default_library", + ], +) + +go_binary( + name = "example-gateway-server", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) diff --git a/examples/main.go b/examples/cmd/example-gateway-server/main.go similarity index 85% rename from examples/main.go rename to examples/cmd/example-gateway-server/main.go index 22983ba8518..c3b1f40e8a3 100644 --- a/examples/main.go +++ b/examples/cmd/example-gateway-server/main.go @@ -1,3 +1,7 @@ +/* +Command example-gateway-server is an example reverse-proxy implementation +whose HTTP handler is generated by grpc-gateway. +*/ package main import ( diff --git a/examples/server/cmd/example-server/BUILD.bazel b/examples/cmd/example-grpc-server/BUILD.bazel similarity index 86% rename from examples/server/cmd/example-server/BUILD.bazel rename to examples/cmd/example-grpc-server/BUILD.bazel index bf03bdc5ee8..1c66416c6ba 100644 --- a/examples/server/cmd/example-server/BUILD.bazel +++ b/examples/cmd/example-grpc-server/BUILD.bazel @@ -5,7 +5,7 @@ package(default_visibility = ["//visibility:private"]) go_library( name = "go_default_library", srcs = ["main.go"], - importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/server/cmd/example-server", + importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/cmd/example-grpc-server", deps = [ "//examples/server:go_default_library", "@com_github_golang_glog//:go_default_library", @@ -15,4 +15,5 @@ go_library( go_binary( name = "example-server", embed = [":go_default_library"], + visibility = ["//visibility:public"], ) diff --git a/examples/server/cmd/example-server/main.go b/examples/cmd/example-grpc-server/main.go similarity index 82% rename from examples/server/cmd/example-server/main.go rename to examples/cmd/example-grpc-server/main.go index 31e182c4b12..7f6c45f56e5 100644 --- a/examples/server/cmd/example-server/main.go +++ b/examples/cmd/example-grpc-server/main.go @@ -1,3 +1,7 @@ +/* +Command example-grpc-server is an example grpc server +to be called by example-gateway-server. +*/ package main import ( diff --git a/examples/gateway/gateway.go b/examples/gateway/gateway.go index 75d7d66aaf6..f11d01de24b 100644 --- a/examples/gateway/gateway.go +++ b/examples/gateway/gateway.go @@ -13,8 +13,8 @@ import ( "google.golang.org/grpc" ) -// NewGateway returns a new gateway server which translates HTTP into gRPC. -func NewGateway(ctx context.Context, network, addr string, opts []gwruntime.ServeMuxOption) (http.Handler, error) { +// newGateway returns a new gateway server which translates HTTP into gRPC. +func newGateway(ctx context.Context, network, addr string, opts []gwruntime.ServeMuxOption) (http.Handler, error) { conn, err := dial(ctx, network, addr) if err != nil { return nil, err diff --git a/examples/gateway/main.go b/examples/gateway/main.go index 95e8b87919c..c59fd1f2991 100644 --- a/examples/gateway/main.go +++ b/examples/gateway/main.go @@ -38,7 +38,7 @@ func Run(ctx context.Context, opts Options) error { mux := http.NewServeMux() mux.HandleFunc("/swagger/", swaggerServer(opts.SwaggerDir)) - gw, err := NewGateway(ctx, opts.GRPCServer.Network, opts.GRPCServer.Addr, opts.Mux) + gw, err := newGateway(ctx, opts.GRPCServer.Network, opts.GRPCServer.Addr, opts.Mux) if err != nil { return err } diff --git a/examples/main_test.go b/examples/main_test.go index 9df826c7e32..2972c8f9e42 100644 --- a/examples/main_test.go +++ b/examples/main_test.go @@ -14,6 +14,12 @@ import ( gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" ) +var ( + endpoint = flag.String("endpoint", "localhost:9090", "endpoint of the gRPC service") + network = flag.String("network", "tcp", `one of "tcp" or "unix". Must be consistent to -endpoint`) + swaggerDir = flag.String("swagger_dir", "examples/examplepb", "path to the directory which contains swagger definitions") +) + func runGateway(ctx context.Context, addr string, opts ...gwruntime.ServeMuxOption) error { return gateway.Run(ctx, gateway.Options{ Addr: addr, From 7fd011540ee97f0de33ae1c43a04bc533c12c712 Mon Sep 17 00:00:00 2001 From: Yuki Yugui Sonoda Date: Tue, 24 Apr 2018 18:29:33 +0900 Subject: [PATCH 5/8] Move integration tests into their own directory --- Makefile | 2 +- examples/{ => integration}/BUILD.bazel | 5 +---- examples/{ => integration}/client_test.go | 6 +++--- examples/{ => integration}/integration_test.go | 2 +- examples/{ => integration}/main_test.go | 2 +- examples/{ => integration}/proto_error_test.go | 2 +- 6 files changed, 8 insertions(+), 11 deletions(-) rename examples/{ => integration}/BUILD.bazel (90%) rename examples/{ => integration}/client_test.go (97%) rename examples/{ => integration}/integration_test.go (99%) rename examples/{ => integration}/main_test.go (98%) rename examples/{ => integration}/proto_error_test.go (99%) diff --git a/Makefile b/Makefile index dbd3ccfaf0c..826dda2562f 100644 --- a/Makefile +++ b/Makefile @@ -141,7 +141,7 @@ $(ABE_EXAMPLE_SRCS): $(ABE_EXAMPLE_SPEC) examples: $(EXAMPLE_SVCSRCS) $(EXAMPLE_GWSRCS) $(EXAMPLE_DEPSRCS) $(EXAMPLE_SWAGGERSRCS) $(EXAMPLE_CLIENT_SRCS) test: examples go test -race $(PKG)/... - go test -race $(PKG)/examples -args -network=unix -endpoint=test.sock + go test -race $(PKG)/examples/integration -args -network=unix -endpoint=test.sock lint: golint --set_exit_status $(PKG)/runtime diff --git a/examples/BUILD.bazel b/examples/integration/BUILD.bazel similarity index 90% rename from examples/BUILD.bazel rename to examples/integration/BUILD.bazel index c1a5b9f9d35..48542d6ddef 100644 --- a/examples/BUILD.bazel +++ b/examples/integration/BUILD.bazel @@ -1,10 +1,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test") -package(default_visibility = ["//visibility:private"]) - go_test( - name = "go_default_test", - size = "small", + name = "go_default_xtest", srcs = [ "client_test.go", "integration_test.go", diff --git a/examples/client_test.go b/examples/integration/client_test.go similarity index 97% rename from examples/client_test.go rename to examples/integration/client_test.go index 536a7a27fc2..1e6b3b77ed3 100644 --- a/examples/client_test.go +++ b/examples/integration/client_test.go @@ -1,4 +1,4 @@ -package main +package integration_test import ( "reflect" @@ -136,8 +136,8 @@ func testABEClientCreateBody(t *testing.T, cl *abe.ABitOfEverythingServiceApi) { RepeatedStringValue: []string{"a", "b", "c"}, OneofString: "x", MapValue: map[string]abe.ExamplepbNumericEnum{ - // "a": abe.ExamplepbNumericEnum_ONE, - // "b": abe.ExamplepbNumericEnum_ZERO, + // "a": abe.ExamplepbNumericEnum_ONE, + // "b": abe.ExamplepbNumericEnum_ZERO, }, MappedStringValue: map[string]string{ "a": "x", diff --git a/examples/integration_test.go b/examples/integration/integration_test.go similarity index 99% rename from examples/integration_test.go rename to examples/integration/integration_test.go index 265dac41416..80679cdf0a4 100644 --- a/examples/integration_test.go +++ b/examples/integration/integration_test.go @@ -1,4 +1,4 @@ -package main +package integration_test import ( "bytes" diff --git a/examples/main_test.go b/examples/integration/main_test.go similarity index 98% rename from examples/main_test.go rename to examples/integration/main_test.go index 2972c8f9e42..2e681330262 100644 --- a/examples/main_test.go +++ b/examples/integration/main_test.go @@ -1,4 +1,4 @@ -package main +package integration_test import ( "context" diff --git a/examples/proto_error_test.go b/examples/integration/proto_error_test.go similarity index 99% rename from examples/proto_error_test.go rename to examples/integration/proto_error_test.go index a71021ec898..a893da0db17 100644 --- a/examples/proto_error_test.go +++ b/examples/integration/proto_error_test.go @@ -1,4 +1,4 @@ -package main +package integration_test import ( "context" From 1b17cce5e628f1b0be4c9657c6dbdda06011ef23 Mon Sep 17 00:00:00 2001 From: Yuki Yugui Sonoda Date: Tue, 24 Apr 2018 19:19:52 +0900 Subject: [PATCH 6/8] Move example proto files into a subdirectory --- Makefile | 24 +- examples/browser/gulpfile.js | 4 +- examples/cmd/example-gateway-server/main.go | 2 +- examples/gateway/BUILD.bazel | 2 +- examples/gateway/gateway.go | 2 +- examples/integration/BUILD.bazel | 4 +- examples/integration/integration_test.go | 4 +- examples/integration/main_test.go | 2 +- examples/{ => proto}/examplepb/BUILD.bazel | 12 +- .../examplepb/a_bit_of_everything.pb.go | 269 +++++++++--------- .../examplepb/a_bit_of_everything.pb.gw.go | 6 +- .../examplepb/a_bit_of_everything.proto | 4 +- .../a_bit_of_everything.swagger.json | 0 .../{ => proto}/examplepb/echo_service.pb.go | 52 ++-- .../examplepb/echo_service.pb.gw.go | 2 +- .../{ => proto}/examplepb/echo_service.proto | 0 .../examplepb/echo_service.swagger.json | 0 .../examplepb/flow_combination.pb.go | 90 +++--- .../examplepb/flow_combination.pb.gw.go | 2 +- .../examplepb/flow_combination.proto | 0 examples/{ => proto}/examplepb/stream.pb.go | 50 ++-- .../{ => proto}/examplepb/stream.pb.gw.go | 4 +- examples/{ => proto}/examplepb/stream.proto | 4 +- examples/{ => proto}/examplepb/wrappers.pb.go | 50 ++-- .../{ => proto}/examplepb/wrappers.pb.gw.go | 2 +- examples/{ => proto}/examplepb/wrappers.proto | 0 .../examplepb/wrappers.swagger.json | 2 +- examples/{ => proto}/sub/BUILD.bazel | 4 +- examples/{ => proto}/sub/message.pb.go | 23 +- examples/{ => proto}/sub/message.proto | 0 examples/{ => proto}/sub2/BUILD.bazel | 4 +- examples/{ => proto}/sub2/message.pb.go | 25 +- examples/{ => proto}/sub2/message.proto | 2 +- examples/server/BUILD.bazel | 6 +- examples/server/a_bit_of_everything.go | 6 +- examples/server/echo.go | 2 +- examples/server/flow_combination.go | 2 +- examples/server/main.go | 2 +- runtime/BUILD.bazel | 2 +- runtime/handler_test.go | 2 +- runtime/marshal_json_test.go | 2 +- runtime/marshal_jsonpb_test.go | 2 +- runtime/marshal_proto_test.go | 8 +- 43 files changed, 344 insertions(+), 341 deletions(-) rename examples/{ => proto}/examplepb/BUILD.bazel (87%) rename examples/{ => proto}/examplepb/a_bit_of_everything.pb.go (75%) rename examples/{ => proto}/examplepb/a_bit_of_everything.pb.gw.go (99%) rename examples/{ => proto}/examplepb/a_bit_of_everything.proto (98%) rename examples/{ => proto}/examplepb/a_bit_of_everything.swagger.json (100%) rename examples/{ => proto}/examplepb/echo_service.pb.go (74%) rename examples/{ => proto}/examplepb/echo_service.pb.gw.go (99%) rename examples/{ => proto}/examplepb/echo_service.proto (100%) rename examples/{ => proto}/examplepb/echo_service.swagger.json (100%) rename examples/{ => proto}/examplepb/flow_combination.pb.go (83%) rename examples/{ => proto}/examplepb/flow_combination.pb.gw.go (99%) rename examples/{ => proto}/examplepb/flow_combination.proto (100%) rename examples/{ => proto}/examplepb/stream.pb.go (77%) rename examples/{ => proto}/examplepb/stream.pb.gw.go (98%) rename examples/{ => proto}/examplepb/stream.proto (88%) rename examples/{ => proto}/examplepb/wrappers.pb.go (68%) rename examples/{ => proto}/examplepb/wrappers.pb.gw.go (98%) rename examples/{ => proto}/examplepb/wrappers.proto (100%) rename examples/{ => proto}/examplepb/wrappers.swagger.json (96%) rename examples/{ => proto}/sub/BUILD.bazel (94%) rename examples/{ => proto}/sub/message.pb.go (64%) rename examples/{ => proto}/sub/message.proto (100%) rename examples/{ => proto}/sub2/BUILD.bazel (94%) rename examples/{ => proto}/sub2/message.pb.go (59%) rename examples/{ => proto}/sub2/message.proto (88%) diff --git a/Makefile b/Makefile index 826dda2562f..ac5bd6f5f37 100644 --- a/Makefile +++ b/Makefile @@ -48,33 +48,33 @@ RUNTIME_GO=$(RUNTIME_PROTO:.proto=.pb.go) OPENAPIV2_PROTO=protoc-gen-swagger/options/openapiv2.proto protoc-gen-swagger/options/annotations.proto OPENAPIV2_GO=$(OPENAPIV2_PROTO:.proto=.pb.go) -PKGMAP=Mgoogle/protobuf/descriptor.proto=$(GO_PLUGIN_PKG)/descriptor,Mexamples/sub/message.proto=$(PKG)/examples/sub +PKGMAP=Mgoogle/protobuf/descriptor.proto=$(GO_PLUGIN_PKG)/descriptor,Mexamples/proto/sub/message.proto=$(PKG)/examples/proto/sub ADDITIONAL_FLAGS= ifneq "$(GATEWAY_PLUGIN_FLAGS)" "" ADDITIONAL_FLAGS=,$(GATEWAY_PLUGIN_FLAGS) endif -SWAGGER_EXAMPLES=examples/examplepb/echo_service.proto \ - examples/examplepb/a_bit_of_everything.proto \ - examples/examplepb/wrappers.proto -EXAMPLES=examples/examplepb/echo_service.proto \ - examples/examplepb/a_bit_of_everything.proto \ - examples/examplepb/stream.proto \ - examples/examplepb/flow_combination.proto \ - examples/examplepb/wrappers.proto +SWAGGER_EXAMPLES=examples/proto/examplepb/echo_service.proto \ + examples/proto/examplepb/a_bit_of_everything.proto \ + examples/proto/examplepb/wrappers.proto +EXAMPLES=examples/proto/examplepb/echo_service.proto \ + examples/proto/examplepb/a_bit_of_everything.proto \ + examples/proto/examplepb/stream.proto \ + examples/proto/examplepb/flow_combination.proto \ + examples/proto/examplepb/wrappers.proto EXAMPLE_SVCSRCS=$(EXAMPLES:.proto=.pb.go) EXAMPLE_GWSRCS=$(EXAMPLES:.proto=.pb.gw.go) EXAMPLE_SWAGGERSRCS=$(SWAGGER_EXAMPLES:.proto=.swagger.json) -EXAMPLE_DEPS=examples/sub/message.proto examples/sub2/message.proto +EXAMPLE_DEPS=examples/proto/sub/message.proto examples/proto/sub2/message.proto EXAMPLE_DEPSRCS=$(EXAMPLE_DEPS:.proto=.pb.go) EXAMPLE_CLIENT_DIR=examples/clients -ECHO_EXAMPLE_SPEC=examples/examplepb/echo_service.swagger.json +ECHO_EXAMPLE_SPEC=examples/proto/examplepb/echo_service.swagger.json ECHO_EXAMPLE_SRCS=$(EXAMPLE_CLIENT_DIR)/echo/api_client.go \ $(EXAMPLE_CLIENT_DIR)/echo/api_response.go \ $(EXAMPLE_CLIENT_DIR)/echo/configuration.go \ $(EXAMPLE_CLIENT_DIR)/echo/echo_service_api.go \ $(EXAMPLE_CLIENT_DIR)/echo/examplepb_simple_message.go -ABE_EXAMPLE_SPEC=examples/examplepb/a_bit_of_everything.swagger.json +ABE_EXAMPLE_SPEC=examples/proto/examplepb/a_bit_of_everything.swagger.json ABE_EXAMPLE_SRCS=$(EXAMPLE_CLIENT_DIR)/abe/a_bit_of_everything_nested.go \ $(EXAMPLE_CLIENT_DIR)/abe/a_bit_of_everything_service_api.go \ $(EXAMPLE_CLIENT_DIR)/abe/api_client.go \ diff --git a/examples/browser/gulpfile.js b/examples/browser/gulpfile.js index dec2b9cc5ea..233afed40e0 100644 --- a/examples/browser/gulpfile.js +++ b/examples/browser/gulpfile.js @@ -32,9 +32,9 @@ gulp.task('serve-server', ['server'], function(){ gulp.task('serve-gateway', ['gateway', 'serve-server'], function(){ gprocess.start('gateway-server', 'bin/example-gw', [ - '--logtostderr', '--swagger_dir', path.join(__dirname, "../examplepb"), + '--logtostderr', '--swagger_dir', path.join(__dirname, "../proto/examplepb"), ]); - gulp.watch('bin/example-gateway', ['serve-gateway']); + gulp.watch('bin/example-gw', ['serve-gateway']); }); gulp.task('backends', ['serve-gateway', 'serve-server']); diff --git a/examples/cmd/example-gateway-server/main.go b/examples/cmd/example-gateway-server/main.go index c3b1f40e8a3..0273ffbbbc1 100644 --- a/examples/cmd/example-gateway-server/main.go +++ b/examples/cmd/example-gateway-server/main.go @@ -15,7 +15,7 @@ import ( var ( endpoint = flag.String("endpoint", "localhost:9090", "endpoint of the gRPC service") network = flag.String("network", "tcp", `one of "tcp" or "unix". Must be consistent to -endpoint`) - swaggerDir = flag.String("swagger_dir", "examples/examplepb", "path to the directory which contains swagger definitions") + swaggerDir = flag.String("swagger_dir", "examples/proto/examplepb", "path to the directory which contains swagger definitions") ) func main() { diff --git a/examples/gateway/BUILD.bazel b/examples/gateway/BUILD.bazel index 1d6df0ea634..d076e613055 100644 --- a/examples/gateway/BUILD.bazel +++ b/examples/gateway/BUILD.bazel @@ -11,7 +11,7 @@ go_library( importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/gateway", visibility = ["//visibility:public"], deps = [ - "//examples/examplepb:go_default_library", + "//examples/proto/examplepb:go_default_library", "//runtime:go_default_library", "@com_github_golang_glog//:go_default_library", "@org_golang_google_grpc//:go_default_library", diff --git a/examples/gateway/gateway.go b/examples/gateway/gateway.go index f11d01de24b..8430331bc6e 100644 --- a/examples/gateway/gateway.go +++ b/examples/gateway/gateway.go @@ -8,7 +8,7 @@ import ( "time" "github.com/golang/glog" - "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" + "github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "google.golang.org/grpc" ) diff --git a/examples/integration/BUILD.bazel b/examples/integration/BUILD.bazel index 48542d6ddef..37ef3bc6abc 100644 --- a/examples/integration/BUILD.bazel +++ b/examples/integration/BUILD.bazel @@ -11,10 +11,10 @@ go_test( deps = [ "//examples/clients/abe:go_default_library", "//examples/clients/echo:go_default_library", - "//examples/examplepb:go_default_library", "//examples/gateway:go_default_library", + "//examples/proto/examplepb:go_default_library", + "//examples/proto/sub:go_default_library", "//examples/server:go_default_library", - "//examples/sub:go_default_library", "//runtime:go_default_library", "@com_github_golang_glog//:go_default_library", "@com_github_golang_protobuf//jsonpb:go_default_library", diff --git a/examples/integration/integration_test.go b/examples/integration/integration_test.go index 80679cdf0a4..97b72dba717 100644 --- a/examples/integration/integration_test.go +++ b/examples/integration/integration_test.go @@ -18,8 +18,8 @@ import ( "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/empty" - gw "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" - sub "github.com/grpc-ecosystem/grpc-gateway/examples/sub" + gw "github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb" + sub "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub" "github.com/grpc-ecosystem/grpc-gateway/runtime" "google.golang.org/grpc/codes" ) diff --git a/examples/integration/main_test.go b/examples/integration/main_test.go index 2e681330262..2ce46ae4595 100644 --- a/examples/integration/main_test.go +++ b/examples/integration/main_test.go @@ -17,7 +17,7 @@ import ( var ( endpoint = flag.String("endpoint", "localhost:9090", "endpoint of the gRPC service") network = flag.String("network", "tcp", `one of "tcp" or "unix". Must be consistent to -endpoint`) - swaggerDir = flag.String("swagger_dir", "examples/examplepb", "path to the directory which contains swagger definitions") + swaggerDir = flag.String("swagger_dir", "examples/proto/examplepb", "path to the directory which contains swagger definitions") ) func runGateway(ctx context.Context, addr string, opts ...gwruntime.ServeMuxOption) error { diff --git a/examples/examplepb/BUILD.bazel b/examples/proto/examplepb/BUILD.bazel similarity index 87% rename from examples/examplepb/BUILD.bazel rename to examples/proto/examplepb/BUILD.bazel index e1617185067..1ab7b5a6297 100644 --- a/examples/examplepb/BUILD.bazel +++ b/examples/proto/examplepb/BUILD.bazel @@ -13,8 +13,8 @@ proto_library( "wrappers.proto", ], deps = [ - "//examples/sub:sub_proto", - "//examples/sub2:sub2_proto", + "//examples/proto/sub:sub_proto", + "//examples/proto/sub2:sub2_proto", "//protoc-gen-swagger/options:options_proto", "@com_github_googleapis_googleapis//google/api:api_proto", "@com_google_protobuf//:duration_proto", @@ -30,11 +30,11 @@ go_proto_library( "@io_bazel_rules_go//proto:go_grpc", "//protoc-gen-grpc-gateway:go_gen_grpc_gateway", ], - importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb", + importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb", proto = ":examplepb_proto", deps = [ - "//examples/sub:go_default_library", - "//examples/sub2:go_default_library", + "//examples/proto/sub:go_default_library", + "//examples/proto/sub2:go_default_library", "//protoc-gen-swagger/options:go_default_library", "@com_github_golang_protobuf//ptypes/duration:go_default_library", "@com_github_golang_protobuf//ptypes/empty:go_default_library", @@ -47,5 +47,5 @@ go_proto_library( go_library( name = "go_default_library", embed = [":examplepb_go_proto"], - importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb", + importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb", ) diff --git a/examples/examplepb/a_bit_of_everything.pb.go b/examples/proto/examplepb/a_bit_of_everything.pb.go similarity index 75% rename from examples/examplepb/a_bit_of_everything.pb.go rename to examples/proto/examplepb/a_bit_of_everything.pb.go index a5b333230ff..23703e51d83 100644 --- a/examples/examplepb/a_bit_of_everything.pb.go +++ b/examples/proto/examplepb/a_bit_of_everything.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: examples/examplepb/a_bit_of_everything.proto +// source: examples/proto/examplepb/a_bit_of_everything.proto package examplepb @@ -9,8 +9,8 @@ import math "math" import _ "google.golang.org/genproto/googleapis/api/annotations" import google_protobuf1 "github.com/golang/protobuf/ptypes/empty" import google_protobuf2 "github.com/golang/protobuf/ptypes/duration" -import grpc_gateway_examples_sub "github.com/grpc-ecosystem/grpc-gateway/examples/sub" -import sub2 "github.com/grpc-ecosystem/grpc-gateway/examples/sub2" +import grpc_gateway_examples_sub "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub" +import sub2 "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub2" import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp" import _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" @@ -964,7 +964,7 @@ var _ABitOfEverythingService_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "examples/examplepb/a_bit_of_everything.proto", + Metadata: "examples/proto/examplepb/a_bit_of_everything.proto", } // Client API for CamelCaseServiceName service @@ -1028,7 +1028,7 @@ var _CamelCaseServiceName_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "examples/examplepb/a_bit_of_everything.proto", + Metadata: "examples/proto/examplepb/a_bit_of_everything.proto", } // Client API for AnotherServiceWithNoBindings service @@ -1092,137 +1092,138 @@ var _AnotherServiceWithNoBindings_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "examples/examplepb/a_bit_of_everything.proto", + Metadata: "examples/proto/examplepb/a_bit_of_everything.proto", } -func init() { proto.RegisterFile("examples/examplepb/a_bit_of_everything.proto", fileDescriptor1) } +func init() { proto.RegisterFile("examples/proto/examplepb/a_bit_of_everything.proto", fileDescriptor1) } var fileDescriptor1 = []byte{ - // 2012 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcb, 0x6f, 0x1b, 0xc7, - 0x19, 0xd7, 0x90, 0x14, 0x2d, 0x7e, 0x7a, 0x51, 0x23, 0x3f, 0x64, 0x5a, 0x8e, 0xc6, 0xb4, 0xd3, - 0xae, 0x15, 0x73, 0x37, 0xa6, 0x83, 0x22, 0x26, 0xd0, 0xa6, 0x94, 0xc4, 0xd8, 0x86, 0x63, 0xd9, - 0x5e, 0x27, 0xae, 0xe1, 0x3a, 0x15, 0x96, 0xbb, 0x43, 0x72, 0x6d, 0xee, 0xce, 0x76, 0x77, 0x56, - 0x36, 0xab, 0xaa, 0x45, 0x1b, 0xa0, 0x45, 0x4e, 0x05, 0xd4, 0x7b, 0x2e, 0x05, 0x8a, 0x5e, 0x7a, - 0xe8, 0xa1, 0xa7, 0x02, 0xed, 0xb1, 0x87, 0x1e, 0x0b, 0xf4, 0x5e, 0xa0, 0xa7, 0x1e, 0xfb, 0x17, - 0x14, 0x33, 0xfb, 0xf0, 0x92, 0x12, 0x21, 0x53, 0x0e, 0x72, 0xb1, 0x77, 0xe6, 0xfb, 0x7d, 0xef, - 0xc7, 0x7c, 0x14, 0x5c, 0xa3, 0xaf, 0x0c, 0xc7, 0xeb, 0xd3, 0x40, 0x8b, 0x3f, 0xbc, 0xb6, 0x66, - 0xec, 0xb4, 0x6d, 0xbe, 0xc3, 0x3a, 0x3b, 0x74, 0x97, 0xfa, 0x03, 0xde, 0xb3, 0xdd, 0xae, 0xea, - 0xf9, 0x8c, 0x33, 0xbc, 0x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 0x9f, 0x19, 0x7c, 0x67, 0xd7, 0xe8, - 0x87, 0x74, 0x25, 0x4f, 0x90, 0x92, 0xd3, 0x41, 0x5e, 0x3d, 0x16, 0x37, 0xf8, 0x12, 0xcc, 0x59, - 0x2c, 0x6c, 0xf7, 0x69, 0x8c, 0x28, 0x10, 0xa4, 0x20, 0x7d, 0x36, 0xba, 0x8b, 0x20, 0x6b, 0x30, - 0x6b, 0xbb, 0xfc, 0x3b, 0x1f, 0xc4, 0x88, 0x69, 0x82, 0x94, 0xbc, 0x0e, 0xf2, 0x2a, 0x95, 0x11, - 0x66, 0x11, 0x45, 0x82, 0x94, 0x82, 0x3e, 0x1b, 0x66, 0x20, 0x91, 0x8c, 0x1b, 0xf5, 0x18, 0x71, - 0x8a, 0x20, 0x65, 0x5a, 0xca, 0xb8, 0x51, 0x8f, 0x00, 0x97, 0x61, 0xbe, 0x63, 0xbf, 0xa2, 0x56, - 0x2a, 0x64, 0x86, 0x20, 0xa5, 0xa8, 0xcf, 0xc5, 0x97, 0xc3, 0xa0, 0x54, 0x4e, 0x89, 0x20, 0xe5, - 0x54, 0x0c, 0x4a, 0x24, 0x5d, 0x04, 0x68, 0x33, 0xd6, 0x8f, 0x11, 0x40, 0x90, 0x32, 0xa3, 0x97, - 0xc4, 0x4d, 0x6a, 0x6c, 0xc0, 0x7d, 0xdb, 0xed, 0xc6, 0x80, 0x59, 0x19, 0xff, 0xd9, 0xe8, 0x2e, - 0x35, 0xb6, 0x3d, 0xe0, 0x34, 0x88, 0x11, 0x17, 0x09, 0x52, 0xe6, 0x74, 0x90, 0x57, 0x43, 0x0e, - 0xa7, 0x66, 0xcc, 0x13, 0xa4, 0xcc, 0x47, 0x0e, 0x27, 0x56, 0xdc, 0x05, 0xa0, 0x6e, 0xe8, 0xc4, - 0x80, 0x05, 0x82, 0x94, 0x85, 0xfa, 0xb5, 0x63, 0xd3, 0xb9, 0x1d, 0x3a, 0xd4, 0xb7, 0xcd, 0x96, - 0x1b, 0x3a, 0x7a, 0x49, 0xf0, 0x47, 0xc2, 0xde, 0x85, 0x85, 0x60, 0xd8, 0xf1, 0x45, 0x82, 0x94, - 0x45, 0x7d, 0x3e, 0x18, 0xf2, 0x3c, 0x85, 0xa5, 0x41, 0x2c, 0x13, 0xa4, 0x94, 0x13, 0x58, 0x26, - 0x5d, 0x41, 0xd6, 0xfa, 0x25, 0x82, 0x94, 0x25, 0x7d, 0x36, 0xc8, 0x58, 0x1f, 0x43, 0x52, 0x39, - 0x98, 0x20, 0x05, 0x47, 0x90, 0x44, 0x4a, 0x1d, 0xce, 0xf8, 0xd4, 0xa3, 0x06, 0xa7, 0xd6, 0xce, - 0x50, 0x40, 0x97, 0x49, 0x5e, 0x29, 0xe9, 0xcb, 0x09, 0xf1, 0x51, 0x26, 0xb0, 0x37, 0x61, 0x96, - 0xb9, 0x54, 0x4c, 0x21, 0x31, 0x24, 0x56, 0x4e, 0xcb, 0x86, 0x3a, 0xab, 0x46, 0xcd, 0xac, 0x26, - 0xcd, 0xac, 0xb6, 0x04, 0xf5, 0xf6, 0x94, 0x0e, 0x12, 0x2c, 0x4f, 0xf8, 0x32, 0xcc, 0x45, 0xac, - 0x91, 0xae, 0x95, 0x33, 0x22, 0x6d, 0xb7, 0xa7, 0xf4, 0x48, 0x60, 0xa4, 0x04, 0x3f, 0x83, 0x92, - 0x63, 0x78, 0xb1, 0x1d, 0x67, 0x65, 0x0b, 0x7d, 0x34, 0x79, 0x0b, 0xdd, 0x33, 0x3c, 0x69, 0x6e, - 0xcb, 0xe5, 0xfe, 0x40, 0x9f, 0x71, 0xe2, 0x23, 0x7e, 0x05, 0xcb, 0x8e, 0xe1, 0x79, 0xa3, 0xfe, - 0x9e, 0x93, 0x7a, 0x6e, 0x9f, 0x48, 0x8f, 0x37, 0x14, 0x9f, 0x48, 0xe1, 0x92, 0x33, 0x7a, 0x9f, - 0xd1, 0x1c, 0xb5, 0x75, 0xac, 0x79, 0xe5, 0xed, 0x34, 0x47, 0xa3, 0xe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0x57, - 0x9a, 0xf6, 0xd5, 0xb1, 0x4b, 0xcd, 0x28, 0xd4, 0xbf, 0x03, 0xe7, 0xee, 0xbd, 0xee, 0xa1, 0x6c, - 0x69, 0x4c, 0x5a, 0x12, 0x4f, 0x4b, 0xe9, 0x7c, 0x69, 0x17, 0x65, 0x55, 0xde, 0xf8, 0x7f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xf9, 0xc4, 0x26, 0x62, 0x1b, 0x17, 0x00, 0x00, + // 2019 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0xdb, 0xc8, + 0x15, 0xf7, 0x48, 0xb2, 0x22, 0x3d, 0xf9, 0x43, 0x1e, 0xe7, 0xc3, 0x51, 0x9c, 0xf5, 0x44, 0xc9, + 0xb6, 0x8c, 0x37, 0x22, 0x37, 0xca, 0xa2, 0xd8, 0x08, 0x68, 0xb7, 0xb2, 0xad, 0x4d, 0x82, 0x6c, + 0x9c, 0x84, 0xd9, 0x4d, 0x83, 0x34, 0x5b, 0x83, 0x22, 0x47, 0x12, 0x13, 0x91, 0xc3, 0x92, 0x43, + 0x27, 0xaa, 0xeb, 0x16, 0xed, 0x02, 0x2d, 0xf6, 0x54, 0xc0, 0xbd, 0xef, 0xa5, 0x40, 0xd1, 0x4b, + 0x0f, 0x3d, 0xf4, 0x54, 0xa0, 0x3d, 0xf6, 0xd0, 0x63, 0x81, 0xde, 0x0b, 0xf4, 0xd4, 0x63, 0xff, + 0x82, 0x62, 0x86, 0xa4, 0x42, 0xc9, 0x16, 0x1c, 0x39, 0x8b, 0xbd, 0x24, 0x9c, 0x99, 0xdf, 0x7b, + 0xef, 0xf7, 0xde, 0xbc, 0xf7, 0xe6, 0xc9, 0x50, 0xa7, 0xaf, 0x0c, 0xc7, 0xeb, 0xd3, 0x40, 0xf3, + 0x7c, 0xc6, 0x99, 0x16, 0x2f, 0xb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x38, 0x23, + 0x12, 0x66, 0x07, 0x5c, 0xf4, 0xd3, 0x5d, 0x4a, 0x6c, 0xb7, 0xc3, 0x7c, 0x47, 0x86, 0xa5, 0xbd, + 0x06, 0xf3, 0xe9, 0x50, 0xcc, 0x8c, 0x8f, 0x34, 0xed, 0xab, 0x13, 0x87, 0x9a, 0x71, 0xa8, 0x7f, + 0x07, 0xce, 0xdd, 0x7b, 0x5d, 0x43, 0xe9, 0xd4, 0x98, 0x36, 0x25, 0x9e, 0x16, 0x87, 0xfd, 0xa5, + 0x9d, 0x97, 0x59, 0x79, 0xe3, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x60, 0xd8, 0x68, 0xe8, 0x2d, + 0x17, 0x00, 0x00, } diff --git a/examples/examplepb/a_bit_of_everything.pb.gw.go b/examples/proto/examplepb/a_bit_of_everything.pb.gw.go similarity index 99% rename from examples/examplepb/a_bit_of_everything.pb.gw.go rename to examples/proto/examplepb/a_bit_of_everything.pb.gw.go index 8c9d4fe98d8..f863b09ac72 100644 --- a/examples/examplepb/a_bit_of_everything.pb.gw.go +++ b/examples/proto/examplepb/a_bit_of_everything.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: examples/examplepb/a_bit_of_everything.proto +// source: examples/proto/examplepb/a_bit_of_everything.proto /* Package examplepb is a reverse proxy. @@ -14,8 +14,8 @@ import ( "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/empty" - "github.com/grpc-ecosystem/grpc-gateway/examples/sub" - "github.com/grpc-ecosystem/grpc-gateway/examples/sub2" + "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub" + "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub2" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/grpc-ecosystem/grpc-gateway/utilities" "golang.org/x/net/context" diff --git a/examples/examplepb/a_bit_of_everything.proto b/examples/proto/examplepb/a_bit_of_everything.proto similarity index 98% rename from examples/examplepb/a_bit_of_everything.proto rename to examples/proto/examplepb/a_bit_of_everything.proto index efcc6411111..6eaa7d8fd9a 100644 --- a/examples/examplepb/a_bit_of_everything.proto +++ b/examples/proto/examplepb/a_bit_of_everything.proto @@ -5,8 +5,8 @@ package grpc.gateway.examples.examplepb; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/duration.proto"; -import "examples/sub/message.proto"; -import "examples/sub2/message.proto"; +import "examples/proto/sub/message.proto"; +import "examples/proto/sub2/message.proto"; import "google/protobuf/timestamp.proto"; import "protoc-gen-swagger/options/annotations.proto"; diff --git a/examples/examplepb/a_bit_of_everything.swagger.json b/examples/proto/examplepb/a_bit_of_everything.swagger.json similarity index 100% rename from examples/examplepb/a_bit_of_everything.swagger.json rename to examples/proto/examplepb/a_bit_of_everything.swagger.json diff --git a/examples/examplepb/echo_service.pb.go b/examples/proto/examplepb/echo_service.pb.go similarity index 74% rename from examples/examplepb/echo_service.pb.go rename to examples/proto/examplepb/echo_service.pb.go index 8a600f8dcd3..1e1d349d311 100644 --- a/examples/examplepb/echo_service.pb.go +++ b/examples/proto/examplepb/echo_service.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: examples/examplepb/echo_service.proto +// source: examples/proto/examplepb/echo_service.proto /* Package examplepb is a generated protocol buffer package. @@ -10,11 +10,11 @@ Echo Service API consists of a single service which returns a message. It is generated from these files: - examples/examplepb/echo_service.proto - examples/examplepb/a_bit_of_everything.proto - examples/examplepb/stream.proto - examples/examplepb/flow_combination.proto - examples/examplepb/wrappers.proto + examples/proto/examplepb/echo_service.proto + examples/proto/examplepb/a_bit_of_everything.proto + examples/proto/examplepb/stream.proto + examples/proto/examplepb/flow_combination.proto + examples/proto/examplepb/wrappers.proto It has these top-level messages: SimpleMessage @@ -193,28 +193,28 @@ var _EchoService_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "examples/examplepb/echo_service.proto", + Metadata: "examples/proto/examplepb/echo_service.proto", } -func init() { proto.RegisterFile("examples/examplepb/echo_service.proto", fileDescriptor0) } +func init() { proto.RegisterFile("examples/proto/examplepb/echo_service.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 257 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xad, 0x48, 0xcc, - 0x2d, 0xc8, 0x49, 0x2d, 0xd6, 0x87, 0x32, 0x0a, 0x92, 0xf4, 0x53, 0x93, 0x33, 0xf2, 0xe3, 0x8b, - 0x53, 0x8b, 0xca, 0x32, 0x93, 0x53, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xe4, 0xd3, 0x8b, - 0x0a, 0x92, 0xf5, 0xd2, 0x13, 0x4b, 0x52, 0xcb, 0x13, 0x2b, 0xf5, 0x60, 0x7a, 0xf4, 0xe0, 0x7a, - 0xa4, 0x64, 0xd2, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x13, 0x0b, 0x32, 0xf5, 0x13, 0xf3, 0xf2, - 0xf2, 0x4b, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0x8a, 0x21, 0xda, 0x95, 0x0c, 0xb9, 0x78, 0x83, 0x33, - 0x41, 0x2a, 0x7d, 0x53, 0x8b, 0x8b, 0x13, 0xd3, 0x53, 0x85, 0xf8, 0xb8, 0x98, 0x32, 0x53, 0x24, - 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x98, 0x32, 0x53, 0x84, 0x04, 0xb8, 0x98, 0xf3, 0x4a, 0x73, - 0x25, 0x98, 0x14, 0x18, 0x35, 0x98, 0x83, 0x40, 0x4c, 0xa3, 0xc3, 0x4c, 0x5c, 0xdc, 0xae, 0xc9, - 0x19, 0xf9, 0xc1, 0x10, 0x77, 0x08, 0x2d, 0x61, 0xe4, 0x62, 0x01, 0xf1, 0x85, 0xf4, 0xf4, 0x08, - 0xb8, 0x45, 0x0f, 0xc5, 0x2a, 0x29, 0x12, 0xd5, 0x2b, 0xd9, 0x34, 0x5d, 0x7e, 0x32, 0x99, 0xc9, - 0x4c, 0x49, 0x54, 0xbf, 0xcc, 0x10, 0x16, 0x28, 0xe0, 0x20, 0xd1, 0xaf, 0xce, 0x4c, 0xa9, 0x8d, - 0x92, 0x15, 0x92, 0xc6, 0x2a, 0xa1, 0x5f, 0x9d, 0x57, 0x9a, 0x5b, 0x2b, 0xd4, 0xc3, 0xc8, 0xc5, - 0x01, 0x72, 0xa6, 0x53, 0x7e, 0x4a, 0x25, 0xcd, 0x9d, 0xaa, 0x00, 0x76, 0xaa, 0x14, 0xa6, 0x53, - 0xe3, 0x93, 0xf2, 0x53, 0x2a, 0xad, 0x18, 0xb5, 0x9c, 0xb8, 0xa3, 0x38, 0xe1, 0x9a, 0x93, 0xd8, - 0xc0, 0x91, 0x61, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x6e, 0x70, 0xce, 0xf4, 0x01, 0x00, - 0x00, + // 260 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4e, 0xad, 0x48, 0xcc, + 0x2d, 0xc8, 0x49, 0x2d, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x87, 0x72, 0x0b, 0x92, 0xf4, + 0x53, 0x93, 0x33, 0xf2, 0xe3, 0x8b, 0x53, 0x8b, 0xca, 0x32, 0x93, 0x53, 0xf5, 0xc0, 0x92, 0x42, + 0xf2, 0xe9, 0x45, 0x05, 0xc9, 0x7a, 0xe9, 0x89, 0x25, 0xa9, 0xe5, 0x89, 0x95, 0x7a, 0x30, 0x9d, + 0x7a, 0x70, 0x3d, 0x52, 0x32, 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa, 0x89, 0x05, 0x99, 0xfa, + 0x89, 0x79, 0x79, 0xf9, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0xc5, 0x10, 0xed, 0x4a, 0x86, 0x5c, + 0xbc, 0xc1, 0x99, 0x20, 0x95, 0xbe, 0xa9, 0xc5, 0xc5, 0x89, 0xe9, 0xa9, 0x42, 0x7c, 0x5c, 0x4c, + 0x99, 0x29, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x4c, 0x99, 0x29, 0x42, 0x02, 0x5c, 0xcc, + 0x79, 0xa5, 0xb9, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x20, 0xa6, 0xd1, 0x61, 0x26, 0x2e, + 0x6e, 0xd7, 0xe4, 0x8c, 0xfc, 0x60, 0x88, 0x3b, 0x84, 0x96, 0x30, 0x72, 0xb1, 0x80, 0xf8, 0x42, + 0x7a, 0x7a, 0x04, 0xdc, 0xa2, 0x87, 0x62, 0x95, 0x14, 0x89, 0xea, 0x95, 0x6c, 0x9a, 0x2e, 0x3f, + 0x99, 0xcc, 0x64, 0xa6, 0x24, 0xaa, 0x5f, 0x66, 0x08, 0x0b, 0x14, 0x70, 0x90, 0xe8, 0x57, 0x67, + 0xa6, 0xd4, 0x46, 0xc9, 0x0a, 0x49, 0x63, 0x95, 0xd0, 0xaf, 0xce, 0x2b, 0xcd, 0xad, 0x15, 0xea, + 0x61, 0xe4, 0xe2, 0x00, 0x39, 0xd3, 0x29, 0x3f, 0xa5, 0x92, 0xe6, 0x4e, 0x55, 0x00, 0x3b, 0x55, + 0x0a, 0xd3, 0xa9, 0xf1, 0x49, 0xf9, 0x29, 0x95, 0x56, 0x8c, 0x5a, 0x4e, 0xdc, 0x51, 0x9c, 0x70, + 0xcd, 0x49, 0x6c, 0xe0, 0xc8, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x5b, 0xa7, 0x3a, 0x94, + 0xfa, 0x01, 0x00, 0x00, } diff --git a/examples/examplepb/echo_service.pb.gw.go b/examples/proto/examplepb/echo_service.pb.gw.go similarity index 99% rename from examples/examplepb/echo_service.pb.gw.go rename to examples/proto/examplepb/echo_service.pb.gw.go index 878808b266d..4b6f8b1dacb 100644 --- a/examples/examplepb/echo_service.pb.gw.go +++ b/examples/proto/examplepb/echo_service.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: examples/examplepb/echo_service.proto +// source: examples/proto/examplepb/echo_service.proto /* Package examplepb is a reverse proxy. diff --git a/examples/examplepb/echo_service.proto b/examples/proto/examplepb/echo_service.proto similarity index 100% rename from examples/examplepb/echo_service.proto rename to examples/proto/examplepb/echo_service.proto diff --git a/examples/examplepb/echo_service.swagger.json b/examples/proto/examplepb/echo_service.swagger.json similarity index 100% rename from examples/examplepb/echo_service.swagger.json rename to examples/proto/examplepb/echo_service.swagger.json diff --git a/examples/examplepb/flow_combination.pb.go b/examples/proto/examplepb/flow_combination.pb.go similarity index 83% rename from examples/examplepb/flow_combination.pb.go rename to examples/proto/examplepb/flow_combination.pb.go index 421c9a87a20..66e6193cc94 100644 --- a/examples/examplepb/flow_combination.pb.go +++ b/examples/proto/examplepb/flow_combination.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: examples/examplepb/flow_combination.proto +// source: examples/proto/examplepb/flow_combination.proto package examplepb @@ -671,52 +671,52 @@ var _FlowCombination_serviceDesc = grpc.ServiceDesc{ ServerStreams: true, }, }, - Metadata: "examples/examplepb/flow_combination.proto", + Metadata: "examples/proto/examplepb/flow_combination.proto", } -func init() { proto.RegisterFile("examples/examplepb/flow_combination.proto", fileDescriptor3) } +func init() { proto.RegisterFile("examples/proto/examplepb/flow_combination.proto", fileDescriptor3) } var fileDescriptor3 = []byte{ - // 656 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 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 0x8d, 0x0b, 0x53, 0x7b, - 0x1f, 0x97, 0x7e, 0x36, 0xb0, 0x3e, 0x3c, 0xc6, 0xf5, 0xa5, 0x1e, 0xd6, 0x51, 0x35, 0x35, 0x24, - 0x0b, 0x03, 0x9a, 0x60, 0xbc, 0x01, 0x54, 0x59, 0xe0, 0x65, 0xa5, 0xea, 0xda, 0xed, 0x7c, 0x5d, - 0x08, 0x7b, 0xa4, 0x9e, 0xb2, 0xa8, 0xe3, 0x09, 0xe9, 0x77, 0x40, 0xc5, 0x94, 0xa7, 0x15, 0xe3, - 0x1a, 0x6d, 0x3d, 0x11, 0x74, 0x17, 0xf8, 0xda, 0x6f, 0x6d, 0xad, 0xc5, 0xce, 0x7e, 0x47, 0xd2, - 0xb5, 0xe5, 0x21, 0x6d, 0xa0, 0x4d, 0x38, 0xcd, 0xdb, 0x9b, 0x09, 0x92, 0xf3, 0x9f, 0xf8, 0x07, - 0x74, 0xf7, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x85, 0xaf, 0x3c, 0x6d, 0x09, 0x00, 0x00, + // 655 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xbf, 0x8f, 0x12, 0x41, + 0x14, 0xc7, 0xf3, 0xb8, 0xc4, 0xe4, 0x86, 0xfb, 0xc1, 0x2d, 0x06, 0x81, 0xc3, 0xe3, 0x6e, 0xbc, + 0x44, 0xe2, 0x8f, 0x5d, 0x82, 0xd5, 0x51, 0x9e, 0xd1, 0x92, 0x5c, 0xb8, 0xd8, 0x6c, 0x63, 0x66, + 0x87, 0x15, 0x48, 0x60, 0x67, 0x6e, 0x77, 0x0d, 0x5e, 0x08, 0x31, 0xb1, 0xb1, 0xb4, 0xf0, 0x0f, + 0xb0, 0xb4, 0xf2, 0x1f, 0xb0, 0xb3, 0xb2, 0x31, 0xb1, 0x30, 0xb1, 0xb3, 0xb3, 0xf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24, 0xaf, + 0xb6, 0x3c, 0xa5, 0x0d, 0xbc, 0x09, 0xa7, 0x79, 0x73, 0x33, 0x41, 0xb2, 0xae, 0xe0, 0x3f, 0xa0, + 0x7b, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x36, 0xcd, 0x7d, 0x1f, 0x73, 0x09, 0x00, 0x00, } diff --git a/examples/examplepb/flow_combination.pb.gw.go b/examples/proto/examplepb/flow_combination.pb.gw.go similarity index 99% rename from examples/examplepb/flow_combination.pb.gw.go rename to examples/proto/examplepb/flow_combination.pb.gw.go index 6f743dd9427..9bc32889894 100644 --- a/examples/examplepb/flow_combination.pb.gw.go +++ b/examples/proto/examplepb/flow_combination.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: examples/examplepb/flow_combination.proto +// source: examples/proto/examplepb/flow_combination.proto /* Package examplepb is a reverse proxy. diff --git a/examples/examplepb/flow_combination.proto b/examples/proto/examplepb/flow_combination.proto similarity index 100% rename from examples/examplepb/flow_combination.proto rename to examples/proto/examplepb/flow_combination.proto diff --git a/examples/examplepb/stream.pb.go b/examples/proto/examplepb/stream.pb.go similarity index 77% rename from examples/examplepb/stream.pb.go rename to examples/proto/examplepb/stream.pb.go index 71066ccd964..1f1a74bfdeb 100644 --- a/examples/examplepb/stream.pb.go +++ b/examples/proto/examplepb/stream.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: examples/examplepb/stream.proto +// source: examples/proto/examplepb/stream.proto package examplepb @@ -8,7 +8,7 @@ import fmt "fmt" import math "math" import _ "google.golang.org/genproto/googleapis/api/annotations" import google_protobuf1 "github.com/golang/protobuf/ptypes/empty" -import grpc_gateway_examples_sub "github.com/grpc-ecosystem/grpc-gateway/examples/sub" +import grpc_gateway_examples_sub "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub" import ( context "golang.org/x/net/context" @@ -248,31 +248,31 @@ var _StreamService_serviceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: "examples/examplepb/stream.proto", + Metadata: "examples/proto/examplepb/stream.proto", } -func init() { proto.RegisterFile("examples/examplepb/stream.proto", fileDescriptor2) } +func init() { proto.RegisterFile("examples/proto/examplepb/stream.proto", fileDescriptor2) } var fileDescriptor2 = []byte{ - // 314 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0xbf, 0x4a, 0x43, 0x31, - 0x14, 0xc6, 0xb9, 0x2a, 0xa2, 0x11, 0x97, 0x0c, 0x0e, 0x51, 0x28, 0x16, 0xc1, 0x2a, 0x92, 0xb4, - 0xba, 0xb9, 0x59, 0xe9, 0xa6, 0x38, 0x74, 0x73, 0x29, 0xc9, 0xe5, 0x34, 0x0d, 0xbd, 0xf7, 0x26, - 0x24, 0xe7, 0x56, 0x0b, 0x4e, 0x8e, 0xae, 0x7d, 0x11, 0xdf, 0xc5, 0x57, 0xf0, 0x41, 0xa4, 0xf7, - 0xdf, 0xd4, 0xd2, 0xba, 0x25, 0x9c, 0x2f, 0xf9, 0x7e, 0xe7, 0x47, 0x5a, 0xf0, 0x2e, 0x53, 0x97, - 0x40, 0x10, 0xd5, 0xc1, 0x29, 0x11, 0xd0, 0x83, 0x4c, 0xb9, 0xf3, 0x16, 0x2d, 0x6d, 0x69, 0xef, - 0x62, 0xae, 0x25, 0xc2, 0x9b, 0x9c, 0xf3, 0x3a, 0xcd, 0x9b, 0x34, 0x3b, 0xd3, 0xd6, 0xea, 0x04, - 0x84, 0x74, 0x46, 0xc8, 0x2c, 0xb3, 0x28, 0xd1, 0xd8, 0x2c, 0x94, 0xcf, 0xd9, 0x69, 0x35, 0x2d, - 0x6e, 0x2a, 0x1f, 0x0b, 0x48, 0x1d, 0xce, 0xab, 0xe1, 0xcd, 0x8a, 0x72, 0x39, 0x52, 0x06, 0x47, - 0x76, 0x3c, 0x82, 0x19, 0xf8, 0x39, 0x4e, 0x4c, 0xa6, 0xab, 0x34, 0x6b, 0xd2, 0x21, 0x57, 0x22, - 0x85, 0x10, 0xa4, 0x86, 0x72, 0x76, 0xfb, 0xbd, 0x4b, 0x8e, 0x87, 0x05, 0xf6, 0x10, 0xfc, 0xcc, - 0xc4, 0x40, 0xbf, 0x22, 0x42, 0xfa, 0x79, 0x32, 0x7d, 0xf4, 0x20, 0x11, 0x68, 0x8f, 0x6f, 0xd8, - 0x83, 0x3f, 0xf4, 0x0d, 0xbe, 0x8c, 0x07, 0x4d, 0x2b, 0x3b, 0xe1, 0x25, 0x3b, 0xaf, 0xd9, 0xf9, - 0x60, 0xc9, 0xde, 0x16, 0x9f, 0x3f, 0xbf, 0x8b, 0x9d, 0xab, 0xf6, 0x85, 0x98, 0xf5, 0x6a, 0xf0, - 0x55, 0xd8, 0x42, 0xe5, 0xc9, 0xf4, 0x3e, 0xba, 0xee, 0x44, 0xf4, 0x83, 0xec, 0x3d, 0x99, 0x80, - 0x74, 0xcd, 0x97, 0xec, 0xff, 0x74, 0xed, 0xcb, 0x82, 0xe2, 0x9c, 0xb6, 0x36, 0x50, 0x74, 0x23, - 0xba, 0x88, 0xc8, 0xc1, 0x52, 0xc5, 0x20, 0x9e, 0x58, 0xda, 0x59, 0x53, 0x15, 0x72, 0xc5, 0x87, - 0xe8, 0x4d, 0xa6, 0x9f, 0x4b, 0xb3, 0x6c, 0xeb, 0xe4, 0xf6, 0x46, 0x20, 0x9e, 0xd8, 0xc2, 0x48, - 0x37, 0xea, 0x1f, 0xbd, 0x1e, 0x36, 0xeb, 0xa9, 0xfd, 0x42, 0xc8, 0xdd, 0x5f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xbc, 0x52, 0x49, 0x85, 0x8f, 0x02, 0x00, 0x00, + // 319 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0xb1, 0x4e, 0xc3, 0x30, + 0x10, 0x86, 0x15, 0x40, 0x08, 0x8c, 0x58, 0x3c, 0x30, 0x04, 0xa4, 0x42, 0x05, 0xa2, 0x30, 0xd8, + 0x6d, 0xd9, 0xd8, 0x28, 0xea, 0x06, 0x62, 0xe8, 0xc6, 0x52, 0xd9, 0xd1, 0xd5, 0xb5, 0x9a, 0xc4, + 0x96, 0x7d, 0x29, 0x54, 0x62, 0x62, 0x64, 0xed, 0x8b, 0xf0, 0x2e, 0xbc, 0x02, 0x0f, 0x82, 0xea, + 0xa4, 0x1d, 0x10, 0x51, 0xcb, 0x78, 0xbe, 0xff, 0xf7, 0xfd, 0xdf, 0x4f, 0x2e, 0xe0, 0x55, 0x64, + 0x36, 0x05, 0xcf, 0xad, 0x33, 0x68, 0x78, 0x35, 0x5a, 0xc9, 0x3d, 0x3a, 0x10, 0x19, 0x0b, 0xcf, + 0xb4, 0xa1, 0x9c, 0x4d, 0x98, 0x12, 0x08, 0x2f, 0x62, 0xc6, 0x96, 0x1e, 0xb6, 0x52, 0xc7, 0x27, + 0xca, 0x18, 0x95, 0x02, 0x17, 0x56, 0x73, 0x91, 0xe7, 0x06, 0x05, 0x6a, 0x93, 0xfb, 0xd2, 0x1e, + 0x1f, 0x57, 0xdb, 0x30, 0xc9, 0x62, 0xc4, 0x21, 0xb3, 0x38, 0xab, 0x96, 0xdd, 0xda, 0x08, 0x62, + 0x28, 0x35, 0x0e, 0xcd, 0x68, 0x08, 0x53, 0x70, 0x33, 0x1c, 0xeb, 0x5c, 0x55, 0x9e, 0xd3, 0x5f, + 0x1e, 0x5f, 0x48, 0x9e, 0x81, 0xf7, 0x42, 0x41, 0xa9, 0xe8, 0x7e, 0x6e, 0x93, 0xc3, 0x41, 0x40, + 0x18, 0x80, 0x9b, 0xea, 0x04, 0xe8, 0x47, 0x44, 0x48, 0xaf, 0x48, 0x27, 0xf7, 0x0e, 0x04, 0x02, + 0xed, 0xb0, 0x35, 0x4c, 0xec, 0xae, 0xa7, 0xf1, 0x69, 0xd4, 0x5f, 0xdd, 0x8e, 0x8f, 0x58, 0xc9, + 0xc1, 0x96, 0x1c, 0xac, 0xbf, 0xe0, 0x68, 0xf2, 0xf7, 0xaf, 0xef, 0xf9, 0xd6, 0x55, 0xf3, 0x9c, + 0x4f, 0x3b, 0xcb, 0xf8, 0x7f, 0x85, 0xe7, 0xb2, 0x48, 0x27, 0xb7, 0xd1, 0x75, 0x2b, 0xa2, 0x6f, + 0x64, 0xe7, 0x41, 0x7b, 0xa4, 0x35, 0x5f, 0xc6, 0xff, 0x4f, 0xd7, 0xbc, 0x0c, 0x29, 0xce, 0x68, + 0x63, 0x4d, 0x8a, 0x76, 0x44, 0xe7, 0x11, 0xd9, 0x5b, 0x54, 0xd1, 0x4f, 0xc6, 0x86, 0xb6, 0x6a, + 0x4e, 0xf9, 0x42, 0xb2, 0x01, 0x3a, 0x9d, 0xab, 0xc7, 0xb2, 0xd9, 0x78, 0x63, 0xe5, 0xe6, 0x8d, + 0x40, 0x32, 0x36, 0xa1, 0x91, 0x76, 0xd4, 0x3b, 0x78, 0xde, 0x5f, 0xe1, 0xc9, 0xdd, 0x50, 0xc8, + 0xcd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x63, 0x7a, 0xd9, 0xa1, 0x02, 0x00, 0x00, } diff --git a/examples/examplepb/stream.pb.gw.go b/examples/proto/examplepb/stream.pb.gw.go similarity index 98% rename from examples/examplepb/stream.pb.gw.go rename to examples/proto/examplepb/stream.pb.gw.go index 8a953a739e0..642d59a2805 100644 --- a/examples/examplepb/stream.pb.gw.go +++ b/examples/proto/examplepb/stream.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: examples/examplepb/stream.proto +// source: examples/proto/examplepb/stream.proto /* Package examplepb is a reverse proxy. @@ -14,7 +14,7 @@ import ( "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/empty" - "github.com/grpc-ecosystem/grpc-gateway/examples/sub" + "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/grpc-ecosystem/grpc-gateway/utilities" "golang.org/x/net/context" diff --git a/examples/examplepb/stream.proto b/examples/proto/examplepb/stream.proto similarity index 88% rename from examples/examplepb/stream.proto rename to examples/proto/examplepb/stream.proto index 573a2f4d725..66e59dde758 100644 --- a/examples/examplepb/stream.proto +++ b/examples/proto/examplepb/stream.proto @@ -4,8 +4,8 @@ package grpc.gateway.examples.examplepb; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; -import "examples/examplepb/a_bit_of_everything.proto"; -import "examples/sub/message.proto"; +import "examples/proto/examplepb/a_bit_of_everything.proto"; +import "examples/proto/sub/message.proto"; // Defines some more operations to be added to ABitOfEverythingService service StreamService { diff --git a/examples/examplepb/wrappers.pb.go b/examples/proto/examplepb/wrappers.pb.go similarity index 68% rename from examples/examplepb/wrappers.pb.go rename to examples/proto/examplepb/wrappers.pb.go index 62268e17c2e..be6f14bf6fb 100644 --- a/examples/examplepb/wrappers.pb.go +++ b/examples/proto/examplepb/wrappers.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: examples/examplepb/wrappers.proto +// source: examples/proto/examplepb/wrappers.proto package examplepb @@ -148,32 +148,32 @@ var _WrappersService_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "examples/examplepb/wrappers.proto", + Metadata: "examples/proto/examplepb/wrappers.proto", } -func init() { proto.RegisterFile("examples/examplepb/wrappers.proto", fileDescriptor4) } +func init() { proto.RegisterFile("examples/proto/examplepb/wrappers.proto", fileDescriptor4) } var fileDescriptor4 = []byte{ - // 330 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0xd2, 0xc1, 0x4a, 0x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, 0x51, 0xf7, 0xba, 0xa8, 0xab, 0xab, 0x75, 0xaf, 0xbb, 0xd0, - 0x58, 0x17, 0x7a, 0xac, 0x80, 0x59, 0xd4, 0xff, 0x56, 0xe8, 0xab, 0x22, 0x83, 0x7a, 0x5c, 0xd6, - 0xc5, 0xea, 0x23, 0x98, 0x70, 0x25, 0x90, 0xff, 0x5f, 0xb1, 0xfa, 0xa5, 0x0b, 0xe1, 0xea, 0xa3, - 0x45, 0x13, 0x9d, 0x10, 0xc2, 0x01, 0x14, 0xf2, 0x9a, 0xe3, 0xf1, 0x12, 0xef, 0x03, 0xa8, 0x39, - 0xae, 0x73, 0x5f, 0xb6, 0xdf, 0x03, 0xb2, 0xe1, 0xdf, 0x60, 0x20, 0xcc, 0x54, 0x0e, 0x45, 0xf4, - 0x42, 0x6a, 0x17, 0x46, 0x30, 0x2b, 0xa2, 0x43, 0xfa, 0xcb, 0x05, 0x50, 0x6f, 0xe3, 0xbf, 0x47, - 0x5b, 0xcd, 0xb7, 0xcf, 0xaf, 0x8f, 0xca, 0x76, 0x6b, 0x33, 0x99, 0x1e, 0xfb, 0xe3, 0x2b, 0x6f, - 0xe3, 0x34, 0x38, 0xea, 0x87, 0xf7, 0xf5, 0x92, 0xf1, 0x9a, 0x5b, 0xa0, 0xf3, 0x1d, 0x00, 0x00, - 0xff, 0xff, 0x03, 0xd1, 0x02, 0x94, 0xb0, 0x02, 0x00, 0x00, + // 333 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0xd2, 0xcf, 0x4a, 0x3b, 0x31, + 0x10, 0x07, 0x70, 0xb6, 0xfd, 0xfd, 0x8a, 0xcd, 0x0a, 0xc2, 0xe2, 0x41, 0xd7, 0x62, 0xa5, 0x17, + 0xff, 0x1c, 0xb2, 0xd8, 0x96, 0x82, 0x22, 0x08, 0x55, 0x04, 0xaf, 0x16, 0x14, 0xbc, 0x48, 0xd2,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0x4c, 0xb8, 0x12, 0xc8, 0xff, 0xaf, 0x58, 0xfd, 0xd2, 0x85, + 0x70, 0xf5, 0xd1, 0xa2, 0x89, 0x4e, 0x08, 0xe1, 0x00, 0x0a, 0x79, 0xcd, 0xf1, 0x78, 0x89, 0xf7, + 0x01, 0xd4, 0x1c, 0xd7, 0xb9, 0x2f, 0xdb, 0xef, 0x01, 0xd9, 0xf0, 0xff, 0x60, 0x20, 0xcc, 0x54, + 0x0e, 0x45, 0xf4, 0x42, 0x6a, 0x17, 0x46, 0x30, 0x2b, 0xa2, 0x43, 0xfa, 0xcb, 0x05, 0x50, 0x6f, + 0xe3, 0xbf, 0x47, 0x5b, 0xcd, 0xb7, 0xcf, 0xaf, 0x8f, 0xca, 0x76, 0x6b, 0x33, 0x99, 0x1e, 0xfb, + 0xe3, 0x2b, 0x6f, 0xe3, 0x34, 0x38, 0xea, 0x87, 0xf7, 0xf5, 0x92, 0xf1, 0x9a, 0x5b, 0xa0, 0xf3, + 0x1d, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xa4, 0x0c, 0xe1, 0xb6, 0x02, 0x00, 0x00, } diff --git a/examples/examplepb/wrappers.pb.gw.go b/examples/proto/examplepb/wrappers.pb.gw.go similarity index 98% rename from examples/examplepb/wrappers.pb.gw.go rename to examples/proto/examplepb/wrappers.pb.gw.go index a940b090174..b42c7715e3d 100644 --- a/examples/examplepb/wrappers.pb.gw.go +++ b/examples/proto/examplepb/wrappers.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: examples/examplepb/wrappers.proto +// source: examples/proto/examplepb/wrappers.proto /* Package examplepb is a reverse proxy. diff --git a/examples/examplepb/wrappers.proto b/examples/proto/examplepb/wrappers.proto similarity index 100% rename from examples/examplepb/wrappers.proto rename to examples/proto/examplepb/wrappers.proto diff --git a/examples/examplepb/wrappers.swagger.json b/examples/proto/examplepb/wrappers.swagger.json similarity index 96% rename from examples/examplepb/wrappers.swagger.json rename to examples/proto/examplepb/wrappers.swagger.json index 01fd9d2e6a9..37c6144aed1 100644 --- a/examples/examplepb/wrappers.swagger.json +++ b/examples/proto/examplepb/wrappers.swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "examples/examplepb/wrappers.proto", + "title": "examples/proto/examplepb/wrappers.proto", "version": "version not set" }, "schemes": [ diff --git a/examples/sub/BUILD.bazel b/examples/proto/sub/BUILD.bazel similarity index 94% rename from examples/sub/BUILD.bazel rename to examples/proto/sub/BUILD.bazel index 399c18f9bb0..bc5874bba55 100644 --- a/examples/sub/BUILD.bazel +++ b/examples/proto/sub/BUILD.bazel @@ -10,12 +10,12 @@ proto_library( go_proto_library( name = "sub_go_proto", - importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/sub", + importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub", proto = ":sub_proto", ) go_library( name = "go_default_library", embed = [":sub_go_proto"], - importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/sub", + importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub", ) diff --git a/examples/sub/message.pb.go b/examples/proto/sub/message.pb.go similarity index 64% rename from examples/sub/message.pb.go rename to examples/proto/sub/message.pb.go index 9faad923a57..7d4ec6acf4b 100644 --- a/examples/sub/message.pb.go +++ b/examples/proto/sub/message.pb.go @@ -1,11 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: examples/sub/message.proto +// source: examples/proto/sub/message.proto /* Package sub is a generated protocol buffer package. It is generated from these files: - examples/sub/message.proto + examples/proto/sub/message.proto It has these top-level messages: StringMessage @@ -48,15 +48,16 @@ func init() { proto.RegisterType((*StringMessage)(nil), "grpc.gateway.examples.sub.StringMessage") } -func init() { proto.RegisterFile("examples/sub/message.proto", fileDescriptor0) } +func init() { proto.RegisterFile("examples/proto/sub/message.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 111 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xad, 0x48, 0xcc, - 0x2d, 0xc8, 0x49, 0x2d, 0xd6, 0x2f, 0x2e, 0x4d, 0xd2, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, - 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x4c, 0x2f, 0x2a, 0x48, 0xd6, 0x4b, 0x4f, 0x2c, - 0x49, 0x2d, 0x4f, 0xac, 0xd4, 0x83, 0x29, 0xd4, 0x2b, 0x2e, 0x4d, 0x52, 0x52, 0xe5, 0xe2, 0x0d, - 0x2e, 0x29, 0xca, 0xcc, 0x4b, 0xf7, 0x85, 0xe8, 0x10, 0x12, 0xe1, 0x62, 0x2d, 0x4b, 0xcc, 0x29, - 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd2, 0xe0, 0x0c, 0x82, 0x70, 0x9c, 0x58, 0xa3, 0x98, 0x8b, 0x4b, - 0x93, 0x00, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x10, 0x60, 0xa9, 0x65, 0x00, 0x00, 0x00, + // 114 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xad, 0x48, 0xcc, + 0x2d, 0xc8, 0x49, 0x2d, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x2e, 0x4d, 0xd2, 0xcf, + 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0xd5, 0x03, 0x8b, 0x08, 0x49, 0xa6, 0x17, 0x15, 0x24, 0xeb, + 0xa5, 0x27, 0x96, 0xa4, 0x96, 0x27, 0x56, 0xea, 0xc1, 0x94, 0xeb, 0x15, 0x97, 0x26, 0x29, 0xa9, + 0x72, 0xf1, 0x06, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0xfb, 0x42, 0x74, 0x08, 0x89, 0x70, 0xb1, 0x96, + 0x25, 0xe6, 0x94, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x69, 0x70, 0x06, 0x41, 0x38, 0x4e, 0xac, 0x51, + 0xcc, 0xc5, 0xa5, 0x49, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x00, 0x25, 0x33, 0x6b, 0x00, + 0x00, 0x00, } diff --git a/examples/sub/message.proto b/examples/proto/sub/message.proto similarity index 100% rename from examples/sub/message.proto rename to examples/proto/sub/message.proto diff --git a/examples/sub2/BUILD.bazel b/examples/proto/sub2/BUILD.bazel similarity index 94% rename from examples/sub2/BUILD.bazel rename to examples/proto/sub2/BUILD.bazel index 08a67fa7e8d..539f5b6e450 100644 --- a/examples/sub2/BUILD.bazel +++ b/examples/proto/sub2/BUILD.bazel @@ -10,12 +10,12 @@ proto_library( go_proto_library( name = "sub2_go_proto", - importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/sub2", + importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub2", proto = ":sub2_proto", ) go_library( name = "go_default_library", embed = [":sub2_go_proto"], - importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/sub2", + importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub2", ) diff --git a/examples/sub2/message.pb.go b/examples/proto/sub2/message.pb.go similarity index 59% rename from examples/sub2/message.pb.go rename to examples/proto/sub2/message.pb.go index 710d9525101..156774b7d3f 100644 --- a/examples/sub2/message.pb.go +++ b/examples/proto/sub2/message.pb.go @@ -1,11 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: examples/sub2/message.proto +// source: examples/proto/sub2/message.proto /* Package sub2 is a generated protocol buffer package. It is generated from these files: - examples/sub2/message.proto + examples/proto/sub2/message.proto It has these top-level messages: IdMessage @@ -47,16 +47,17 @@ func init() { proto.RegisterType((*IdMessage)(nil), "sub2.IdMessage") } -func init() { proto.RegisterFile("examples/sub2/message.proto", fileDescriptor0) } +func init() { proto.RegisterFile("examples/proto/sub2/message.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 128 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xad, 0x48, 0xcc, - 0x2d, 0xc8, 0x49, 0x2d, 0xd6, 0x2f, 0x2e, 0x4d, 0x32, 0xd2, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, - 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0x89, 0x29, 0xc9, 0x73, 0x71, 0x7a, - 0xa6, 0xf8, 0x42, 0x24, 0x84, 0x84, 0xb8, 0x58, 0x4a, 0x4b, 0x33, 0x53, 0x24, 0x18, 0x15, 0x18, - 0x35, 0x38, 0x83, 0xc0, 0x6c, 0x27, 0xb3, 0x28, 0x93, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, - 0xe4, 0xfc, 0x5c, 0xfd, 0xf4, 0xa2, 0x82, 0x64, 0xdd, 0xd4, 0xe4, 0xfc, 0xe2, 0xca, 0xe2, 0x92, - 0x54, 0x28, 0x37, 0x3d, 0xb1, 0x24, 0xb5, 0x3c, 0xb1, 0x52, 0x1f, 0xc5, 0xb2, 0x24, 0x36, 0xb0, - 0x2d, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x53, 0x75, 0xef, 0xe0, 0x84, 0x00, 0x00, 0x00, + // 130 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xad, 0x48, 0xcc, + 0x2d, 0xc8, 0x49, 0x2d, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x2e, 0x4d, 0x32, 0xd2, + 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0xd5, 0x03, 0x0b, 0x09, 0xb1, 0x80, 0xc4, 0x94, 0xe4, + 0xb9, 0x38, 0x3d, 0x53, 0x7c, 0x21, 0x12, 0x42, 0x42, 0x5c, 0x2c, 0xa5, 0xa5, 0x99, 0x29, 0x12, + 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x60, 0xb6, 0x93, 0x4d, 0x94, 0x55, 0x7a, 0x66, 0x49, 0x46, + 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x51, 0x41, 0xb2, 0x6e, 0x6a, 0x72, 0x7e, 0x71, + 0x65, 0x71, 0x49, 0x2a, 0x94, 0x9b, 0x9e, 0x58, 0x92, 0x5a, 0x9e, 0x58, 0xa9, 0x8f, 0xc5, 0xca, + 0x24, 0x36, 0x30, 0xdb, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x49, 0xe7, 0x2f, 0x90, 0x00, + 0x00, 0x00, } diff --git a/examples/sub2/message.proto b/examples/proto/sub2/message.proto similarity index 88% rename from examples/sub2/message.proto rename to examples/proto/sub2/message.proto index 9c266430958..59c9bd9f9fc 100644 --- a/examples/sub2/message.proto +++ b/examples/proto/sub2/message.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -option go_package = "github.com/grpc-ecosystem/grpc-gateway/examples/sub2"; +option go_package = "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub2"; package sub2; message IdMessage { diff --git a/examples/server/BUILD.bazel b/examples/server/BUILD.bazel index 0982db9636f..6d924fe47f4 100644 --- a/examples/server/BUILD.bazel +++ b/examples/server/BUILD.bazel @@ -12,9 +12,9 @@ go_library( ], importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/server", deps = [ - "//examples/examplepb:go_default_library", - "//examples/sub:go_default_library", - "//examples/sub2:go_default_library", + "//examples/proto/examplepb:go_default_library", + "//examples/proto/sub:go_default_library", + "//examples/proto/sub2:go_default_library", "@com_github_golang_glog//:go_default_library", "@com_github_golang_protobuf//proto:go_default_library", "@com_github_golang_protobuf//ptypes/duration:go_default_library", diff --git a/examples/server/a_bit_of_everything.go b/examples/server/a_bit_of_everything.go index 91f255d435c..2d8dec55c25 100644 --- a/examples/server/a_bit_of_everything.go +++ b/examples/server/a_bit_of_everything.go @@ -10,9 +10,9 @@ import ( "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/duration" "github.com/golang/protobuf/ptypes/empty" - examples "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" - sub "github.com/grpc-ecosystem/grpc-gateway/examples/sub" - sub2 "github.com/grpc-ecosystem/grpc-gateway/examples/sub2" + examples "github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb" + sub "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub" + sub2 "github.com/grpc-ecosystem/grpc-gateway/examples/proto/sub2" "github.com/rogpeppe/fastuuid" "google.golang.org/genproto/googleapis/rpc/errdetails" "google.golang.org/grpc" diff --git a/examples/server/echo.go b/examples/server/echo.go index f2c063d1536..1647c0aaa4c 100644 --- a/examples/server/echo.go +++ b/examples/server/echo.go @@ -4,7 +4,7 @@ import ( "context" "github.com/golang/glog" - examples "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" + examples "github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb" "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) diff --git a/examples/server/flow_combination.go b/examples/server/flow_combination.go index 71e65eada18..516510f4bc6 100644 --- a/examples/server/flow_combination.go +++ b/examples/server/flow_combination.go @@ -4,7 +4,7 @@ import ( "context" "io" - examples "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" + examples "github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb" ) type flowCombinationServer struct{} diff --git a/examples/server/main.go b/examples/server/main.go index 67eaa5077ec..4cd385f879d 100644 --- a/examples/server/main.go +++ b/examples/server/main.go @@ -5,7 +5,7 @@ import ( "net" "github.com/golang/glog" - examples "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" + examples "github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb" "google.golang.org/grpc" ) diff --git a/runtime/BUILD.bazel b/runtime/BUILD.bazel index e8964f02426..e04db4f7096 100644 --- a/runtime/BUILD.bazel +++ b/runtime/BUILD.bazel @@ -62,7 +62,7 @@ go_test( ], deps = [ ":go_default_library", - "//examples/examplepb:go_default_library", + "//examples/proto/examplepb:go_default_library", "//runtime/internal:go_default_library", "//utilities:go_default_library", "@com_github_golang_protobuf//jsonpb:go_default_library", diff --git a/runtime/handler_test.go b/runtime/handler_test.go index aeb1fdb6d47..6a712a4e64e 100644 --- a/runtime/handler_test.go +++ b/runtime/handler_test.go @@ -9,7 +9,7 @@ import ( "context" "github.com/golang/protobuf/proto" - pb "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" + pb "github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/grpc-ecosystem/grpc-gateway/runtime/internal" "google.golang.org/grpc" diff --git a/runtime/marshal_json_test.go b/runtime/marshal_json_test.go index e6efa291072..6ab9699e48c 100644 --- a/runtime/marshal_json_test.go +++ b/runtime/marshal_json_test.go @@ -12,7 +12,7 @@ import ( structpb "github.com/golang/protobuf/ptypes/struct" "github.com/golang/protobuf/ptypes/timestamp" "github.com/golang/protobuf/ptypes/wrappers" - "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" + "github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb" "github.com/grpc-ecosystem/grpc-gateway/runtime" ) diff --git a/runtime/marshal_jsonpb_test.go b/runtime/marshal_jsonpb_test.go index 482a45bfd71..679283b4511 100644 --- a/runtime/marshal_jsonpb_test.go +++ b/runtime/marshal_jsonpb_test.go @@ -13,7 +13,7 @@ import ( structpb "github.com/golang/protobuf/ptypes/struct" "github.com/golang/protobuf/ptypes/timestamp" "github.com/golang/protobuf/ptypes/wrappers" - "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" + "github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb" "github.com/grpc-ecosystem/grpc-gateway/runtime" ) diff --git a/runtime/marshal_proto_test.go b/runtime/marshal_proto_test.go index 07dac47bd5c..535f3991d9d 100644 --- a/runtime/marshal_proto_test.go +++ b/runtime/marshal_proto_test.go @@ -6,7 +6,7 @@ import ( "bytes" "github.com/golang/protobuf/ptypes/timestamp" - "github.com/grpc-ecosystem/grpc-gateway/examples/examplepb" + "github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb" "github.com/grpc-ecosystem/grpc-gateway/runtime" ) @@ -15,7 +15,7 @@ var message = &examplepb.ABitOfEverything{ RepeatedStringValue: nil, MappedStringValue: nil, MappedNestedValue: nil, - RepeatedEnumValue: nil, + RepeatedEnumValue: nil, TimestampValue: ×tamp.Timestamp{}, Uuid: "6EC2446F-7E89-4127-B3E6-5C05E6BECBA7", Nested: []*examplepb.ABitOfEverything_Nested{ @@ -25,11 +25,11 @@ var message = &examplepb.ABitOfEverything{ }, }, Uint64Value: 0xFFFFFFFFFFFFFFFF, - EnumValue: examplepb.NumericEnum_ONE, + EnumValue: examplepb.NumericEnum_ONE, OneofValue: &examplepb.ABitOfEverything_OneofString{ OneofString: "bar", }, - MapValue: map[string]examplepb.NumericEnum{ + MapValue: map[string]examplepb.NumericEnum{ "a": examplepb.NumericEnum_ONE, "b": examplepb.NumericEnum_ZERO, }, From e3c9428f4dfa7beb7d5788801bc1b6f832aaee5a Mon Sep 17 00:00:00 2001 From: Yuki Yugui Sonoda Date: Tue, 24 Apr 2018 20:30:59 +0900 Subject: [PATCH 7/8] Let bazel-gazelle to ignore generated .pb.gw.go files --- examples/proto/examplepb/BUILD.bazel | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/proto/examplepb/BUILD.bazel b/examples/proto/examplepb/BUILD.bazel index 1ab7b5a6297..3a73f791601 100644 --- a/examples/proto/examplepb/BUILD.bazel +++ b/examples/proto/examplepb/BUILD.bazel @@ -3,6 +3,12 @@ load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") package(default_visibility = ["//visibility:public"]) +# gazelle:exclude a_bit_of_everything.pb.gw.go +# gazelle:exclude echo_service.pb.gw.go +# gazelle:exclude flow_combination.pb.gw.go +# gazelle:exclude stream.pb.gw.go +# gazelle:exclude wrappers.pb.gw.go + proto_library( name = "examplepb_proto", srcs = [ From 80e88d0757f0c124b79e7506121fdaca02b140ec Mon Sep 17 00:00:00 2001 From: Yuki Yugui Sonoda Date: Wed, 25 Apr 2018 10:21:43 +0900 Subject: [PATCH 8/8] Correct package paths in TravisCI --- .travis.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2500db428d2..f9775899da6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,23 +19,30 @@ before_install: - go get github.com/dghubble/sling - go get github.com/go-resty/resty install: + # Make sure externally referenced packages are go-gettable. - go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway + - go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger - go get github.com/grpc-ecosystem/grpc-gateway/runtime - - go get github.com/grpc-ecosystem/grpc-gateway/examples - - go get github.com/grpc-ecosystem/grpc-gateway/examples/server + - go get github.com/grpc-ecosystem/grpc-gateway/examples/cmd/example-grpc-server + - go get github.com/grpc-ecosystem/grpc-gateway/examples/cmd/example-gateway-server before_script: - sh -c 'cd examples/browser && npm install' script: - if [ "${USE_BAZEL}" = true ]; then ./.travis/bazel-build.sh; fi - if [ "${USE_BAZEL}" = true ]; then ./.travis/bazel-test.sh; fi + + # Make sure examples of generated files are up-to-date - if [ -z "${USE_BAZEL}" ]; then make realclean && make examples SWAGGER_CODEGEN="java -jar $HOME/local/swagger-codegen-cli.jar"; fi - if [ -z "${USE_BAZEL}" ] && (go version | grep -q "${GO_VERSION_TO_DIFF_TEST}") && [ -z "${GATEWAY_PLUGIN_FLAGS}" ]; then test -z "$(git status --porcelain)" || (git status; git diff; exit 1); fi + + # Unit tests, integration tests and code health checks - if [ -z "${USE_BAZEL}" ]; then env GLOG_logtostderr=1 go test -race -v github.com/grpc-ecosystem/grpc-gateway/...; fi - if [ -z "${USE_BAZEL}" ]; then make lint; fi - if [ -z "${USE_BAZEL}" ]; then sh -c 'cd examples/browser && node ./node_modules/gulp/bin/gulp'; fi - if (go version | grep -q "${GO_VERSION_TO_DIFF_TEST}") && [ -z "${GATEWAY_PLUGIN_FLAGS}" ]; then env GLOG_logtostderr=1 ./bin/coverage; fi after_success: - bash <(curl -s https://codecov.io/bash) + env: global: - "PATH=$PATH:$HOME/local/bin"