@@ -153,7 +153,7 @@ func getListBucketEventsResponse(session *models.Principal, params user_api.List
153153// If notificationEvents is empty, by default will set [get, put, delete], else the provided
154154// ones will be set.
155155// 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 {
157157 var events []string
158158 if len (notificationEvents ) == 0 {
159159 // default event values are [get, put, delete]
@@ -187,8 +187,8 @@ func getCreateBucketEventsResponse(session *models.Principal, bucketName string,
187187 }
188188 // create a mc S3Client interface implementation
189189 // 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 )
192192 if err != nil {
193193 log .Println ("error creating bucket event:" , err )
194194 return err
@@ -197,7 +197,7 @@ func getCreateBucketEventsResponse(session *models.Principal, bucketName string,
197197}
198198
199199// 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 {
201201 eventSingleString := joinNotificationEvents (events )
202202 perr := client .removeNotificationConfig (ctx , arn , eventSingleString , * prefix , * suffix )
203203 if perr != nil {
@@ -224,8 +224,8 @@ func getDeleteBucketEventsResponse(session *models.Principal, bucketName string,
224224 }
225225 // create a mc S3Client interface implementation
226226 // 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 )
229229 if err != nil {
230230 log .Println ("error deleting bucket event:" , err )
231231 return err
0 commit comments