Currency API

Currency API is a simple microservice capable of handling historical rates via REST API and authorize users using JWT Authentication.
Tech
Currency API uses a number of open source projects to work properly:
- Golang - Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
- GORM - The fantastic ORM library for Golang
- gorilla/mux - Package mux implements a request router and dispatcher.
- PostgreSQL - The World's Most Advanced Open Source Relational Database
- Docker - Securely build, share and run modern applications anywhere
- jwt-go - A go (or 'golang' for search engine friendliness) implementation of JSON Web Tokens
Installation
Currency API requires Docker and docker-compose to run.
Install Docker and docker-compose to start the server
$ cd currency-api
$ docker-compose up
Usage
Currently uses inMemoryValidation please use: user123/pass123 or useruser/passpass
- POST "https://{HOST}:9988/api/auth"
{
"username": user123,
"password": pass123
}
returns: {JwtToken}
Requires: Header {"Authorization": "Bearer {JwtToken}"}
- GET "https://{HOST}:9988/rates/latest"
- GET "https://{HOST}:9988/rates/{YYYY-MM-DD}"
- GET "https://{HOST}:9988/rates/analyze"
Todos
- Validate credentials against DB