Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sebajax committed Feb 21, 2024
1 parent 872df7d commit eb79cca
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263

#### 2 - Create infrastructure/productRepository.go (DB query)

https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/infrastructure/productRepository.go#L1-L61

```tree
├───internal
│ ├───product
Expand All @@ -102,6 +104,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263

#### 3 - Create port.go (dp injection for the service)

https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/port.go#L1-L7

#### 4 - Create service/createProduct.go (create a new product use case implementation)

```tree
Expand All @@ -112,6 +116,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263
│ │ service.go
```

https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/service/createProduct.go#L1-L51

#### 5 - Create service/service.go (dependency injection service using uber dig)

```tree
Expand All @@ -122,6 +128,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263
│ │ service.go
```

https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/service/service.go#L1-L42

#### 6 - Create handler/createProduct.go (create a new hanlder presenter to call the use case)

```tree
Expand All @@ -132,6 +140,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263
│ │ │ handler.go
```

https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/handler/createProduct.go#L1-L60

#### 7 - Create handler/handler.go (handles all the routes for all the presenters)

```tree
Expand All @@ -142,6 +152,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263
│ │ │ handler.go
```

https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/handler/handler.go#L1-L11

#### 8 - Create mock/mockProductRepository.go (mocks the user repository implementation for unit testing)

```tree
Expand All @@ -151,6 +163,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263
│ │ │ mockProductRepository.go
```

https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/mock/mockProductRepository.go#L1-L28

#### 9 - Create service/createProduct_test.go (create a unit test for the service)

```tree
Expand Down

0 comments on commit eb79cca

Please sign in to comment.