oak-external-sdk/es/service/ctyun/CTYun.d.ts

29 lines
1002 B
TypeScript

import { CTYunZone, ReqOptionProps } from '../../types/CTYun';
export declare class CTYunInstance {
private accessKey;
private secretKey;
constructor(accessKey: string, secretKey: string);
getUploadInfo(bucket: string, zone: CTYunZone, key?: string): {
key: string | undefined;
accessKey: string;
policy: string;
signature: string;
uploadHost: string;
bucket: string;
};
getSignInfo(bucket: string): {
encodePolicy: string;
signature: string;
};
private base64ToUrlSafe;
private hmacSha1;
private urlSafeBase64Encode;
removeFile(bucket: string, zone: CTYunZone, key: string): Promise<void>;
isExistObject(srcBucket: string, zone: CTYunZone, srcKey: string): Promise<boolean>;
getAuthorization(reqOptions: ReqOptionProps, zone: CTYunZone): string;
private getSignatureKey;
private buildCanonicalRequest;
private buildCanonicalQueryString;
private calculatePayloadHash;
}