This file contains hidden or 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
const Storage = require('@google-cloud/storage') | |
const storage = new Storage({ | |
projectId: 'myproject', | |
customEndpoint: true | |
}) | |
const googleStorageUrl = 'https://www.googleapis.com/storage/v1' | |
storage.interceptors.push({ |
This file contains hidden or 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
/* Required some Rust code to flatten an array of arbitrarily nested arrays of integers into a flat array of | |
* integers. e.g. [[1,2,[3]],4] -> [1,2,3,4]. | |
*/ | |
/* Model of an arbitrarily nested array of arrays, since native arrays in Rust won't allow that. | |
* It is a generic type so that it supports all native numeric types. | |
*/ | |
enum ArbitrarilyNestedArray<T> { | |
Array(Vec<ArbitrarilyNestedArray<T>>), | |
Integer(T) |