Parse and validate AT Protocol Lexicons with DTO generation for Laravel
at dev 958 B view raw
1<?php 2 3namespace SocialDept\AtpSchema\Contracts; 4 5use Illuminate\Http\UploadedFile; 6use SocialDept\AtpSchema\Data\BlobReference; 7 8interface BlobHandler 9{ 10 /** 11 * Upload blob and create reference. 12 */ 13 public function upload(UploadedFile $file): BlobReference; 14 15 /** 16 * Upload blob from path. 17 */ 18 public function uploadFromPath(string $path): BlobReference; 19 20 /** 21 * Upload blob from content. 22 */ 23 public function uploadFromContent(string $content, string $mimeType): BlobReference; 24 25 /** 26 * Download blob content. 27 */ 28 public function download(BlobReference $blob): string; 29 30 /** 31 * Generate signed URL for blob. 32 */ 33 public function url(BlobReference $blob): string; 34 35 /** 36 * Check if blob exists in storage. 37 */ 38 public function exists(BlobReference $blob): bool; 39 40 /** 41 * Delete blob from storage. 42 */ 43 public function delete(BlobReference $blob): bool; 44}