Skip to content

Commit 6de51c6

Browse files
committed
revert: remove unused code and fix misleading parameter naming
1 parent aa1ddc5 commit 6de51c6

File tree

11 files changed

+11
-50
lines changed

11 files changed

+11
-50
lines changed

pkg/providers/alibaba/alibaba.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ func (p *Provider) BucketDump(ctx context.Context, action, bucketName string) {
171171
}
172172
}
173173

174-
func (p *Provider) EventDump(action, sourceIP string) {
174+
func (p *Provider) EventDump(action, args string) {
175175
d := _sas.Driver{Cred: p.cred}
176176
switch action {
177177
case "dump":
@@ -192,7 +192,7 @@ func (p *Provider) EventDump(action, sourceIP string) {
192192
logger.Info(msg)
193193
}
194194
case "whitelist":
195-
d.HandleEvents(sourceIP) // sourceIP here means SecurityEventIds
195+
d.HandleEvents(args) // args means SecurityEventIds
196196
default:
197197
logger.Error("Please set metadata like \"dump all\"")
198198
}

pkg/providers/aws/aws.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (p *Provider) BucketDump(ctx context.Context, action, bucketName string) {
151151
}
152152
}
153153

154-
func (p *Provider) EventDump(action, sourceIP string) {}
154+
func (p *Provider) EventDump(action, args string) {}
155155

156156
func (p *Provider) ExecuteCloudVMCommand(instanceID, cmd string) {}
157157

pkg/providers/azure/azure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (p *Provider) BucketDump(ctx context.Context, action, bucketName string) {
112112
logger.Error("Not supported yet.")
113113
}
114114

115-
func (p *Provider) EventDump(action, sourceIP string) {}
115+
func (p *Provider) EventDump(action, args string) {}
116116

117117
func (p *Provider) ExecuteCloudVMCommand(instanceID, cmd string) {}
118118

pkg/providers/gcp/gcp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func (p *Provider) BucketDump(ctx context.Context, action, bucketName string) {
9696
logger.Error("Not supported yet.")
9797
}
9898

99-
func (p *Provider) EventDump(action, sourceIP string) {}
99+
func (p *Provider) EventDump(action, args string) {}
100100

101101
func (p *Provider) ExecuteCloudVMCommand(instanceID, cmd string) {}
102102

pkg/providers/huawei/huawei.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (p *Provider) BucketDump(ctx context.Context, action, bucketName string) {
153153
logger.Error("Not supported yet.")
154154
}
155155

156-
func (p *Provider) EventDump(action, sourceIP string) {}
156+
func (p *Provider) EventDump(action, args string) {}
157157

158158
func (p *Provider) ExecuteCloudVMCommand(instanceID, cmd string) {}
159159

pkg/providers/jdcloud/jdcloud.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (p *Provider) UserManagement(action, username, password string) {}
8686

8787
func (p *Provider) BucketDump(ctx context.Context, action, bucketName string) {}
8888

89-
func (p *Provider) EventDump(action, sourceIP string) {}
89+
func (p *Provider) EventDump(action, args string) {}
9090

9191
func (p *Provider) ExecuteCloudVMCommand(instanceID, cmd string) {}
9292

pkg/providers/tencent/tencent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func (p *Provider) BucketDump(ctx context.Context, action, bucketName string) {
145145
logger.Info("Recommended use https://cosbrowser.cloud.tencent.com/web")
146146
}
147147

148-
func (p *Provider) EventDump(action, sourceIP string) {}
148+
func (p *Provider) EventDump(action, args string) {}
149149

150150
func (p *Provider) ExecuteCloudVMCommand(instanceID, cmd string) {
151151
var region, ostype string

pkg/providers/volcengine/volcengine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (p *Provider) UserManagement(action, username, password string) {}
108108

109109
func (p *Provider) BucketDump(ctx context.Context, action, bucketName string) {}
110110

111-
func (p *Provider) EventDump(action, sourceIP string) {}
111+
func (p *Provider) EventDump(action, args string) {}
112112

113113
func (p *Provider) ExecuteCloudVMCommand(instanceID, cmd string) {}
114114

pkg/schema/errors.go

Lines changed: 0 additions & 39 deletions
This file was deleted.

pkg/schema/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type Provider interface {
1616
Resources(ctx context.Context) (Resources, error)
1717
UserManagement(action, username, password string)
1818
BucketDump(ctx context.Context, action, bucketName string)
19-
EventDump(action, sourceIP string)
19+
EventDump(action, args string)
2020
ExecuteCloudVMCommand(instanceID, cmd string)
2121
DBManagement(action, instanceID string)
2222
}

0 commit comments

Comments
 (0)