bookdir

command module
v0.0.0-...-f016e46 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

README

bookdir

directory of books, used to illustrate useful gRPC-related development

explanation

the api is written as a proto file and exposed over grpc and also exposed as a rest api through grpc-gateway

way to quick test

go test

run go test -v and see if it passes

json
get

run go run main.go and do curl http://localhost:8080/api/v1/books to see it in action

post

run go run main.go and use curl -H "Content-Type: application/json" -X POST --data-binary '@testdata/testbook.json' http://localhost:8080/api/v1/book to add a book

configuration

Variable Description Default Value
BOOKDIR_GRPC_PORT grpc port of the service 11000
BOOKDIR_REST_PORT rest port of the service 8080
PG_URL postgres database URL empty
REDIS_URL redis database URL empty

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
proto
v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.
repo

Jump to

Keyboard shortcuts

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