Private
Public Access
1
0

新增: 云OSS存储集成(七牛云+阿里云)+多桶导航+GBK编码自动转换

This commit is contained in:
2026-05-05 03:18:47 +08:00
parent eb5b85e007
commit b4f4b4627d
34 changed files with 5225 additions and 48 deletions

View File

@@ -302,6 +302,115 @@ export function OpenPath(path: string): $CancellablePromise<void> {
return $Call.ByID(1591734570, path);
}
export function OssConnect(req: $models.OssConnectRequest): $CancellablePromise<string> {
return $Call.ByID(3667022538, req);
}
/**
* OssCreateDir OSS 创建目录
*/
export function OssCreateDir(connID: string, dirPath: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
return $Call.ByID(605668951, connID, dirPath).then(($result: any) => {
return $$createType2($result);
});
}
/**
* OssCreateFile OSS 创建文件
*/
export function OssCreateFile(connID: string, filePath: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
return $Call.ByID(4148593430, connID, filePath).then(($result: any) => {
return $$createType2($result);
});
}
/**
* OssDeletePath OSS 删除
*/
export function OssDeletePath(connID: string, key: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
return $Call.ByID(4285234744, connID, key).then(($result: any) => {
return $$createType2($result);
});
}
/**
* OssDisconnect 断开 OSS 连接
*/
export function OssDisconnect(connID: string): $CancellablePromise<void> {
return $Call.ByID(3427288622, connID);
}
/**
* OssDownloadToTemp OSS 下载到临时文件
*/
export function OssDownloadToTemp(connID: string, key: string): $CancellablePromise<string> {
return $Call.ByID(370656471, connID, key);
}
/**
* OssGetCommonPaths OSS 获取常用路径
*/
export function OssGetCommonPaths(connID: string): $CancellablePromise<{ [_ in string]?: string }> {
return $Call.ByID(3525024115, connID).then(($result: any) => {
return $$createType4($result);
});
}
/**
* OssGetFileInfo OSS 获取文件信息
*/
export function OssGetFileInfo(connID: string, key: string): $CancellablePromise<{ [_ in string]?: any }> {
return $Call.ByID(852430614, connID, key).then(($result: any) => {
return $$createType0($result);
});
}
/**
* OssGetSignedURL OSS 获取预签名 URL
*/
export function OssGetSignedURL(connID: string, key: string): $CancellablePromise<string> {
return $Call.ByID(1344953417, connID, key);
}
/**
* OssListDir OSS 列出目录
*/
export function OssListDir(connID: string, prefix: string): $CancellablePromise<{ [_ in string]?: any }[]> {
return $Call.ByID(3013212019, connID, prefix).then(($result: any) => {
return $$createType3($result);
});
}
/**
* OssReadFile OSS 读取文件
*/
export function OssReadFile(connID: string, key: string): $CancellablePromise<string> {
return $Call.ByID(1629576606, connID, key);
}
/**
* OssRenamePath OSS 重命名
*/
export function OssRenamePath(req: $models.OssRenamePathRequest): $CancellablePromise<filesystem$0.FileOperationResult | null> {
return $Call.ByID(4218061693, req).then(($result: any) => {
return $$createType2($result);
});
}
/**
* OssWriteBase64File OSS 写入 base64 编码文件
*/
export function OssWriteBase64File(connID: string, key: string, base64Content: string): $CancellablePromise<void> {
return $Call.ByID(1772140162, connID, key, base64Content);
}
/**
* OssWriteFile OSS 写入文件
*/
export function OssWriteFile(connID: string, key: string, content: string): $CancellablePromise<void> {
return $Call.ByID(39773277, connID, key, content);
}
/**
* ReadFile 读取文件
*/

View File

@@ -7,6 +7,8 @@ export {
};
export {
OssConnectRequest,
OssRenamePathRequest,
RenamePathRequest,
SaveAppConfigRequest,
SaveBase64FileRequest,

View File

@@ -9,6 +9,71 @@ import { Create as $Create } from "@wailsio/runtime";
// @ts-ignore: Unused imports
import * as api$0 from "./internal/api/models.js";
export class OssConnectRequest {
"provider": string;
"access_key": string;
"secret_key": string;
"endpoint": string;
/** Creates a new OssConnectRequest instance. */
constructor($$source: Partial<OssConnectRequest> = {}) {
if (!("provider" in $$source)) {
this["provider"] = "";
}
if (!("access_key" in $$source)) {
this["access_key"] = "";
}
if (!("secret_key" in $$source)) {
this["secret_key"] = "";
}
if (!("endpoint" in $$source)) {
this["endpoint"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new OssConnectRequest instance from a string or object.
*/
static createFrom($$source: any = {}): OssConnectRequest {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new OssConnectRequest($$parsedSource as Partial<OssConnectRequest>);
}
}
/**
* OssRenamePathRequest OSS 重命名请求
*/
export class OssRenamePathRequest {
"conn_id": string;
"old_path": string;
"new_path": string;
/** Creates a new OssRenamePathRequest instance. */
constructor($$source: Partial<OssRenamePathRequest> = {}) {
if (!("conn_id" in $$source)) {
this["conn_id"] = "";
}
if (!("old_path" in $$source)) {
this["old_path"] = "";
}
if (!("new_path" in $$source)) {
this["new_path"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new OssRenamePathRequest instance from a string or object.
*/
static createFrom($$source: any = {}): OssRenamePathRequest {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new OssRenamePathRequest($$parsedSource as Partial<OssRenamePathRequest>);
}
}
/**
* RenamePathRequest 重命名文件或目录请求结构体
*/
@@ -119,6 +184,11 @@ export class SaveProfileRequest {
"key_path": string;
"type": string;
"token": string;
"access_key": string;
"secret_key": string;
"bucket": string;
"region": string;
"endpoint": string;
"last_connected": number | null;
/** Creates a new SaveProfileRequest instance. */
@@ -150,6 +220,21 @@ export class SaveProfileRequest {
if (!("token" in $$source)) {
this["token"] = "";
}
if (!("access_key" in $$source)) {
this["access_key"] = "";
}
if (!("secret_key" in $$source)) {
this["secret_key"] = "";
}
if (!("bucket" in $$source)) {
this["bucket"] = "";
}
if (!("region" in $$source)) {
this["region"] = "";
}
if (!("endpoint" in $$source)) {
this["endpoint"] = "";
}
if (!("last_connected" in $$source)) {
this["last_connected"] = null;
}