-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.go
44 lines (36 loc) · 1 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
package main
type Config struct {
Subscriptions []Subscription `json:"subscriptions"`
Notifications Notifications `json:"notifications"`
}
type Filter string
type Notifications struct {
Slack SlackConfig `json:"slack,omitempty"`
Line LineConfig `json:"line,omitempty"`
}
type SlackConfig struct {
Token string `json:"token"`
Channel string `json:"channel"`
UserName string `json:"userName"`
}
type LineConfig struct {
ChannelSecret string `json:"channelSecret"`
ChannelAccessToken string `json:"channelAccessToken"`
ToUserId string `json:"toUserId"`
}
type Subscription struct {
Name string `json:"name"`
FeedUrl string `json:"feedUrl"`
RefreshTime int64 `json:"refreshTime"`
Filters []Filter `json:"filters"`
NotifyMethods []string `json:"notifyMethods"`
}
type NotificationMessage struct {
Subscription Subscription
Items []NotificationMessageItem
Body string
}
type NotificationMessageItem struct {
Href string
Title string
}