Initial commit: Open sourcing all of the Maple Open Technologies code.
This commit is contained in:
commit
755d54a99d
2010 changed files with 448675 additions and 0 deletions
23
cloud/maplepress-backend/pkg/storage/object/s3/provider.go
Normal file
23
cloud/maplepress-backend/pkg/storage/object/s3/provider.go
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package s3
|
||||
|
||||
import (
|
||||
"go.uber.org/zap"
|
||||
|
||||
"codeberg.org/mapleopentech/monorepo/cloud/maplepress-backend/config"
|
||||
)
|
||||
|
||||
// ProvideS3ObjectStorage provides an S3 object storage instance
|
||||
func ProvideS3ObjectStorage(cfg *config.Config, logger *zap.Logger) S3ObjectStorage {
|
||||
// Create configuration provider
|
||||
configProvider := NewS3ObjectStorageConfigurationProvider(
|
||||
cfg.AWS.AccessKey,
|
||||
cfg.AWS.SecretKey,
|
||||
cfg.AWS.Endpoint,
|
||||
cfg.AWS.Region,
|
||||
cfg.AWS.BucketName,
|
||||
false, // Default to private bucket
|
||||
)
|
||||
|
||||
// Return new S3 storage instance
|
||||
return NewObjectStorage(configProvider, logger)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue