opencars

module
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: MIT

README

OpenCars

CircleCI Go Report Card

Overview

RESTful API with information about transport just using Ukrainian License Plate.

Server

Download PostgreSQL dump before starting the server. NOTE: This file is pretty big (3.1 GB)

$ gsutil cp gs://opencars/cars.sql cars.sql

Import database to PostgreSQL

$ cat cars.sql | psql -U postgres

Run the server

$ go run cmd/server/main.go

API

$ http localhost:8080/transport?number="АА9359РС"
[
  {
    "address": "8036600000",
    "body": "УНІВЕРСАЛ-B",
    "brand": "TESLA",
    "capacity": 0,
    "color": "ЧОРНИЙ",
    "date": "05.06.2019",
    "description": "ПЕРЕРЕЄСТРАЦIЯ У ЗВ`ЯЗКУ ЗI ЗМIНОЮ АНКЕТНИХ ДАНИХ ВЛАСНИКА",
    "fuel": "ЕЛЕКТРО",
    "kind": "ЛЕГКОВИЙ",
    "model": "MODEL X",
    "number": "АА9359РС",
    "office_id": 12290,
    "office_name": "ТСЦ 8041",
    "operation": 340,
    "person": "P",
    "purpose": "ЗАГАЛЬНИЙ",
    "weight": 2485,
    "year": 2016,
    "vin": "5YJXCCE40GF010543"
  }
]

For more information see documentation.

Parser

Parse CSV files from data.gov.ua into one SQL dump.

$ go run cmd/parser/main.go -path=<PATH> # Path to CSV file

Data

All information was taken from official Ukrainian resource

License

Project released under the terms of the MIT license.

Directories

Path Synopsis
cmd
internal
pkg
hsc

Jump to

Keyboard shortcuts

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