Skip to content

Instantly share code, notes, and snippets.

@mlimaloureiro
Last active November 25, 2017 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mlimaloureiro/7c084bbb57e877b8a79203c2e2f7d5e9 to your computer and use it in GitHub Desktop.
Save mlimaloureiro/7c084bbb57e877b8a79203c2e2f7d5e9 to your computer and use it in GitHub Desktop.
.
├──delivery // Serve content via HTTP? CLI? everything related to that should be here
| └── http
| ├── app.go // where we have our GIN app
| ├── app_test.go // our app tests
| ├── context // some gin dependencies
| | ├── context.go
| │ └── mocks
| │ └── Context.go
| ├── controllers // our controllers
│ └── usecase // our interfaces to the use case layer
│ ├── mocks
│ │ └── Account.go
│ └── account.go
├── domain
│ └── account
│ └── account.go
|
├── infrastructure // Where we have our implementation details (Database connections, Queues, External services)
│   └── repository
│   └── awsdynamodb
| ├── schema
| | └── account.go // Our intermediary data type
| ├── transformer
| | └── account.go // Where we make our intermediate data types to domain types
| ├── account.go // Our dynamodb repository implementation
| └── account_test.go // Our dynamodb repository test
|
├── usecase // The glue
│ ├── account.go
│ ├── account_test.go
│ └── repository
│ ├── mocks
│ │ └── Account.go
│ └── account.go // our interface, in the correct layer. Implementations are on
// ./infratructure directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment