rate-api

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

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

Go to latest
Published: Mar 12, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

README

rate-api

Rate-Api allows a user to enter a date time range and get back the rate at which they would be charged to park for that time span built for spot hero.

Feature Summary

  • Get/Set parking rates via /rates
  • Get parking price via /rate
  • Get metrics via /metrics
  • Docker build (see commands below)
  • Swagger file located ./docs/swagger.yaml

Env Variables

Name Default Description
RATE_API_RATES_PATH "./rates.json" The default file location to load the initial rates for the api.
RATE_API_PORT 3000 The default port for the api.

Common Commands

Run Tests

go test

Run App

go run ./...

or via install

go install
rate-api

Build Docker Image

docker build --tag "rate-api:v1" .

Generate Swagger Docs

# install swaggo
go get -u github.com/swaggo/swag/cmd/swag

# run to generate docs in ./docs
# remove unused docs.go to avoid go run ./... conflict
swag init && rm ./docs/docs.go

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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