We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a506c12 commit 17946acCopy full SHA for 17946ac
types/types.go
@@ -0,0 +1,23 @@
1
+package types
2
+
3
+type User struct {
4
+ ID int `json: "id"`
5
+ FirstName string `json: "firstName"`
6
+ LastName string `json: "lastName"`
7
+ Email string `json: "email"`
8
+ Password string `json: "password"`
9
+ CreatedAt string `json: "createdAt"`
10
+}
11
12
+type UserStore interface {
13
+ FindByEmail(email string) (*User, error)
14
+ FindById(id int) (*User, error)
15
+ Create(User) error
16
17
18
+type RegisterUserPayload struct {
19
+ FirstName string `json: "firstName" validate: "required"`
20
+ LastName string `json: "lastName" validate: "required"`
21
+ Email string `json: "email" validate: "required"`
22
+ Password string `json: "password" validate: "required,min=3,max=130"`
23
0 commit comments