-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
135 additions
and
2,565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/> | ||
|
||
# Google Cloud Storage Transfer API Node.js Samples | ||
|
||
[![Build](https://storage.googleapis.com/cloud-docs-samples-badges/GoogleCloudPlatform/nodejs-docs-samples/nodejs-docs-samples-storage-transfer.svg)]() | ||
|
||
## Table of Contents | ||
|
||
* [Setup](#setup) | ||
* [Samples](#samples) | ||
* [Storage Transfer API](#storage-transfer-api) | ||
* [Running the tests](#running-the-tests) | ||
|
||
## Setup | ||
|
||
1. Read [Prerequisites][prereq] and [How to run a sample][run] first. | ||
1. Install dependencies: | ||
|
||
With **npm**: | ||
|
||
npm install | ||
|
||
With **yarn**: | ||
|
||
yarn install | ||
|
||
[prereq]: ../README.md#prerequisites | ||
[run]: ../README.md#how-to-run-a-sample | ||
|
||
## Samples | ||
|
||
### Storage Transfer API | ||
|
||
View the [documentation][transfer_0_docs] or the [source code][transfer_0_code]. | ||
|
||
__Usage:__ `node transfer.js --help` | ||
|
||
``` | ||
Commands: | ||
jobs <cmd> [args] Run a job command. | ||
operations <cmd> [args] Run an operation command. | ||
Options: | ||
--help Show help [boolean] | ||
Examples: | ||
node transfer.js jobs --help Show job commands. | ||
node transfer.js operations --help Show operations commands. | ||
For more information, see https://cloud.google.com/storage/transfer | ||
``` | ||
|
||
[transfer_0_docs]: https://cloud.google.com/storage/transfer | ||
[transfer_0_code]: transfer.js | ||
|
||
## Running the tests | ||
|
||
1. Set the **GCLOUD_PROJECT** and **GOOGLE_APPLICATION_CREDENTIALS** environment variables. | ||
|
||
1. Run the tests: | ||
|
||
With **npm**: | ||
|
||
npm test | ||
|
||
With **yarn**: | ||
|
||
yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "nodejs-docs-samples-storage-transfer", | ||
"version": "0.0.1", | ||
"private": true, | ||
"license": "Apache-2.0", | ||
"author": "Google Inc.", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"lint": "samples lint", | ||
"pretest": "npm run lint", | ||
"unit-test": "samples test run --cmd ava -- -T 20s --verbose test/*.test.js", | ||
"system-test": "samples test run --cmd ava -- -T 20s --verbose system-test/*.test.js", | ||
"test": "npm run unit-test && npm run system-test" | ||
}, | ||
"dependencies": { | ||
"@google-cloud/storage": "1.3.0", | ||
"googleapis": "21.3.0", | ||
"moment": "2.18.1", | ||
"safe-buffer": "5.1.1", | ||
"yargs": "9.0.1" | ||
}, | ||
"devDependencies": { | ||
"@google-cloud/nodejs-repo-tools": "1.4.17", | ||
"ava": "0.22.0", | ||
"proxyquire": "1.8.0", | ||
"sinon": "3.3.0", | ||
"uuid": "3.1.0" | ||
}, | ||
"cloud-repo-tools": { | ||
"requiresKeyFile": true, | ||
"requiresProjectId": true, | ||
"product": "storage", | ||
"samples": [ | ||
{ | ||
"id": "transfer", | ||
"name": "Storage Transfer API", | ||
"file": "transfer.js", | ||
"docs_link": "https://cloud.google.com/storage/transfer", | ||
"usage": "node transfer.js --help" | ||
} | ||
] | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.