-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTODO
32 lines (22 loc) · 943 Bytes
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Add DTO
Implement a validation for every TDO
new standard testing with benchmark
use pgx instead of gorm
use one query always (detect not found errors and already exist error by searching string example(strings.contain(err,"now rows")))
use this approach instead of using dependency injection packages
var (
UserService userServiceInterface = &userService{}
)
type userService struct {
}
type userServiceInterface interface {
CreateUser(users.User) (*users.User, *error2.RestErr)
GetUser(int64) (*users.User, *error2.RestErr)
UpdateUser(*users.User, bool) (*users.User, *error2.RestErr)
DeleteUser(int64) *error2.RestErr
FindByStatus(string) (users.Users, *error2.RestErr)
}
do not create seperate directory and packages for interfaces create interface alongside the original struct
powerfull zapper customized logger base on bookstore logger
ddd and test base on this video
https://www.youtube.com/watch?v=6zuJXIbOyhs