Add FileLu cloud storage backend

This commit is contained in:
kingston125
2025-06-06 10:15:07 -04:00
committed by GitHub
parent 3b3096c940
commit 4a1b5b864c
15 changed files with 1652 additions and 1 deletions

15
backend/filelu/utils.go Normal file
View File

@@ -0,0 +1,15 @@
package filelu
import (
"fmt"
)
// parseStorageToBytes converts a storage string (e.g., "10") to bytes
func parseStorageToBytes(storage string) (int64, error) {
var gb float64
_, err := fmt.Sscanf(storage, "%f", &gb)
if err != nil {
return 0, fmt.Errorf("failed to parse storage: %w", err)
}
return int64(gb * 1024 * 1024 * 1024), nil
}