Integrate S3 storage solution into the project

This commit is contained in:
2024-09-20 16:40:04 +07:00
parent 5b1222e024
commit 21a0a92f22
15 changed files with 318 additions and 168 deletions

View File

@ -2,9 +2,10 @@ package types
import (
"context"
"time"
"github.com/fossyy/filekeeper/types/models"
"github.com/google/uuid"
"time"
)
type FileStatus string
@ -92,3 +93,10 @@ type Services interface {
GetUserFile(name, ownerID string) (*FileWithDetail, error)
GetUserStorageUsage(ownerID string) (uint64, error)
}
type Storage interface {
Get(ctx context.Context, key string) ([]byte, error)
Add(ctx context.Context, key string, data []byte) error
Delete(ctx context.Context, key string) error
ListObjects(ctx context.Context, prefix string) ([]string, error)
}