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
28
cloud/maplefile-backend/internal/service/file/utils.go
Normal file
28
cloud/maplefile-backend/internal/service/file/utils.go
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
// monorepo/cloud/backend/internal/maplefile/service/file/utils.go
|
||||
package file
|
||||
|
||||
import (
|
||||
dom_file "codeberg.org/mapleopentech/monorepo/cloud/maplefile-backend/internal/domain/file"
|
||||
)
|
||||
|
||||
// Helper function to map a File domain model to a FileResponseDTO
|
||||
func mapFileToDTO(file *dom_file.File) *FileResponseDTO {
|
||||
return &FileResponseDTO{
|
||||
ID: file.ID,
|
||||
CollectionID: file.CollectionID,
|
||||
OwnerID: file.OwnerID,
|
||||
EncryptedMetadata: file.EncryptedMetadata,
|
||||
EncryptedFileKey: file.EncryptedFileKey,
|
||||
EncryptionVersion: file.EncryptionVersion,
|
||||
EncryptedHash: file.EncryptedHash,
|
||||
EncryptedFileSizeInBytes: file.EncryptedFileSizeInBytes,
|
||||
EncryptedThumbnailSizeInBytes: file.EncryptedThumbnailSizeInBytes,
|
||||
Tags: file.Tags,
|
||||
CreatedAt: file.CreatedAt,
|
||||
ModifiedAt: file.ModifiedAt,
|
||||
Version: file.Version,
|
||||
State: file.State,
|
||||
TombstoneVersion: file.TombstoneVersion,
|
||||
TombstoneExpiry: file.TombstoneExpiry,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue