Skip to content

Instantly share code, notes, and snippets.

@AntonStoeckl
Created June 3, 2022 07:34
Show Gist options
  • Save AntonStoeckl/eb31438af1d08338bbe59d142151a4ca to your computer and use it in GitHub Desktop.
Save AntonStoeckl/eb31438af1d08338bbe59d142151a4ca to your computer and use it in GitHub Desktop.
Example for Blog Post "Hexagonal Architecture: Structuring a project and the influence of granularity V2
game
├── application
│ ├── deck_builder_command_handler.go # hexagon implementation
│ ├── for_building_deck_sets.go # primary port
│ ├── for_playing_the_game.go # primary port
│ ├── for_reading_active_players_projections.go # secondary port
│ ├── for_reading_deck_sets.go # secondary port
│ ├── for_storing_deck_sets.go # secondary port
│ ├── for_storing_events.go # secondary port
│ └── player_command_handler.go # hexagon implementation
├── domain
│ ├── deck_set.go # aggregate
│ ├── deck_set_test.go # unit test
│ ├── player.go # aggregate
│ └── player_test.go # unit test
└── infrastructure
└── adapter
├── secondary
│ ├── forreadingdecksets
│ │ └── file_deck_set_reader.go # secondary adapter
│ └── forstoringevents
│ ├── esdb_event_store.go # generic
│ └── player_event_store.go # secondary adapter
└── primary
├── forbuildingdecksets
│ ├── deck_builder_command_handler_test.go # primary adapter (unit test)
│ ├── deck_builder_http_handler.go # primary adapter
│ └── integration_test.go # primary adapter
└── forplayingthegame
├── integration_test.go
├── player_command_handler_test.go # primary adapter (unit test)
├── player_http_handler.go # primary adapter
└── scheduler.go # primary adapter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment