-
Notifications
You must be signed in to change notification settings - Fork 12
/
alert.go
72 lines (57 loc) · 1.57 KB
/
alert.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
// This file is part of gobizfly
package gobizfly
var _ CloudWatcherService = (*cloudwatcherService)(nil)
type cloudwatcherService struct {
client *Client
}
// CloudWatcherService is the interface wrap other resource's interfaces
type CloudWatcherService interface {
Agents() *agents
Alarms() *alarms
Histories() *histories
Receivers() *receivers
Secrets() *secrets
}
// Agents is the interface wrap cloudwatcher agents interface
func (cws *cloudwatcherService) Agents() *agents {
return &agents{client: cws.client}
}
// Alarms is the interface wrap cloudwatcher alarms interface
func (cws *cloudwatcherService) Alarms() *alarms {
return &alarms{client: cws.client}
}
// Receivers is the interface wrap cloudwatcher receivers interface
func (cws *cloudwatcherService) Receivers() *receivers {
return &receivers{client: cws.client}
}
// Histories is the interface wrap cloudwatcher histories interface
func (cws *cloudwatcherService) Histories() *histories {
return &histories{client: cws.client}
}
// Secrets is the interface wrap cloudwatcher secrets interface
func (cws *cloudwatcherService) Secrets() *secrets {
return &secrets{client: cws.client}
}
const (
agentsResourcePath = "/agents"
alarmsResourcePath = "/alarms"
getVerificationPath = "/resend"
historiesResourcePath = "/histories"
receiversResourcePath = "/receivers"
secretsResourcePath = "/secrets"
)
type agents struct {
client *Client
}
type alarms struct {
client *Client
}
type receivers struct {
client *Client
}
type histories struct {
client *Client
}
type secrets struct {
client *Client
}