Skip to content

Instantly share code, notes, and snippets.

@AntonStoeckl
Created May 20, 2022 11:03
Show Gist options
  • Save AntonStoeckl/a1fdf95c36639c45fac346544aed8194 to your computer and use it in GitHub Desktop.
Save AntonStoeckl/a1fdf95c36639c45fac346544aed8194 to your computer and use it in GitHub Desktop.
Example for Blog Post "Hexagonal Architecture: Structuring a project and the influence of granularity"
game
├── application
│   ├── commands.go # all commands
│   ├── commands_test.go # unit tests
│   ├── deck_selection_command_handler.go # driver port implementation
│   ├── deck_selection_command_handler_test.go # driver adapter
│   ├── driven_ports.go # all driven port definitions
│   ├── driver_ports.go # all driver port definitions
| └── # other use cases and more files skipped
├── domain
│   ├── player.go # aggregate (domain logic)
│   └── # more files skipped
├── infrastucture
│ └── adapters
│ ├── driven
│ │   └── forstoringevents
│ │   ├── esdb_player_event_store.go # dependency impl. for driven adapter
│ │   ├── player_event_store.go # driven adapter
│   │   └── # more files skipped
│ └── driver
│ └── forselectingdecks
│ ├── http_handler.go # driver adapter
│ ├── integration_test.go # driver adapter
│      └── # more files skipped
└── # more stuff skipped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment