parkingrates

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

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

Go to latest
Published: Apr 19, 2018 License: MIT Imports: 1 Imported by: 0

README

Parking Rates

This application calculates parking rates for a given time period, based on a pre-defined fee schedule. Overnight parking is not currently supported.

Dependencies

  • Protobuf 3.5.1
  • gRPC 1.11.0
  • Go 1.10.1

Building

The above dependencies must all be installed and the binaries must be in the $PATH.

This project uses dep for dependency management. You can install dep and download all project dependencies by running

make deps

Once dep has finished fetching all the dependencies, you can build the application by running

make

Usage

Run the parking rates service

./parkingrates

By default, this will start the gRPC service listening on port 32884 and the REST service listening on port 32885.

For more advanced options, see parkingrates --help.

Now that the parking rates service is running, you can query it via curl

curl -X POST -H "Content-Type: application/json" http://localhost:32885/v1/spothero/getrates -d '{"start": "2015-07-04T07:00:00Z", "end": "2015-07-04T20:00:00Z"}'

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