wip
This commit is contained in:
39
packages/racing/application/ports/ILiveryStorage.ts
Normal file
39
packages/racing/application/ports/ILiveryStorage.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Application Port: ILiveryStorage
|
||||
*
|
||||
* Defines interface for livery image storage.
|
||||
* Infrastructure will provide cloud storage adapter.
|
||||
*/
|
||||
|
||||
export interface UploadResult {
|
||||
success: boolean;
|
||||
imageUrl?: string;
|
||||
error?: string;
|
||||
timestamp: Date;
|
||||
}
|
||||
|
||||
export interface ILiveryStorage {
|
||||
/**
|
||||
* Upload a livery image
|
||||
*/
|
||||
upload(
|
||||
imageData: Buffer | string,
|
||||
fileName: string,
|
||||
metadata?: Record<string, unknown>
|
||||
): Promise<UploadResult>;
|
||||
|
||||
/**
|
||||
* Download a livery image
|
||||
*/
|
||||
download(imageUrl: string): Promise<Buffer>;
|
||||
|
||||
/**
|
||||
* Delete a livery image
|
||||
*/
|
||||
delete(imageUrl: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Generate a signed URL for temporary access
|
||||
*/
|
||||
generateSignedUrl(imageUrl: string, expiresInSeconds: number): Promise<string>;
|
||||
}
|
||||
Reference in New Issue
Block a user