mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-01-30 21:47:35 +00:00
Add Rackspace to pkgcloud's storage providers (#37951)
This commit is contained in:
parent
022f8a9727
commit
c88c21cfc9
20
types/pkgcloud/index.d.ts
vendored
20
types/pkgcloud/index.d.ts
vendored
@ -2,8 +2,9 @@
|
||||
// Project: https://github.com/pkgcloud/pkgcloud#readme
|
||||
// Definitions by: Daniel Friesen <https://github.com/dantman>
|
||||
// Adam Smith <https://github.com/ScriptSmith>
|
||||
// Cornelis Heuperman <https://github.com/heuperman>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
// TypeScript Version: 2.7
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
@ -70,11 +71,28 @@ export interface OpenstackProviderOptions {
|
||||
keystoneAuthVersion?: string;
|
||||
}
|
||||
|
||||
export type RackspaceRegions =
|
||||
| 'DFW' // Dallas/Fort Worth, United States
|
||||
| 'ORD' // Chicago, United States
|
||||
| 'IAD' // Northern Virginia, United States
|
||||
| 'LON' // London, United Kingdom
|
||||
| 'HKG' // Hong Kong, China
|
||||
| 'SYD'; // Sydney, Australia
|
||||
|
||||
export interface RackspaceProviderOptions {
|
||||
provider: 'rackspace';
|
||||
username: string;
|
||||
apiKey: string;
|
||||
region: RackspaceRegions;
|
||||
useInternal?: boolean;
|
||||
}
|
||||
|
||||
export type ProviderOptions = BaseProviderOptions & Partial<
|
||||
| AmazonProviderOptions
|
||||
| AzureProviderOptions
|
||||
| GoogleProviderOptions
|
||||
| OpenstackProviderOptions
|
||||
| RackspaceProviderOptions
|
||||
>;
|
||||
|
||||
/**
|
||||
|
||||
@ -37,6 +37,15 @@ pkgcloud.storage.createClient({
|
||||
password: 'password'
|
||||
});
|
||||
|
||||
// Rackspace
|
||||
pkgcloud.storage.createClient({
|
||||
provider: 'rackspace',
|
||||
username: 'username',
|
||||
apiKey: 'apiKey',
|
||||
region: 'DFW',
|
||||
useInternal: false
|
||||
});
|
||||
|
||||
// Upload a File
|
||||
{
|
||||
const client = pkgcloud.storage.createClient({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user