operations

module
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: MIT

README

operations

CircleCI 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:password@127.0.0.1/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:password@127.0.0.1/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.

Directories

Path Synopsis
cmd
pkg
csv
domain/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
store/mockstore
Package mockstore is a generated GoMock package.
Package mockstore is a generated GoMock package.

Jump to

Keyboard shortcuts

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