-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
100 lines (89 loc) · 2.78 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
package devgorant
type RantModel struct {
Id int `json:"id"`
Text string `json:"text"`
Upvotes int `json:"num_upvotes"`
Downvotes int `json:"num_downvotes"`
Score int `json:"score"`
CreatedTime int `json:"created_time"`
AttachedImage ImageModel `json:"attached_image"`
NumComments int `json:"num_comments"`
Tags []string `json:"tags"`
UserId int `json:"user_id"`
UserUsername string `json:"user_username"`
UserScore int `json:"user_score"`
}
type UserModel struct {
Username string `json:"username"`
Score int `json:"score"`
About string `json:"about"`
Location string `json:"location"`
CreatedTime int `json:"created_time"`
Skills string `json:"skills"`
Github string `json:"github"`
Content struct {
Content ContentModel `json:"content"`
} `json:"content"`
}
type ImageModel struct {
Url string `json:"url"`
Width int `json:"width"`
Height int `json:"height"`
}
type CommentModel struct {
Id int `json:"id"`
RantId int `json:"rant_id"`
Body string `json:"body"`
Upvotes int `json:"num_upvotes"`
Downvotes int `json:"num_downvotes"`
Score int `json:"score"`
CreatedTime int `json:"created_time"`
UserId int `json:"user_id"`
UserUsername string `json:"user_username"`
UserScore int `json:"user_score"`
}
type ContentModel struct {
Rants []RantModel `json:"rants"`
Upvoted []RantModel `json:"upvoted"`
Comments []CommentModel `json:"comments"`
Favorites []RantModel `json:"favorites"`
}
type NewsModel struct {
Id int `json:"id"`
Type string `json:"type"`
Headline string `json:"headline"`
Body string `json:"body"`
Footer string `json:"footer"`
Height int `json:"height"`
Action string `json:"action"`
}
type RantsResponse struct {
Success bool `json:"success"`
Error string `json:"error"`
Rants []RantModel `json:"rants"`
Settings string `json:"settings"`
Set string `json:"set"`
Wrw int `json:"wrw"`
News NewsModel `json:"news"`
}
type RantResponse struct {
Success bool `json:"success"`
Error string `json:"error"`
Rant RantModel `json:"rant"`
Comments []CommentModel `json:"comments"`
}
type UserResponse struct {
Success bool `json:"success"`
Error string `json:"error"`
Profile UserModel `json:"profile"`
}
type SearchResponse struct {
Success bool `json:"success"`
Error string `json:"error"`
Rants []RantModel `json:"results"`
}
type GetUserIdResponse struct {
Success bool `json:"success"`
Error string `json:"error"`
UserId int `json:"user_id"`
}