Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7ace33d
feat(samples): Add POSIX samples
d-goog May 26, 2022
612b850
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 26, 2022
7cc13dd
Fix: `fs.promises` import
d-goog May 26, 2022
8e4e6d1
Merge branch 'posix-samples' of https://github.com/googleapis/nodejs-…
d-goog May 26, 2022
e1696d1
fix: clean-up created transfer job
d-goog May 26, 2022
0951983
chore: Add (safe) debug log
d-goog May 26, 2022
4a47cd5
fix: misc bugs
d-goog May 26, 2022
6236e9e
chore: remove debug log
d-goog May 27, 2022
86301e0
feat: add POSIX to POSIX sample
d-goog May 27, 2022
1946b0c
chore: typo & clean-up
d-goog May 27, 2022
7215ff6
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 27, 2022
cbf6aae
refactor: styling
d-goog Jun 1, 2022
28308ed
Merge branch 'posix-samples' of https://github.com/googleapis/nodejs-…
d-goog Jun 2, 2022
ba86cae
feat: Add POSIX Download sample
d-goog Jun 3, 2022
d613f20
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 3, 2022
9b08257
fix: Add ending '/'
d-goog Jun 3, 2022
dc22f57
style: shorten variable
d-goog Jun 3, 2022
bc80220
feat: Transfer Manifest request
d-goog Jun 14, 2022
ab5dafa
fix: typo
d-goog Jun 14, 2022
de8d929
Merge branch 'main' of https://github.com/googleapis/nodejs-storage-t…
d-goog Jun 14, 2022
28bb7cf
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 14, 2022
12dc353
Merge branch 'posix-samples' of https://github.com/googleapis/nodejs-…
gcf-owl-bot[bot] Jun 14, 2022
9b199ac
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 14, 2022
87c8161
Merge branch 'posix-samples' of https://github.com/googleapis/nodejs-…
gcf-owl-bot[bot] Jun 14, 2022
233441c
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 14, 2022
56be733
Merge branch 'posix-samples' of https://github.com/googleapis/nodejs-…
gcf-owl-bot[bot] Jun 14, 2022
87c90a2
fix: `replaceAll` (not available in Node 12) -> `replace`
d-goog Jun 14, 2022
b7a99ca
Merge branch 'posix-samples' of https://github.com/googleapis/nodejs-…
d-goog Jun 14, 2022
72f949c
refactor(samples): Fix documentation, typos, and function names
d-goog Jun 15, 2022
95501d9
Merge branch 'main' of https://github.com/googleapis/nodejs-storage-t…
d-goog Jun 15, 2022
b9fdd10
fix: typo
d-goog Jun 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions samples/manifest-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ async function main(
// const sourceAgentPoolName = 'projects/my-project/agentPools/transfer_service_default'

// The root directory path on the source filesystem
// const rootDirectory = '/directory/to/transfer/source',
// const rootDirectory = '/directory/to/transfer/source'

// The ID of the GCS bucket to transfer data to
// const gcsSinkBucket = 'my-sink-bucket'

// Transfer manifest location. Must be a
// Transfer manifest location. Must be a `gs:` URL
// const manifestLocation = 'gs://my-bucket/sample_manifest.csv'

// Creates a client
Expand All @@ -54,7 +54,7 @@ async function main(
/**
* Creates a request to transfer from the local file system to the sink bucket
*/
async function transferDirectory() {
async function transferViaManifest() {
const createRequest = {
transferJob: {
projectId,
Expand Down Expand Up @@ -87,7 +87,7 @@ async function main(
);
}

transferDirectory();
transferViaManifest();
// [END storagetransfer_manifest_request]
}

Expand Down
8 changes: 4 additions & 4 deletions samples/posix-download.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ async function main(
// An optional path on the Google Cloud Storage bucket to download from
// const gcsSourcePath = 'foo/bar/'

// The root directory path on the source filesystem
// const rootDirectory = '/directory/to/transfer/source',
// The root directory path on the destination filesystem
// const rootDirectory = '/directory/to/transfer/sink'

// Creates a client
const client = new StorageTransferServiceClient();

/**
* Creates a request to transfer from the local file system to the sink bucket
*/
async function transferDirectory() {
async function downloadFromGCS() {
const createRequest = {
transferJob: {
projectId,
Expand Down Expand Up @@ -87,7 +87,7 @@ async function main(
);
}

transferDirectory();
downloadFromGCS();
// [END storagetransfer_download_to_posix]
}

Expand Down
2 changes: 1 addition & 1 deletion samples/posix-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function main(
// const sourceAgentPoolName = 'projects/my-project/agentPools/transfer_service_default'

// The root directory path on the source filesystem
// const rootDirectory = '/directory/to/transfer/source',
// const rootDirectory = '/directory/to/transfer/source'

// The ID of the GCS bucket to transfer data to
// const gcsSinkBucket = 'my-sink-bucket'
Expand Down
2 changes: 1 addition & 1 deletion samples/posix-to-posix-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async function main(
// const sinkAgentPoolName = 'projects/my-project/agentPools/transfer_service_default'

// The root directory path on the source filesystem
// const rootDirectory = '/directory/to/transfer/source',
// const rootDirectory = '/directory/to/transfer/source'

// The root directory path on the sink filesystem
// const destinationDirectory = '/directory/to/transfer/sink'
Expand Down
2 changes: 1 addition & 1 deletion samples/test/manifest-request.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('manifest-request', () => {
await fs.rmdir(rootDirectory);
});

it('should create a transfer job with a manifest from POSIX to GCS', async () => {
it('should create a transfer job using a manifest from POSIX to GCS', async () => {
const output = await runSample('manifest-request', [
projectId,
sourceAgentPoolName,
Expand Down