// monorepo/cloud/backend/internal/maplefile/repo/fileobjectstorage/impl.go
package fileobjectstorage

import (
	"go.uber.org/zap"

	"codeberg.org/mapleopentech/monorepo/cloud/maplefile-backend/config"
	dom_file "codeberg.org/mapleopentech/monorepo/cloud/maplefile-backend/internal/domain/file"
	s3storage "codeberg.org/mapleopentech/monorepo/cloud/maplefile-backend/pkg/storage/object/s3"
)

type fileObjectStorageRepositoryImpl struct {
	Config  *config.Configuration
	Logger  *zap.Logger
	Storage s3storage.S3ObjectStorage
}

func NewRepository(cfg *config.Configuration, logger *zap.Logger, s3 s3storage.S3ObjectStorage) dom_file.FileObjectStorageRepository {
	logger = logger.Named("FileObjectStorageRepository")
	return &fileObjectStorageRepositoryImpl{
		Config:  cfg,
		Logger:  logger.With(zap.String("repository", "file_storage")),
		Storage: s3,
	}
}
