├── .gitignore ├── README.md ├── api.http ├── application ├── available_slots_handler_test.go ├── available_slots_handler_v2_test.go ├── available_slots_projection.go ├── available_slots_projection_v2.go ├── day_archiver_process_manager.go ├── day_archiver_process_manager_test.go ├── overbooking_process_manager.go └── overbooking_process_manager_test.go ├── controllers ├── api_controller.go ├── available_slot_response.go ├── book_slot_request.go ├── cancel_slot_booking_request.go └── schedule_day_request.go ├── docker-compose.yaml ├── domain ├── doctorday │ ├── command_handlers.go │ ├── commands │ │ ├── archive_day_schedule.go │ │ ├── book_slot.go │ │ ├── cancel_day_schedule.go │ │ ├── cancel_slot_booking.go │ │ ├── schedule_day.go │ │ └── schedule_slot.go │ ├── day.go │ ├── day_id.go │ ├── day_repository.go │ ├── day_snapshot.go │ ├── day_snapshot_test.go │ ├── day_test.go │ ├── doctor_id.go │ ├── errors.go │ ├── event_store_day_repo.go │ ├── events │ │ ├── calendar_day_started.go │ │ ├── day_schedule_archived.go │ │ ├── day_schedule_cancelled.go │ │ ├── day_scheduled.go │ │ ├── slot_booked.go │ │ ├── slot_booking_cancelled.go │ │ ├── slot_schedule_cancelled.go │ │ └── slot_scheduled.go │ ├── patient_id.go │ ├── slot.go │ ├── slot_id.go │ ├── slot_status.go │ ├── slots.go │ ├── type_mapping.go │ └── type_mapping_test.go └── readmodel │ ├── archivable_day.go │ ├── archivable_day_repository.go │ ├── available_slot.go │ ├── available_slots_repository.go │ ├── booked_slot.go │ ├── booked_slots_repository.go │ └── scheduled_slot.go ├── eventsourcing ├── aggregate_root.go ├── aggregate_snapshot.go ├── cold_storage.go ├── snapshot_metadata.go └── type_mapper.go ├── go.mod ├── go.sum ├── infrastructure ├── aggregate_store.go ├── aggregate_tests.go ├── command_dispatcher.go ├── command_handler.go ├── command_handler_map.go ├── command_metadata.go ├── es_aggregate_store.go ├── es_checkpoint_store.go ├── es_command_store.go ├── es_event_serde.go ├── es_event_store.go ├── event_handler.go ├── event_metadata.go ├── fake_aggregate_store.go ├── handler_tests.go ├── infrastructur.go ├── inmemory │ ├── archivable_days_repository.go │ └── cold_storage.go ├── mongodb │ ├── archivable_days_repository.go │ ├── available_slot.go │ ├── available_slot_v2.go │ ├── available_slots_repository.go │ ├── available_slots_repository_v2.go │ └── booked_slots_repository.go └── projections │ ├── projector.go │ └── subscription_manager.go └── main.go /.gitignore: -------------------------------------------------------------------------------- 1 | .idea -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/README.md -------------------------------------------------------------------------------- /api.http: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/api.http -------------------------------------------------------------------------------- /application/available_slots_handler_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/application/available_slots_handler_test.go -------------------------------------------------------------------------------- /application/available_slots_handler_v2_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/application/available_slots_handler_v2_test.go -------------------------------------------------------------------------------- /application/available_slots_projection.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/application/available_slots_projection.go -------------------------------------------------------------------------------- /application/available_slots_projection_v2.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/application/available_slots_projection_v2.go -------------------------------------------------------------------------------- /application/day_archiver_process_manager.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/application/day_archiver_process_manager.go -------------------------------------------------------------------------------- /application/day_archiver_process_manager_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/application/day_archiver_process_manager_test.go -------------------------------------------------------------------------------- /application/overbooking_process_manager.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/application/overbooking_process_manager.go -------------------------------------------------------------------------------- /application/overbooking_process_manager_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/application/overbooking_process_manager_test.go -------------------------------------------------------------------------------- /controllers/api_controller.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/controllers/api_controller.go -------------------------------------------------------------------------------- /controllers/available_slot_response.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/controllers/available_slot_response.go -------------------------------------------------------------------------------- /controllers/book_slot_request.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/controllers/book_slot_request.go -------------------------------------------------------------------------------- /controllers/cancel_slot_booking_request.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/controllers/cancel_slot_booking_request.go -------------------------------------------------------------------------------- /controllers/schedule_day_request.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/controllers/schedule_day_request.go -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/docker-compose.yaml -------------------------------------------------------------------------------- /domain/doctorday/command_handlers.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/command_handlers.go -------------------------------------------------------------------------------- /domain/doctorday/commands/archive_day_schedule.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/commands/archive_day_schedule.go -------------------------------------------------------------------------------- /domain/doctorday/commands/book_slot.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/commands/book_slot.go -------------------------------------------------------------------------------- /domain/doctorday/commands/cancel_day_schedule.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/commands/cancel_day_schedule.go -------------------------------------------------------------------------------- /domain/doctorday/commands/cancel_slot_booking.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/commands/cancel_slot_booking.go -------------------------------------------------------------------------------- /domain/doctorday/commands/schedule_day.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/commands/schedule_day.go -------------------------------------------------------------------------------- /domain/doctorday/commands/schedule_slot.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/commands/schedule_slot.go -------------------------------------------------------------------------------- /domain/doctorday/day.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/day.go -------------------------------------------------------------------------------- /domain/doctorday/day_id.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/day_id.go -------------------------------------------------------------------------------- /domain/doctorday/day_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/day_repository.go -------------------------------------------------------------------------------- /domain/doctorday/day_snapshot.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/day_snapshot.go -------------------------------------------------------------------------------- /domain/doctorday/day_snapshot_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/day_snapshot_test.go -------------------------------------------------------------------------------- /domain/doctorday/day_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/day_test.go -------------------------------------------------------------------------------- /domain/doctorday/doctor_id.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/doctor_id.go -------------------------------------------------------------------------------- /domain/doctorday/errors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/errors.go -------------------------------------------------------------------------------- /domain/doctorday/event_store_day_repo.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/event_store_day_repo.go -------------------------------------------------------------------------------- /domain/doctorday/events/calendar_day_started.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/events/calendar_day_started.go -------------------------------------------------------------------------------- /domain/doctorday/events/day_schedule_archived.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/events/day_schedule_archived.go -------------------------------------------------------------------------------- /domain/doctorday/events/day_schedule_cancelled.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/events/day_schedule_cancelled.go -------------------------------------------------------------------------------- /domain/doctorday/events/day_scheduled.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/events/day_scheduled.go -------------------------------------------------------------------------------- /domain/doctorday/events/slot_booked.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/events/slot_booked.go -------------------------------------------------------------------------------- /domain/doctorday/events/slot_booking_cancelled.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/events/slot_booking_cancelled.go -------------------------------------------------------------------------------- /domain/doctorday/events/slot_schedule_cancelled.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/events/slot_schedule_cancelled.go -------------------------------------------------------------------------------- /domain/doctorday/events/slot_scheduled.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/events/slot_scheduled.go -------------------------------------------------------------------------------- /domain/doctorday/patient_id.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/patient_id.go -------------------------------------------------------------------------------- /domain/doctorday/slot.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/slot.go -------------------------------------------------------------------------------- /domain/doctorday/slot_id.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/slot_id.go -------------------------------------------------------------------------------- /domain/doctorday/slot_status.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/slot_status.go -------------------------------------------------------------------------------- /domain/doctorday/slots.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/slots.go -------------------------------------------------------------------------------- /domain/doctorday/type_mapping.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/type_mapping.go -------------------------------------------------------------------------------- /domain/doctorday/type_mapping_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/doctorday/type_mapping_test.go -------------------------------------------------------------------------------- /domain/readmodel/archivable_day.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/readmodel/archivable_day.go -------------------------------------------------------------------------------- /domain/readmodel/archivable_day_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/readmodel/archivable_day_repository.go -------------------------------------------------------------------------------- /domain/readmodel/available_slot.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/readmodel/available_slot.go -------------------------------------------------------------------------------- /domain/readmodel/available_slots_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/readmodel/available_slots_repository.go -------------------------------------------------------------------------------- /domain/readmodel/booked_slot.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/readmodel/booked_slot.go -------------------------------------------------------------------------------- /domain/readmodel/booked_slots_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/readmodel/booked_slots_repository.go -------------------------------------------------------------------------------- /domain/readmodel/scheduled_slot.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/domain/readmodel/scheduled_slot.go -------------------------------------------------------------------------------- /eventsourcing/aggregate_root.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/eventsourcing/aggregate_root.go -------------------------------------------------------------------------------- /eventsourcing/aggregate_snapshot.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/eventsourcing/aggregate_snapshot.go -------------------------------------------------------------------------------- /eventsourcing/cold_storage.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/eventsourcing/cold_storage.go -------------------------------------------------------------------------------- /eventsourcing/snapshot_metadata.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/eventsourcing/snapshot_metadata.go -------------------------------------------------------------------------------- /eventsourcing/type_mapper.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/eventsourcing/type_mapper.go -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/go.sum -------------------------------------------------------------------------------- /infrastructure/aggregate_store.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/aggregate_store.go -------------------------------------------------------------------------------- /infrastructure/aggregate_tests.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/aggregate_tests.go -------------------------------------------------------------------------------- /infrastructure/command_dispatcher.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/command_dispatcher.go -------------------------------------------------------------------------------- /infrastructure/command_handler.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/command_handler.go -------------------------------------------------------------------------------- /infrastructure/command_handler_map.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/command_handler_map.go -------------------------------------------------------------------------------- /infrastructure/command_metadata.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/command_metadata.go -------------------------------------------------------------------------------- /infrastructure/es_aggregate_store.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/es_aggregate_store.go -------------------------------------------------------------------------------- /infrastructure/es_checkpoint_store.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/es_checkpoint_store.go -------------------------------------------------------------------------------- /infrastructure/es_command_store.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/es_command_store.go -------------------------------------------------------------------------------- /infrastructure/es_event_serde.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/es_event_serde.go -------------------------------------------------------------------------------- /infrastructure/es_event_store.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/es_event_store.go -------------------------------------------------------------------------------- /infrastructure/event_handler.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/event_handler.go -------------------------------------------------------------------------------- /infrastructure/event_metadata.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/event_metadata.go -------------------------------------------------------------------------------- /infrastructure/fake_aggregate_store.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/fake_aggregate_store.go -------------------------------------------------------------------------------- /infrastructure/handler_tests.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/handler_tests.go -------------------------------------------------------------------------------- /infrastructure/infrastructur.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/infrastructur.go -------------------------------------------------------------------------------- /infrastructure/inmemory/archivable_days_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/inmemory/archivable_days_repository.go -------------------------------------------------------------------------------- /infrastructure/inmemory/cold_storage.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/inmemory/cold_storage.go -------------------------------------------------------------------------------- /infrastructure/mongodb/archivable_days_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/mongodb/archivable_days_repository.go -------------------------------------------------------------------------------- /infrastructure/mongodb/available_slot.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/mongodb/available_slot.go -------------------------------------------------------------------------------- /infrastructure/mongodb/available_slot_v2.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/mongodb/available_slot_v2.go -------------------------------------------------------------------------------- /infrastructure/mongodb/available_slots_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/mongodb/available_slots_repository.go -------------------------------------------------------------------------------- /infrastructure/mongodb/available_slots_repository_v2.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/mongodb/available_slots_repository_v2.go -------------------------------------------------------------------------------- /infrastructure/mongodb/booked_slots_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/mongodb/booked_slots_repository.go -------------------------------------------------------------------------------- /infrastructure/projections/projector.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/projections/projector.go -------------------------------------------------------------------------------- /infrastructure/projections/subscription_manager.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/infrastructure/projections/subscription_manager.go -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kurrent-io/training-advanced-go/HEAD/main.go --------------------------------------------------------------------------------