-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcloudwatchmock.go
36 lines (33 loc) · 1.22 KB
/
cloudwatchmock.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
package main
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/cloudwatch"
)
type cloudwatchMock struct{}
// DescribeAlarms implements the AlarmDescriber interface
func (c *cloudwatchMock) DescribeAlarms(*cloudwatch.DescribeAlarmsInput) (*cloudwatch.DescribeAlarmsOutput, error) {
return &cloudwatch.DescribeAlarmsOutput{
MetricAlarms: []*cloudwatch.MetricAlarm{
{
AlarmArn: aws.String("arn:cloudwatch:foo"),
AlarmName: aws.String("test1"),
AlarmDescription: aws.String("test description one"),
Threshold: aws.Float64(3),
StateReason: aws.String("Foo is to much"),
StateValue: aws.String(cloudwatch.StateValueOk),
MetricName: aws.String("CloudWatchMetricName"),
Namespace: aws.String("ASG"),
},
{
AlarmArn: aws.String("arn:cloudwatch:foo2"),
AlarmName: aws.String("test2"),
AlarmDescription: aws.String("test description two"),
Threshold: aws.Float64(10.3),
StateReason: aws.String("Foo2 is to much"),
StateValue: aws.String(cloudwatch.StateValueAlarm),
MetricName: aws.String("CloudWatchMetricName2"),
Namespace: aws.String("ASG"),
},
},
}, nil
}