emc-testtask

command module
v0.0.0-...-451a8f3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

emc-testtask

Run

Make sure that you have docker-compose already installed and then:

docker-compose up

GET /car/:serialnumber

Get car information by serialnumber

POST /car

  • Content-Type: "application/json"

Add car information to the system

  • Example
{
    "serialNumber": 1001,
    "ownerName": "Valya Peshehodka",
    "modelYear": 1999,
    "code": "code",
    "vehicleCode": "vcode",
    "engine": {
        "capacity": 2000,
        "numCylinders": 12,
        "maxRpm": 100,
        "manufacturerCode": "mcode"
    },
    "fuelFigures": {
        "speed": 100,
        "mpg": 100,
        "usageDescription": "desc"
    },
    "performanceFigures": {
        "octaneRating": 99,
        "acceleration": {
            "mph": 23,
            "seconds": 1
        }
    },
    "manufacturer": "Subaru",
    "model": "Rx100",
    "activationCode": "lucky"
}

Assignment

Write client-server application. 
Use case: application which is used in car centers to store information about sold cars. At first application will be used in a single car center then all centers in town/city/world will use it to store information. It should be possible to retrieve info about any sold car by serialNumber. Clients pass to server an Object “Car” with 

following attributes: 
"ownerName" type="string" 
"serialNumber" type="uint64" 
"modelYear" type="uint64" 
"code" type="string" 
"vehicleCode" type="string" 
"engine" 
"capacity" type="uint16" 
"numCylinders" type="uint8" 
"maxRpm" type="uint16" 
"manufacturerCode" type="char" 
"fuelFigures" 
"speed" type="uint16" 
"mpg" type="float" 
"usageDescription" type="string" 
"performanceFigures" 
"octaneRating" type="uint16" 
"acceleration" 
"mph" type="uint16" 
"seconds" type="float" 
"manufacturer" type="string"
"model" type="string" 
"activationCode" type="string"

Server saves the information persistently.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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