internal/

directory
v2.0.0-...-d9ad163 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2022 License: BSD-3-Clause

README

One way to run the example

# Handle dependencies
$ dep init

Follow the guides from this README.md to run the server and gateway.

# Make sure you are in the correct directory: 
# $GOPATH/src/github.com/0ostreamo0/grpc-gateway/v2/examples
$ cd examples/internal/browser
$ pwd

# Install gulp
$ npm install -g gulp-cli
$ npm install
$ gulp

# Run
$ gulp bower
$ gulp backends

Then you can use curl or a browser to test:

# List all apis
$ curl http://localhost:8080/openapiv2/echo_service.swagger.json

# Visit the apis
$ curl -XPOST http://localhost:8080/v1/example/echo/foo
{"id":"foo"}

$ curl  http://localhost:8080/v1/example/echo/foo/123
{"id":"foo","num":"123"}

So you have visited the apis by HTTP successfully. You can also try other apis.

Directories

Path Synopsis
clients
abe
* A Bit of Everything * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0 * Contact: none@example.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* A Bit of Everything * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0 * Contact: none@example.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
cmd
example-gateway-server
Command example-gateway-server is an example reverse-proxy implementation whose HTTP handler is generated by grpc-gateway.
Command example-gateway-server is an example reverse-proxy implementation whose HTTP handler is generated by grpc-gateway.
example-grpc-server
Command example-grpc-server is an example grpc server to be called by example-gateway-server.
Command example-grpc-server is an example grpc server to be called by example-gateway-server.
Package gateway is an example of gRPC-Gateway server
Package gateway is an example of gRPC-Gateway server
Package helloworld is a reverse proxy.
Package helloworld is a reverse proxy.
proto
examplepb
Package examplepb is a reverse proxy.
Package examplepb is a reverse proxy.
standalone
Package examplepb is a reverse proxy.
Package examplepb is a reverse proxy.
sub

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL