Skip to content

roblaszczak/reservation-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Using https://watermill.io/ Go library building event-driven application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages