forked from hyperworks/go-getstream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstructs.go
96 lines (80 loc) · 2.42 KB
/
structs.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
package getstream
import (
"time"
)
type Activity struct {
ID string `json:"id,omitempty"`
Actor Slug `json:"actor"`
Verb string `json:"verb"`
Object Slug `json:"object"`
Target *Slug `json:"target,omitempty"`
RawTime string `json:"time,omitempty"`
To []Slug `json:"to,omitempty"`
ForeignID string `json:"foreign_id,omitempty"`
//bonus fields
ActorData ActorData `json:"actor_data,omitempty"`
ObjectData ObjectData `json:"object_data"`
TargetData TargetData `json:"target_data,omitempty"`
NotificationData NotificationData `json:"notification_data,omitempty"`
}
type Follow struct {
Target string `json:"target"`
ActivityCopyResult int `json:"activity_copy_limit,omitempty"`
}
type ObjectData struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
Text string `json:"text,omitempty"`
PictureURL string `json:"picture_url,omitempty"`
}
type TargetData struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
Location Location `json:"location,omitempty"`
}
type Location struct {
Name string `json:"name,omitempty"`
Longitude string `json:"long,omitempty"`
Latitude string `json:"lat,omitempty"`
}
type ActorData struct {
Name string `json:"name,omitempty"`
Nickname string `json:"nickname,omitempty"`
ID string `json:"id"`
}
type NotificationData struct {
AccountID string
GeneratorID string
}
type ActivitiesResult struct {
Next string `json:"next,omitempty"`
RawDuration string `json:"duration,omitempty"`
Results []*Activity `json:"results,omitempty"`
}
type FollowersResult struct {
Next string `json:"next,omitempty"`
RawDuration string `json:"duration,omitempty"`
Results []*Feed `json:"results,omitempty"`
}
type Options struct {
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
IdGTE string `json:"id_gte,omitempty"`
IdGT string `json:"id_gt,omitempty"`
IdLTE string `json:"id_lte,omitempty"`
IdLT string `json:"id_lt,omitempty"`
Feeds []*Feed `json:"feeds,omitempty"`
MarkRead bool `json:"mark_read,omitempty"`
MarkSeen bool `json:"mark_seen,omitempty"`
}
type Notification struct {
Data *Update `json"data"`
Channel string `json:"channel"`
}
type Update struct {
Deletes []*Activity
Inserts []*Activity
UnreadCount int
UnseenCount int
PublishedAt time.Time
}