AI代码生成工具
This commit is contained in:
34
app/Service/common/oss/OssStorageInterface.php
Normal file
34
app/Service/common/oss/OssStorageInterface.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Service\common\oss;
|
||||
|
||||
/**
|
||||
* OSS 存储驱动统一契约:工厂按 driver 返回实现类,UploadService 只依赖本接口
|
||||
*/
|
||||
interface OssStorageInterface
|
||||
{
|
||||
/**
|
||||
* 注入本请求的运行时配置(密钥已解密)
|
||||
*
|
||||
* @param array $config OssRuntimeConfigService::getActiveConfig()
|
||||
*/
|
||||
public function withConfig(array $config): static;
|
||||
|
||||
/**
|
||||
* 上传图片对象
|
||||
*
|
||||
* @param mixed $filePath 本地路径或 UploadedFile
|
||||
* @param string $key 对象键
|
||||
* @return array{key:string,url:string}|false
|
||||
*/
|
||||
public function uploadImage($filePath, string $key): bool|array;
|
||||
|
||||
/**
|
||||
* 上传视频/通用文件对象
|
||||
*
|
||||
* @param mixed $filePath 本地路径或 UploadedFile
|
||||
* @param string $key 对象键
|
||||
* @return array{key:string,url:string}|false
|
||||
*/
|
||||
public function uploadVideo($filePath, string $key): bool|array;
|
||||
}
|
||||
Reference in New Issue
Block a user