Socket
Book a DemoInstallSign in
Socket

github.com/emanpicar/currency-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/emanpicar/currency-api

v0.0.0-20200602093043-0de6631be4bd
Source
Go
Version published
Created
Source

Currency API

Golang

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

FAQs

Package last updated on 02 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.