Skip to content

Latest commit

 

History

History
87 lines (64 loc) · 1.55 KB

README.md

File metadata and controls

87 lines (64 loc) · 1.55 KB

operations

Go Report Card

Development

Build the binary

make

Start postgres

docker-compose up -Vd postgres

Run sql migrations

migrate -source file://migrations -database postgres://postgres:[email protected]/operations\?sslmode=disable up

Run the web server

./bin/server

Test

Start postgres

docker-compose up -Vd postgres

Run sql migrations

migrate -source file://migrations -database postgres://postgres:[email protected]/operations\?sslmode=disable up

Run tests

go test -v ./...

Usage

For example, you get information about this amazing Tesla Model X

http://localhost:8080/api/v1/operations?number=АА9359РС
[
  {
    "number": "АА9359РС",
    "brand": "TESLA",
    "model": "MODEL X",
    "year": 2016,
    "date": "2016-10-13",
    "registration": "РЕЄСТРАЦIЯ ТЗ ПРИВЕЗЕНОГО З-ЗА КОРДОНУ ПО ВМД",
    "registration_code": 70,
    "fuel": "ЕЛЕКТРО",
    "capacity": null,
    "color": "ЧОРНИЙ",
    "kind": "ЛЕГКОВИЙ",
    "body": "УНІВЕРСАЛ-B",
    "purpose": "ЗАГАЛЬНИЙ",
    "own_weight": 2485,
    "total_weight": 3021,
    "reg_addr_koatuu": "8036600000",
    "dep_code": 8044,
    "dep": "Центр 8044",
    "person": "Юридична особа"
  }
]

License

Project released under the terms of the MIT license.