This repository has been archived by the owner on Dec 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.go
121 lines (109 loc) · 2.36 KB
/
types.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
types.go
file that holds all types/structures declared in slaj
*/
package main
// Variable declarations for users.
type user struct {
ID int
Username string
Nickname string
Avatar string
Email string
Password string
IP string
Level int
Role int
Online bool
LastSeen string
Color string
YeahNotifications bool
}
// Variable declarations for profiles.
type profile struct {
User int
CreatedAt string
NNID string
Gender int
Region string
Comment string
NNIDVisibility int
YeahVisibility int
ReplyVisibility int
FollowingCount int
FollowerCount int
PostCount int
CommentCount int
YeahCount int
}
// Variable declarations for posts.
type post struct {
ID int
CreatedBy int
CreatedAt string
Body string
Image string
URL string
IsSpoiler bool
IsRm bool
IsRmByAdmin bool
PosterUsername string
PosterNickname string
PosterIcon string
PosterOnline bool
CommunityID int
CommunityName string
CommunityIcon string
Yeahed bool
YeahCount int
CommentCount int
CommentPreview comment
}
// Variable declarations for comments.
type comment struct {
ID int
CreatedBy int
PostID int
CreatedAt string
Body string
Image string
URL string
IsSpoiler bool
IsRm bool
IsRmByAdmin bool
CommenterUsername string
CommenterNickname string
CommenterIcon string
CommenterOnline bool
Yeahed bool
YeahCount int
}
type yeah struct {
ID int
Username string
Avatar string
}
// Variable declarations for communities.
type community struct {
ID int
Title string
Description string
Icon string
Banner string
IsFeatured bool
DeveloperOnly bool
StaffOnly bool
IsRm bool
}
// Variable declarations for websocket sessions.
type wsSession struct {
Connected bool
UserID string
OnPage string
}
// Variable declarations for websocket messages.
type wsMessage struct {
Type string `json:"type"`
ID string `json:"id"`
Content string `json:"content"`
}