mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 17:22:42 -05:00
Create shared access signature RPC (#18823)
* Rebase from main branch * Made mssql a module * remove rpc specific stuff * Added create sas RPC call * Backup to url works now * Moved createSas RPC to the BlobService * Relocated createSas RPC from sql-dataprotocolclient to the mssql * After rebase * Removed duplicate symbol * Renamed Blob to AzureBlob and relocated CreateSasResponse to mssql extension * Removed AzureBlobProvider, removed AzureBlobService feature * renamed blob to azureblob, converted thenable to promise * Simplify API * fixes * docs update, blob to azureblob update * bumped sts version * Fix config Co-authored-by: chgagnon <chgagnon@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
e9fefd2487
commit
1cf905a7b8
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import './mainThreadAzureBlob';
|
||||
import './mainThreadAzureAccount';
|
||||
import './mainThreadAccountManagement';
|
||||
import './mainThreadBackgroundTaskManagement';
|
||||
|
||||
36
src/sql/workbench/api/browser/mainThreadAzureBlob.ts
Normal file
36
src/sql/workbench/api/browser/mainThreadAzureBlob.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import type * as mssql from 'mssql';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import {
|
||||
ExtHostAzureBlobShape,
|
||||
MainThreadAzureBlobShape,
|
||||
SqlExtHostContext,
|
||||
SqlMainContext
|
||||
} from 'sql/workbench/api/common/sqlExtHost.protocol';
|
||||
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
|
||||
import { IAzureBlobService } from 'sql/platform/azureBlob/common/azureBlobService';
|
||||
import { AzureBlobService } from 'sql/workbench/services/azureBlob/browser/azureBlobService';
|
||||
|
||||
@extHostNamedCustomer(SqlMainContext.MainThreadAzureBlob)
|
||||
export class MainThreadAzureBlob extends Disposable implements MainThreadAzureBlobShape {
|
||||
private _proxy: ExtHostAzureBlobShape;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
constructor(
|
||||
extHostContext: IExtHostContext,
|
||||
@IAzureBlobService azureBlobService: IAzureBlobService
|
||||
) {
|
||||
super();
|
||||
this._proxy = extHostContext.getProxy(SqlExtHostContext.ExtHostAzureBlob);
|
||||
(azureBlobService as AzureBlobService).registerProxy(this);
|
||||
}
|
||||
|
||||
public createSas(connectionUri: string, blobContainerUri: string, blobStorageKey: string, storageAccountName: string, expirationDate: string): Thenable<mssql.CreateSasResponse> {
|
||||
return this._proxy.$createSas(connectionUri, blobContainerUri, blobStorageKey, storageAccountName, expirationDate);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user