Integrate S3 storage solution into the project
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user