-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
42 lines (35 loc) · 1.02 KB
/
models.go
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
33
34
35
36
37
38
39
40
41
42
package main
import "go.mongodb.org/mongo-driver/mongo"
type GoogleUserCredentials struct {
Sub string `json:"sub"`
Name string `json:"name"`
GivenName string `json:"given_name"`
FamilyName string `json:"family_name"`
Picture string `json:"picture"`
Email string `json:"email"`
EmailVerified bool `json:"email_verified"`
}
type User struct {
ID string `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
Picture string `json:"picture"`
Token string `json:"token"`
RefreshToken string `json:"refreshToken"`
}
type RegisterReturn struct {
Status string `json:"status"`
Token string `json:"token"`
RefreshToken string `json:"refreshToken"`
}
type RegisterUser struct {
RegisterType string `json:"registerType"`
AccessToken string `json:"accessToken"`
}
type SimpleResponse struct {
Message string `json:"message"`
}
// App struct to encapsulate application state
type App struct {
Collection *mongo.Collection
}