gunk-example-server

command module
v0.0.0-...-3b9ec85 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: MIT Imports: 14 Imported by: 0

README

About gunk-example-server

Demonstrates building example gRPC servers with OpenAPI (Swagger) annotations in Go using Gunk definitions.

File Description
.gunkconfig Gunk project configuration
main.go gRPC server implementation
cmd/gunk-example-server-gw/main.go REST gateway and Swagger docs
api/v1/util.gunk Gunk echo service example
api/v1/countries.gunk Gunk countries service example

Using

# clone
$ git clone https://github.com/gunk/gunk-example-server.git && cd gunk-example-server

# install protobuf tools / generator dependencies
$ ./install.sh

# build and run gRPC server
$ go build && ./gunk-example-server

# build and run REST gateway and Swagger doc site
$ go build ./cmd/gunk-example-server-gw && ./gunk-example-server-gw

# test
$ ./test.sh

The OpenAPI (ie, Swagger) definitions can be viewed with ReDoc by visiting localhost:9091/redoc.

Documentation

Overview

Command util is an example gRPC server for Gunk services and methods defined in api/v1.

Directories

Path Synopsis
api
v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.
cmd
gunk-example-server-gw
Command gunk-example-server-gw is a grpc-gateway example implementation for the gunk-example-server.
Command gunk-example-server-gw is a grpc-gateway example implementation for the gunk-example-server.

Jump to

Keyboard shortcuts

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