feat: add FTP and SFTP upload support
This commit is contained in:
Vendored
+6
@@ -47,4 +47,10 @@ export function SummarizeRegion(arg1:main.CaptureResult):Promise<void>;
|
||||
|
||||
export function TestConnection(arg1:domain.S3Config):Promise<void>;
|
||||
|
||||
export function TestFTPConnection(arg1:domain.FTPConfig):Promise<void>;
|
||||
|
||||
export function TestSSHConnection(arg1:domain.SSHConfig):Promise<void>;
|
||||
|
||||
export function UploadNativeRegionToFTP(arg1:main.CaptureResult):Promise<void>;
|
||||
|
||||
export function UploadRegionToFTP(arg1:main.CaptureResult):Promise<void>;
|
||||
|
||||
@@ -90,6 +90,18 @@ export function TestConnection(arg1) {
|
||||
return window['go']['main']['App']['TestConnection'](arg1);
|
||||
}
|
||||
|
||||
export function TestFTPConnection(arg1) {
|
||||
return window['go']['main']['App']['TestFTPConnection'](arg1);
|
||||
}
|
||||
|
||||
export function TestSSHConnection(arg1) {
|
||||
return window['go']['main']['App']['TestSSHConnection'](arg1);
|
||||
}
|
||||
|
||||
export function UploadNativeRegionToFTP(arg1) {
|
||||
return window['go']['main']['App']['UploadNativeRegionToFTP'](arg1);
|
||||
}
|
||||
|
||||
export function UploadRegionToFTP(arg1) {
|
||||
return window['go']['main']['App']['UploadRegionToFTP'](arg1);
|
||||
}
|
||||
|
||||
@@ -179,6 +179,36 @@ export namespace domain {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
export class FTPConfig {
|
||||
protocol: string;
|
||||
host: string;
|
||||
port: number;
|
||||
user: string;
|
||||
authMethod: string;
|
||||
password: string;
|
||||
pathPrefix: string;
|
||||
strictHostKey: boolean;
|
||||
knownHostsPath: string;
|
||||
connectTimeoutSecs: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new FTPConfig(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.protocol = source["protocol"];
|
||||
this.host = source["host"];
|
||||
this.port = source["port"];
|
||||
this.user = source["user"];
|
||||
this.authMethod = source["authMethod"];
|
||||
this.password = source["password"];
|
||||
this.pathPrefix = source["pathPrefix"];
|
||||
this.strictHostKey = source["strictHostKey"];
|
||||
this.knownHostsPath = source["knownHostsPath"];
|
||||
this.connectTimeoutSecs = source["connectTimeoutSecs"];
|
||||
}
|
||||
}
|
||||
export class SSHConfig {
|
||||
host: string;
|
||||
port: number;
|
||||
@@ -238,6 +268,7 @@ export namespace domain {
|
||||
theme: string;
|
||||
s3: S3Config;
|
||||
ssh: SSHConfig;
|
||||
ftp: FTPConfig;
|
||||
llm: LLMConfig;
|
||||
ocr: OCRConfig;
|
||||
|
||||
@@ -251,6 +282,7 @@ export namespace domain {
|
||||
this.theme = source["theme"];
|
||||
this.s3 = this.convertValues(source["s3"], S3Config);
|
||||
this.ssh = this.convertValues(source["ssh"], SSHConfig);
|
||||
this.ftp = this.convertValues(source["ftp"], FTPConfig);
|
||||
this.llm = this.convertValues(source["llm"], LLMConfig);
|
||||
this.ocr = this.convertValues(source["ocr"], OCRConfig);
|
||||
}
|
||||
@@ -278,6 +310,7 @@ export namespace domain {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user