From d29f93814e3b50889f2af35ac342a683b8564524 Mon Sep 17 00:00:00 2001 From: Funmi4194 Date: Fri, 7 Jun 2024 13:59:31 +0100 Subject: [PATCH 01/10] Feat: added feature to delete an object from multiple buckets on google cloud storage --- bifrost.go | 39 +++++++++++++++++++++++++++++++++++++++ shared/types/config.go | 4 ++++ 2 files changed, 43 insertions(+) diff --git a/bifrost.go b/bifrost.go index cf87b1d..b19c220 100644 --- a/bifrost.go +++ b/bifrost.go @@ -271,3 +271,42 @@ func newWasabiCloudStorage(bc *BridgeConfig) (RainbowBridge, error) { UseAsync: bc.UseAsync, }, nil } + +// DeleteGCSobject deletes an object from one or more buckets +func DeleteGCSobject(bc *BridgeConfig) error { + + var client *storage.Client + var err error + if bc.CredentialsFile != "" { + // first attempt to authenticate with credentials file + client, err = storage.NewClient(context.Background(), option.WithCredentialsFile(bc.CredentialsFile)) + if err != nil { + return &errors.BifrostError{ + Err: err, + ErrorCode: errors.ErrUnauthorized, + } + } + } else { + // if no credentials file is specified, attempt to authenticate without credentials file + client, err = storage.NewClient(context.Background()) + if err != nil { + return &errors.BifrostError{ + Err: err, + ErrorCode: errors.ErrUnauthorized, + } + } + } + + for _, bucketName := range bc.Buckets { + bucket := client.Bucket(bucketName) + obj := bucket.Object(bc.Object) + + if err := obj.Delete(context.Background()); err != nil { + return &errors.BifrostError{ + Err: err, + ErrorCode: errors.ErrUnauthorized, + } + } + } + return nil +} diff --git a/shared/types/config.go b/shared/types/config.go index 70df356..db986b3 100644 --- a/shared/types/config.go +++ b/shared/types/config.go @@ -32,4 +32,8 @@ type BridgeConfig struct { UseAsync bool // PinataJWT is the JWT generated for your Pinata cloud account PinataJWT string + // Buckets specifics the list of bucket names to interact with + Buckets []string + // Object specifics an object name in a bucket to interact with + Object string } From 8343976e5c2341e22bad5414f39d53129c8e7a35 Mon Sep 17 00:00:00 2001 From: funmi4194 Date: Wed, 10 Jul 2024 18:12:10 +0100 Subject: [PATCH 02/10] refactor: refactored the delete function to support the Rainbowbridge interface --- .DS_Store | Bin 0 -> 6148 bytes bifrost.go | 41 ++--------------------------------------- gcs/gcs.go | 21 +++++++++++++++++++++ gcs/struct.go | 4 ++++ pinata/pinata.go | 9 +++++++++ s3/s3.go | 9 +++++++++ shared/.DS_Store | Bin 0 -> 6148 bytes struct.go | 6 ++++++ wasabi/wasabi.go | 9 +++++++++ 9 files changed, 60 insertions(+), 39 deletions(-) create mode 100644 .DS_Store create mode 100644 shared/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..4f749c32437daacc571951136fc0bf7b3cc94607 GIT binary patch literal 6148 zcmeHKF)su`6#j;FE+nEu-h7vxxdEWoPiqUnB!DuTU^K>VfQesP&W7yBG*QVMhX)H= zd#z?W7a0bE0zrYlsDOOC5$17#22Q;1H+nyJea%*yRu5ZMj+N(LFK-(&4{N@^_N~8N zclL(TCQ~ume2fjhN;3HI({7~cge2D z<)66d@!LF?H}CcNDx4H0w5j?Lc5#ATpLO}Z-|updT=lrUIot}0Vg}SPgbo&c{*@Q< z>v5NN=dQkI)2-DW{Z`_4Te4_5EKXs^c0Z&A!ZXy zEM^Av*1=9+0f-TYweeZ*5|R^JOe|&w>7gl;N;Ij;UNMwO=Xh-65{sEZlMZDsAIdT- zdqYv0o%6>!94avw`k+8iz*k_{yiUsbzfpYu_mjd~P#`GquM|*Gx|ObTN%m~bEl$qb tn61JlCUKcTox;u@$NE8z;wd(5^u_W(Oe|&wIYJA61hfpH3kv+G0-sJv*V+I8 literal 0 HcmV?d00001 diff --git a/bifrost.go b/bifrost.go index b19c220..26ebfbf 100644 --- a/bifrost.go +++ b/bifrost.go @@ -167,6 +167,8 @@ func newGoogleCloudStorage(bc *BridgeConfig) (RainbowBridge, error) { EnableDebug: bc.EnableDebug, PublicRead: bc.PublicRead, UseAsync: bc.UseAsync, + Object: bc.Object, + Buckets: bc.Buckets, }, nil } @@ -271,42 +273,3 @@ func newWasabiCloudStorage(bc *BridgeConfig) (RainbowBridge, error) { UseAsync: bc.UseAsync, }, nil } - -// DeleteGCSobject deletes an object from one or more buckets -func DeleteGCSobject(bc *BridgeConfig) error { - - var client *storage.Client - var err error - if bc.CredentialsFile != "" { - // first attempt to authenticate with credentials file - client, err = storage.NewClient(context.Background(), option.WithCredentialsFile(bc.CredentialsFile)) - if err != nil { - return &errors.BifrostError{ - Err: err, - ErrorCode: errors.ErrUnauthorized, - } - } - } else { - // if no credentials file is specified, attempt to authenticate without credentials file - client, err = storage.NewClient(context.Background()) - if err != nil { - return &errors.BifrostError{ - Err: err, - ErrorCode: errors.ErrUnauthorized, - } - } - } - - for _, bucketName := range bc.Buckets { - bucket := client.Bucket(bucketName) - obj := bucket.Object(bc.Object) - - if err := obj.Delete(context.Background()); err != nil { - return &errors.BifrostError{ - Err: err, - ErrorCode: errors.ErrUnauthorized, - } - } - } - return nil -} diff --git a/gcs/gcs.go b/gcs/gcs.go index dd55fde..b118b79 100644 --- a/gcs/gcs.go +++ b/gcs/gcs.go @@ -266,3 +266,24 @@ Note: for some providers, UploadFolder requires that a default bucket be set in func (g *GoogleCloudStorage) UploadFolder(foldFace interface{}) ([]*types.UploadedFile, error) { return nil, nil } + +/* +DeleteObject deletes an object from an array of buckets in the provider's storage and returns an error if one occurs. + +Note: DeleteObject requires that an object and an array of buckets to be set in bifrost.BridgeConfig. +*/ +func (g *GoogleCloudStorage) DeleteObject() error { + + for _, bucketName := range g.Buckets { + bucket := g.Client.Bucket(bucketName) + obj := bucket.Object(g.Object) + + if err := obj.Delete(context.Background()); err != nil { + return &errors.BifrostError{ + Err: err, + ErrorCode: errors.ErrUnauthorized, + } + } + } + return nil +} diff --git a/gcs/struct.go b/gcs/struct.go index f4dc1bd..425a998 100644 --- a/gcs/struct.go +++ b/gcs/struct.go @@ -25,4 +25,8 @@ type GoogleCloudStorage struct { PublicRead bool // UseAsync enables asynchronous operations with go routines. UseAsync bool + // Buckets specifics the list of bucket names to interact with + Buckets []string + // Object specifics an object name in a bucket to interact with + Object string } diff --git a/pinata/pinata.go b/pinata/pinata.go index b110224..3f1cc91 100644 --- a/pinata/pinata.go +++ b/pinata/pinata.go @@ -279,3 +279,12 @@ func (p *PinataCloud) UploadMultiFile(multiFace interface{}) ([]*types.UploadedF return uploadedFiles, nil } + +/* +DeleteObject deletes an object from an array of buckets in the provider's storage and returns an error if one occurs. + +Note: DeleteObject requires that an object and an array of buckets to be set in bifrost.BridgeConfig. +*/ +func (p *PinataCloud) DeleteObject() error { + return nil +} diff --git a/s3/s3.go b/s3/s3.go index 7c45a59..e7bdcbc 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -242,3 +242,12 @@ Note: for some providers, UploadFolder requires that a default bucket be set in func (s *SimpleStorageService) UploadFolder(foldFace interface{}) ([]*types.UploadedFile, error) { return nil, nil } + +/* +DeleteObject deletes an object from an array of buckets in the provider's storage and returns an error if one occurs. + +Note: DeleteObject requires that an object and an array of buckets to be set in bifrost.BridgeConfig. +*/ +func (s *SimpleStorageService) DeleteObject() error { + return nil +} diff --git a/shared/.DS_Store b/shared/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..40597c8fa734da03d2c3ef850a6e29024e73ccfd GIT binary patch literal 6148 zcmeHK%}xR_5S}Us5f8)|^`x8l0`dlxtalS$K=~0#SQiBjT+F_N7w=wu3~%Ba81FuU z7r$vMwk*Vx#+Vt>`F1-q?YG}%TS`Q#K5o~Dszg*qV=S!0EijIA%h`(S*#asvMvuDv zZmrQulR++9Iz$0c;IApb-|iZQFX8z+bVXzMA&o)~rT2V>&tqFXf4-BsaeOYzvqCx*;1e_RqlwPY&rTPm!} Date: Tue, 13 Aug 2024 22:24:27 +0100 Subject: [PATCH 03/10] refactor: refactored the delete file functionality --- bifrost.go | 2 -- gcs/gcs.go | 47 +++++++++++++++++++++++++++++++++++++------- gcs/struct.go | 4 ---- pinata/pinata.go | 6 +++--- s3/s3.go | 6 +++--- shared/types/file.go | 12 +++++++++++ struct.go | 6 +++--- wasabi/wasabi.go | 6 +++--- 8 files changed, 64 insertions(+), 25 deletions(-) diff --git a/bifrost.go b/bifrost.go index 26ebfbf..cf87b1d 100644 --- a/bifrost.go +++ b/bifrost.go @@ -167,8 +167,6 @@ func newGoogleCloudStorage(bc *BridgeConfig) (RainbowBridge, error) { EnableDebug: bc.EnableDebug, PublicRead: bc.PublicRead, UseAsync: bc.UseAsync, - Object: bc.Object, - Buckets: bc.Buckets, }, nil } diff --git a/gcs/gcs.go b/gcs/gcs.go index b118b79..c1fcbdc 100644 --- a/gcs/gcs.go +++ b/gcs/gcs.go @@ -268,17 +268,50 @@ func (g *GoogleCloudStorage) UploadFolder(foldFace interface{}) ([]*types.Upload } /* -DeleteObject deletes an object from an array of buckets in the provider's storage and returns an error if one occurs. +DeleteFile deletes a file from a bucket on Google Cloud Storage and returns an error if one occurs. -Note: DeleteObject requires that an object and an array of buckets to be set in bifrost.BridgeConfig. +Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ -func (g *GoogleCloudStorage) DeleteObject() error { +func (g *GoogleCloudStorage) DeleteFile(fileFace interface{}) error { - for _, bucketName := range g.Buckets { - bucket := g.Client.Bucket(bucketName) - obj := bucket.Object(g.Object) + // assert that the fileFace is of type bifrost.File + bFile, ok := fileFace.(types.File) + if !ok { + return &errors.BifrostError{ + Err: fmt.Errorf("argument must be of type bifrost.File"), + ErrorCode: errors.ErrBadRequest, + } + } + + // validate struct + if err := bFile.Validate(); err != nil { + return &errors.BifrostError{ + Err: err, + ErrorCode: errors.ErrInvalidParameters, + } + } + + if !g.IsConnected() { + return &errors.BifrostError{ + Err: fmt.Errorf("no active Google Cloud Storage client"), + ErrorCode: errors.ErrClientError, + } + } + + // create context and add timeout if default timeout is set + var ctx context.Context + var cancel context.CancelFunc + ctx = context.Background() + if g.DefaultTimeout > 0 { + ctx, cancel = context.WithTimeout(ctx, time.Duration(g.DefaultTimeout)*time.Second) + defer cancel() + } + + if bFile.Filename != "" { + + obj := g.Client.Bucket(g.DefaultBucket).Object(bFile.Filename) - if err := obj.Delete(context.Background()); err != nil { + if err := obj.Delete(ctx); err != nil { return &errors.BifrostError{ Err: err, ErrorCode: errors.ErrUnauthorized, diff --git a/gcs/struct.go b/gcs/struct.go index 425a998..f4dc1bd 100644 --- a/gcs/struct.go +++ b/gcs/struct.go @@ -25,8 +25,4 @@ type GoogleCloudStorage struct { PublicRead bool // UseAsync enables asynchronous operations with go routines. UseAsync bool - // Buckets specifics the list of bucket names to interact with - Buckets []string - // Object specifics an object name in a bucket to interact with - Object string } diff --git a/pinata/pinata.go b/pinata/pinata.go index 3f1cc91..3df0fb5 100644 --- a/pinata/pinata.go +++ b/pinata/pinata.go @@ -281,10 +281,10 @@ func (p *PinataCloud) UploadMultiFile(multiFace interface{}) ([]*types.UploadedF } /* -DeleteObject deletes an object from an array of buckets in the provider's storage and returns an error if one occurs. +DeleteFile deletes a file from a bucket on Google Cloud Storage and returns an error if one occurs. -Note: DeleteObject requires that an object and an array of buckets to be set in bifrost.BridgeConfig. +Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ -func (p *PinataCloud) DeleteObject() error { +func (p *PinataCloud) DeleteFile(fileFace interface{}) error { return nil } diff --git a/s3/s3.go b/s3/s3.go index e7bdcbc..1736509 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -244,10 +244,10 @@ func (s *SimpleStorageService) UploadFolder(foldFace interface{}) ([]*types.Uplo } /* -DeleteObject deletes an object from an array of buckets in the provider's storage and returns an error if one occurs. +DeleteFile deletes a file from a bucket on Google Cloud Storage and returns an error if one occurs. -Note: DeleteObject requires that an object and an array of buckets to be set in bifrost.BridgeConfig. +Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ -func (s *SimpleStorageService) DeleteObject() error { +func (s *SimpleStorageService) DeleteFile(fileFace interface{}) error { return nil } diff --git a/shared/types/file.go b/shared/types/file.go index 6dad9f3..2be8ad3 100644 --- a/shared/types/file.go +++ b/shared/types/file.go @@ -109,3 +109,15 @@ func (f *File) Validate() error { } return nil } + +// DeleeFile is the struct for Deleting a single file. +type DeleteFile struct { + // Handle is the handle to the file. + Handle io.Reader + // Filename is the name stored with the provider. + Filename string `json:"filename"` + // Buckets is the name stored with the provider. + Buckets []string `json:"buckets"` + // Options is a map of options to store along with each file. + Options map[string]interface{} `json:"options"` +} diff --git a/struct.go b/struct.go index 85afbda..855d561 100644 --- a/struct.go +++ b/struct.go @@ -46,11 +46,11 @@ type RainbowBridge interface { */ UploadFolder(foldFace interface{}) ([]*types.UploadedFile, error) /* - DeleteObject deletes an object from an array of buckets in the provider's storage and returns an error if one occurs. + DeleteFile deletes a file from a bucket on Google Cloud Storage and returns an error if one occurs. - Note: DeleteObject requires that an object and an array of buckets to be set in bifrost.BridgeConfig. + Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ - DeleteObject() error + DeleteFile(fileFace interface{}) error } // BifrostError is the interface for errors returned by Bifrost. diff --git a/wasabi/wasabi.go b/wasabi/wasabi.go index c845cac..758dbe9 100644 --- a/wasabi/wasabi.go +++ b/wasabi/wasabi.go @@ -268,10 +268,10 @@ func (w *WasabiCloudStorage) UploadFolder(foldFace interface{}) ([]*types.Upload } /* -DeleteObject deletes an object from an array of buckets in the provider's storage and returns an error if one occurs. +DeleteFile deletes a file from a bucket on Google Cloud Storage and returns an error if one occurs. -Note: DeleteObject requires that an object and an array of buckets to be set in bifrost.BridgeConfig. +Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ -func (w *WasabiCloudStorage) DeleteObject() error { +func (w *WasabiCloudStorage) DeleteFile(fileFace interface{}) error { return nil } From 976ccb0606ea4c988a57b48ea8edddf41d53ccdc Mon Sep 17 00:00:00 2001 From: funmi4194 Date: Mon, 19 Aug 2024 13:55:24 +0100 Subject: [PATCH 04/10] refactor: changed comments on DeleteFile methods --- .gitignore | 3 ++- gcs/gcs.go | 2 +- pinata/pinata.go | 2 +- s3/s3.go | 2 +- struct.go | 4 ++-- wasabi/wasabi.go | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 0904773..5994669 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ cmd/ .env .env.* coverage.* -.vscode \ No newline at end of file +.vscode +.DS_Store \ No newline at end of file diff --git a/gcs/gcs.go b/gcs/gcs.go index c1fcbdc..d751b5b 100644 --- a/gcs/gcs.go +++ b/gcs/gcs.go @@ -268,7 +268,7 @@ func (g *GoogleCloudStorage) UploadFolder(foldFace interface{}) ([]*types.Upload } /* -DeleteFile deletes a file from a bucket on Google Cloud Storage and returns an error if one occurs. +DeleteFile deletes a file from Google Cloud Storage and returns an error if one occurs. Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ diff --git a/pinata/pinata.go b/pinata/pinata.go index 3df0fb5..9be9a28 100644 --- a/pinata/pinata.go +++ b/pinata/pinata.go @@ -281,7 +281,7 @@ func (p *PinataCloud) UploadMultiFile(multiFace interface{}) ([]*types.UploadedF } /* -DeleteFile deletes a file from a bucket on Google Cloud Storage and returns an error if one occurs. +DeleteFile deletes a file Pinata and returns an error if one occurs. Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ diff --git a/s3/s3.go b/s3/s3.go index 1736509..882b094 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -244,7 +244,7 @@ func (s *SimpleStorageService) UploadFolder(foldFace interface{}) ([]*types.Uplo } /* -DeleteFile deletes a file from a bucket on Google Cloud Storage and returns an error if one occurs. +DeleteFile deletes a fileS3 and returns an error if one occurs. Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ diff --git a/struct.go b/struct.go index 855d561..c69dde9 100644 --- a/struct.go +++ b/struct.go @@ -46,9 +46,9 @@ type RainbowBridge interface { */ UploadFolder(foldFace interface{}) ([]*types.UploadedFile, error) /* - DeleteFile deletes a file from a bucket on Google Cloud Storage and returns an error if one occurs. + DeleteFile deletes a file from a bucket in provider's storage and returns an error if one occurs. - Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. + Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ DeleteFile(fileFace interface{}) error } diff --git a/wasabi/wasabi.go b/wasabi/wasabi.go index 758dbe9..3d89410 100644 --- a/wasabi/wasabi.go +++ b/wasabi/wasabi.go @@ -268,7 +268,7 @@ func (w *WasabiCloudStorage) UploadFolder(foldFace interface{}) ([]*types.Upload } /* -DeleteFile deletes a file from a bucket on Google Cloud Storage and returns an error if one occurs. +DeleteFile deletes a file Wasabi and returns an error if one occurs. Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ From c12f20f9ea4884f22177e3f57e46274b17d9a4db Mon Sep 17 00:00:00 2001 From: Oluwafunmilayo Olayiwola Date: Mon, 19 Aug 2024 14:05:20 +0100 Subject: [PATCH 05/10] Delete .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 4f749c32437daacc571951136fc0bf7b3cc94607..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKF)su`6#j;FE+nEu-h7vxxdEWoPiqUnB!DuTU^K>VfQesP&W7yBG*QVMhX)H= zd#z?W7a0bE0zrYlsDOOC5$17#22Q;1H+nyJea%*yRu5ZMj+N(LFK-(&4{N@^_N~8N zclL(TCQ~ume2fjhN;3HI({7~cge2D z<)66d@!LF?H}CcNDx4H0w5j?Lc5#ATpLO}Z-|updT=lrUIot}0Vg}SPgbo&c{*@Q< z>v5NN=dQkI)2-DW{Z`_4Te4_5EKXs^c0Z&A!ZXy zEM^Av*1=9+0f-TYweeZ*5|R^JOe|&w>7gl;N;Ij;UNMwO=Xh-65{sEZlMZDsAIdT- zdqYv0o%6>!94avw`k+8iz*k_{yiUsbzfpYu_mjd~P#`GquM|*Gx|ObTN%m~bEl$qb tn61JlCUKcTox;u@$NE8z;wd(5^u_W(Oe|&wIYJA61hfpH3kv+G0-sJv*V+I8 From fc46b8eb9c5dd66c15a8257ae1ab6fab1084f4a8 Mon Sep 17 00:00:00 2001 From: funmi4194 Date: Mon, 19 Aug 2024 16:47:52 +0100 Subject: [PATCH 06/10] fix: fixed a comment --- s3/s3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3/s3.go b/s3/s3.go index 882b094..bbdecb1 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -244,7 +244,7 @@ func (s *SimpleStorageService) UploadFolder(foldFace interface{}) ([]*types.Uplo } /* -DeleteFile deletes a fileS3 and returns an error if one occurs. +DeleteFile deletes a file S3 and returns an error if one occurs. Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ From 74229a6b7387b44e85a6dcb1b4647957719a9a74 Mon Sep 17 00:00:00 2001 From: funmi4194 Date: Mon, 19 Aug 2024 16:50:23 +0100 Subject: [PATCH 07/10] fix: fixed a comment --- s3/s3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3/s3.go b/s3/s3.go index bbdecb1..882b094 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -244,7 +244,7 @@ func (s *SimpleStorageService) UploadFolder(foldFace interface{}) ([]*types.Uplo } /* -DeleteFile deletes a file S3 and returns an error if one occurs. +DeleteFile deletes a fileS3 and returns an error if one occurs. Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ From a50da69423b5bf4739bf8e90c3dcb92a47fbd845 Mon Sep 17 00:00:00 2001 From: funmi4194 Date: Mon, 19 Aug 2024 16:53:41 +0100 Subject: [PATCH 08/10] Revert "fix: fixed a comment" This reverts commit 5fbff512dfad9932f584a2430bfe179ef6bd9ddd. --- .DS_Store | Bin 0 -> 6148 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..4f749c32437daacc571951136fc0bf7b3cc94607 GIT binary patch literal 6148 zcmeHKF)su`6#j;FE+nEu-h7vxxdEWoPiqUnB!DuTU^K>VfQesP&W7yBG*QVMhX)H= zd#z?W7a0bE0zrYlsDOOC5$17#22Q;1H+nyJea%*yRu5ZMj+N(LFK-(&4{N@^_N~8N zclL(TCQ~ume2fjhN;3HI({7~cge2D z<)66d@!LF?H}CcNDx4H0w5j?Lc5#ATpLO}Z-|updT=lrUIot}0Vg}SPgbo&c{*@Q< z>v5NN=dQkI)2-DW{Z`_4Te4_5EKXs^c0Z&A!ZXy zEM^Av*1=9+0f-TYweeZ*5|R^JOe|&w>7gl;N;Ij;UNMwO=Xh-65{sEZlMZDsAIdT- zdqYv0o%6>!94avw`k+8iz*k_{yiUsbzfpYu_mjd~P#`GquM|*Gx|ObTN%m~bEl$qb tn61JlCUKcTox;u@$NE8z;wd(5^u_W(Oe|&wIYJA61hfpH3kv+G0-sJv*V+I8 literal 0 HcmV?d00001 From ba2cd9e6e4248cc75740b2fc14345766a443523f Mon Sep 17 00:00:00 2001 From: funmi4194 Date: Mon, 19 Aug 2024 17:00:38 +0100 Subject: [PATCH 09/10] fix: fixed a comment --- s3/s3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3/s3.go b/s3/s3.go index 882b094..bbdecb1 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -244,7 +244,7 @@ func (s *SimpleStorageService) UploadFolder(foldFace interface{}) ([]*types.Uplo } /* -DeleteFile deletes a fileS3 and returns an error if one occurs. +DeleteFile deletes a file S3 and returns an error if one occurs. Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ From 91e63ec3f6a56f09e1a2b26f07f3ac92aad4fe0d Mon Sep 17 00:00:00 2001 From: funmi4194 Date: Thu, 22 Aug 2024 22:08:32 +0100 Subject: [PATCH 10/10] fix: fixed comments --- pinata/pinata.go | 2 +- s3/s3.go | 2 +- wasabi/wasabi.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pinata/pinata.go b/pinata/pinata.go index 9be9a28..7131427 100644 --- a/pinata/pinata.go +++ b/pinata/pinata.go @@ -281,7 +281,7 @@ func (p *PinataCloud) UploadMultiFile(multiFace interface{}) ([]*types.UploadedF } /* -DeleteFile deletes a file Pinata and returns an error if one occurs. +DeleteFile deletes a file from Pinata and returns an error if one occurs. Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ diff --git a/s3/s3.go b/s3/s3.go index bbdecb1..1ca24da 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -244,7 +244,7 @@ func (s *SimpleStorageService) UploadFolder(foldFace interface{}) ([]*types.Uplo } /* -DeleteFile deletes a file S3 and returns an error if one occurs. +DeleteFile deletes a file from S3 and returns an error if one occurs. Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */ diff --git a/wasabi/wasabi.go b/wasabi/wasabi.go index 3d89410..5070027 100644 --- a/wasabi/wasabi.go +++ b/wasabi/wasabi.go @@ -268,7 +268,7 @@ func (w *WasabiCloudStorage) UploadFolder(foldFace interface{}) ([]*types.Upload } /* -DeleteFile deletes a file Wasabi and returns an error if one occurs. +DeleteFile deletes a file from Wasabi and returns an error if one occurs. Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig. */