grpc-web-fahrenheit

command module
v0.0.0-...-0abc3cd Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: MIT Imports: 12 Imported by: 0

README

grpc-web-fahrenheit

delegates request to grpc-server-fahrenheit

API

/health/

displays service health status

Return codes:
  • OK (200) is returned if service DB is working properly
  • FailedDependency (424) is returned otherwise
  • InternalServerError (500) is returned in case of general errors.
/c2f/[:cels]

returnes a body containing celsius/fahrenheit pair

input

Path parameter with number of degrees celsius

Return codes:
  • OK (200) is returned when ran successfully, with the body containing celsius/fahrenheit pair.
  • NotAcceptable (406) if path parameter can't be parsed to a float64
  • FailedDependency (424) if gRPC dependancy returned error
  • InternalServerError (500) is returned in case of general errors.
/f2c/[:fahr]

returnes a body containing celsius/fahrenheit pair

input

Path parameter with number of degrees fahrenheit

Return codes:
  • OK (200) is returned when ran successfully, with the body containing celsius/fahrenheit pair.
  • NotAcceptable (406) if path parameter can't be parsed to a float64
  • FailedDependency (424) if gRPC dependancy returned error
  • InternalServerError (500) is returned in case of general errors.

Build

Prerequisites:
  • standard Docker installation
  • standard gRPC installation
building
  • run 'source ./env'
  • run 'make'

Run

  • run grpc-server-fahrenheit
  • 'make run' from terminal

Unit tests

'make test' from terminal for unit tests

Integration tests

If not ran already, run steps for build and run. In another terminal, navigate to directory containing Makefile, then 'source ./env', then 'make integration'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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