A Golang GRPC Microservice with REST and command line interface (Dockerised Application)
go version go1.13.1 linux/amd64 (for installing dependencies in vendor folder and building commands in build folder)
docker-compose version 1.21.2
Docker version 19.03.2
$ ./bin/setup
$ ./bin/run_functional_tests
$ ./bin/parking_lot
create_parking_lot <max_slots_num> Create Parking lot of size n
park <car_reg_number> <car_colour> Park car in the first available slot from entry gate
leave <slot_num> Unpark car from given slot num
status List all occupied slots along with car details
registration_numbers_for_cars_with_colour <car_colour> List car registration numbers having specific colour
slot_numbers_for_cars_with_colour <car_colour> List slot numbers parked with car having specific colour
slot_number_for_registration_number <car_reg_number> Display slot number for given car registration number
exit Exit from shell
$ ./build/parking_lot bin/fixtures/file_input.txt
http://localhost:3569/swagger-parking/
ErrLotSizeLTEZero Lot size cannot be <= zero
ErrNoLotFound No lot available, please create a lot first
ErrParkingFull Sorry, parking lot is full
ErrInvalidSlot Slot invalid
ErrParking Parking slot is empty
ErrInvalidCarNumber Invalid indian car number plate format
ErrNotFound Not found
Error Unexpected error occured
ErrInvalidCommand Invalid command
RegexCarNumber ^[A-Z]{2}-[0-9]{2}-[A-Z]{1,2}-[0-9]{1,4}$
- Nitin Mishra
- [email protected]
- +91-9535507255