Skip to content

Latest commit

 

History

History
43 lines (25 loc) · 1.92 KB

README.md

File metadata and controls

43 lines (25 loc) · 1.92 KB

Room Reservation System

Example application created for the presentation on GopherCon Russia 2019 (slides).

There are 3 versions of this application:

Database adapters (in memory in this case) and domain layer is shared by all application versions.

Warning: this repository is using some Watermill unreleased features, which are still not released, like NewPoisonQueueWithFilter or CorrelationIDWithAutogenerate. They are now on cqrs-fix branch and will be released in v0.4.0.

Up and running

For v2.0 and v3.0 you need Kafka. You can use docker-compose to run it:

docker-compose up

If you need some help with docker-compose setup, you should check our article about local Golang development environment.

And then you should run cmd/main.go from application version which you want to run.

cd 3.0/cmd/
go run .

Booking a room

You can book a room using REST API using https://httpie.org/.

http POST localhost:6060/book-room RoomID=10 StartTime=2018-09-22T12:42:31Z EndTime=2018-09-22T12:42:31Z GuestsCount:=2 PaymentChannel="paypal" -v

TODO

  • Update Watermill to the last release (some changes to CQRS need to be merged to the Watermill's master from cqrs-fix branch)
  • Some code cleanups and TODO's fixes
  • Slides link
  • Detailed description

Support

Please join us on the #watermill channel on the Gophers slack: You can get invite here.