@@ -2,15 +2,14 @@ package resources
2
2
3
3
import (
4
4
"context"
5
- "github.com/ekristen/libnuke/pkg/types"
6
-
7
5
"fmt"
8
6
9
7
"github.com/aws/aws-sdk-go/aws"
10
8
"github.com/aws/aws-sdk-go/service/cloudwatchevents"
11
9
12
10
"github.com/ekristen/libnuke/pkg/registry"
13
11
"github.com/ekristen/libnuke/pkg/resource"
12
+ "github.com/ekristen/libnuke/pkg/types"
14
13
15
14
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
16
15
)
@@ -75,25 +74,25 @@ type CloudWatchEventsTarget struct {
75
74
busName * string
76
75
}
77
76
78
- func (target * CloudWatchEventsTarget ) Remove (_ context.Context ) error {
79
- ids := []* string {target .targetID }
80
- _ , err := target .svc .RemoveTargets (& cloudwatchevents.RemoveTargetsInput {
77
+ func (r * CloudWatchEventsTarget ) Remove (_ context.Context ) error {
78
+ ids := []* string {r .targetID }
79
+ _ , err := r .svc .RemoveTargets (& cloudwatchevents.RemoveTargetsInput {
81
80
Ids : ids ,
82
- Rule : target .ruleName ,
83
- EventBusName : target .busName ,
81
+ Rule : r .ruleName ,
82
+ EventBusName : r .busName ,
84
83
Force : aws .Bool (true ),
85
84
})
86
85
return err
87
86
}
88
87
89
- func (target * CloudWatchEventsTarget ) String () string {
88
+ func (r * CloudWatchEventsTarget ) String () string {
90
89
// TODO: change this to IAM format rule -> target and mark as breaking change for filters
91
- return fmt .Sprintf ("Rule: %s Target ID: %s" , * target .ruleName , * target .targetID )
90
+ return fmt .Sprintf ("Rule: %s Target ID: %s" , * r .ruleName , * r .targetID )
92
91
}
93
92
94
- func (target * CloudWatchEventsTarget ) Properties () types.Properties {
93
+ func (r * CloudWatchEventsTarget ) Properties () types.Properties {
95
94
return types .NewProperties ().
96
- Set ("Name" , target .ruleName ).
97
- Set ("TargetID" , target .targetID ).
98
- Set ("BusName" , target .busName )
95
+ Set ("Name" , r .ruleName ).
96
+ Set ("TargetID" , r .targetID ).
97
+ Set ("BusName" , r .busName )
99
98
}
0 commit comments