@@ -153,7 +153,7 @@ func getListBucketEventsResponse(session *models.Principal, params user_api.List
153
153
// If notificationEvents is empty, by default will set [get, put, delete], else the provided
154
154
// ones will be set.
155
155
// this function follows same behavior as minio/mc for adding a bucket event
156
- func createBucketEvent (ctx context.Context , client MCS3Client , arn string , notificationEvents []models.NotificationEventType , prefix , suffix string , ignoreExisting bool ) error {
156
+ func createBucketEvent (ctx context.Context , client MCClient , arn string , notificationEvents []models.NotificationEventType , prefix , suffix string , ignoreExisting bool ) error {
157
157
var events []string
158
158
if len (notificationEvents ) == 0 {
159
159
// default event values are [get, put, delete]
@@ -187,8 +187,8 @@ func getCreateBucketEventsResponse(session *models.Principal, bucketName string,
187
187
}
188
188
// create a mc S3Client interface implementation
189
189
// defining the client to be used
190
- mcS3Client := mcS3Client {client : s3Client }
191
- err = createBucketEvent (ctx , mcS3Client , * eventReq .Configuration .Arn , eventReq .Configuration .Events , eventReq .Configuration .Prefix , eventReq .Configuration .Suffix , eventReq .IgnoreExisting )
190
+ mcClient := mcClient {client : s3Client }
191
+ err = createBucketEvent (ctx , mcClient , * eventReq .Configuration .Arn , eventReq .Configuration .Events , eventReq .Configuration .Prefix , eventReq .Configuration .Suffix , eventReq .IgnoreExisting )
192
192
if err != nil {
193
193
log .Println ("error creating bucket event:" , err )
194
194
return err
@@ -197,7 +197,7 @@ func getCreateBucketEventsResponse(session *models.Principal, bucketName string,
197
197
}
198
198
199
199
// deleteBucketEventNotification calls S3Client.RemoveNotificationConfig to remove a bucket event notification
200
- func deleteBucketEventNotification (ctx context.Context , client MCS3Client , arn string , events []models.NotificationEventType , prefix , suffix * string ) error {
200
+ func deleteBucketEventNotification (ctx context.Context , client MCClient , arn string , events []models.NotificationEventType , prefix , suffix * string ) error {
201
201
eventSingleString := joinNotificationEvents (events )
202
202
perr := client .removeNotificationConfig (ctx , arn , eventSingleString , * prefix , * suffix )
203
203
if perr != nil {
@@ -224,8 +224,8 @@ func getDeleteBucketEventsResponse(session *models.Principal, bucketName string,
224
224
}
225
225
// create a mc S3Client interface implementation
226
226
// defining the client to be used
227
- mcS3Client := mcS3Client {client : s3Client }
228
- err = deleteBucketEventNotification (ctx , mcS3Client , arn , events , prefix , suffix )
227
+ mcClient := mcClient {client : s3Client }
228
+ err = deleteBucketEventNotification (ctx , mcClient , arn , events , prefix , suffix )
229
229
if err != nil {
230
230
log .Println ("error deleting bucket event:" , err )
231
231
return err
0 commit comments