@@ -93,6 +93,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263
93
93
94
94
#### 2 - Create infrastructure/productRepository.go (DB query)
95
95
96
+ https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/infrastructure/productRepository.go#L1-L61
97
+
96
98
``` tree
97
99
├───internal
98
100
│ ├───product
@@ -102,6 +104,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263
102
104
103
105
#### 3 - Create port.go (dp injection for the service)
104
106
107
+ https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/port.go#L1-L7
108
+
105
109
#### 4 - Create service/createProduct.go (create a new product use case implementation)
106
110
107
111
``` tree
@@ -112,6 +116,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263
112
116
│ │ service.go
113
117
```
114
118
119
+ https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/service/createProduct.go#L1-L51
120
+
115
121
#### 5 - Create service/service.go (dependency injection service using uber dig)
116
122
117
123
``` tree
@@ -122,6 +128,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263
122
128
│ │ service.go
123
129
```
124
130
131
+ https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/service/service.go#L1-L42
132
+
125
133
#### 6 - Create handler/createProduct.go (create a new hanlder presenter to call the use case)
126
134
127
135
``` tree
@@ -132,6 +140,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263
132
140
│ │ │ handler.go
133
141
```
134
142
143
+ https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/handler/createProduct.go#L1-L60
144
+
135
145
#### 7 - Create handler/handler.go (handles all the routes for all the presenters)
136
146
137
147
``` tree
@@ -142,6 +152,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263
142
152
│ │ │ handler.go
143
153
```
144
154
155
+ https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/handler/handler.go#L1-L11
156
+
145
157
#### 8 - Create mock/mockProductRepository.go (mocks the user repository implementation for unit testing)
146
158
147
159
``` tree
@@ -151,6 +163,8 @@ https://github.com/sebajax/go-vertical-slice-architecture/blob/d4501917930ef2263
151
163
│ │ │ mockProductRepository.go
152
164
```
153
165
166
+ https://github.com/sebajax/go-vertical-slice-architecture/blob/872df7def565c7e0a95216b0b93d8166c3912ef5/internal/product/mock/mockProductRepository.go#L1-L28
167
+
154
168
#### 9 - Create service/createProduct_test.go (create a unit test for the service)
155
169
156
170
``` tree
0 commit comments