In order to authenticate to a private GCS bucket, we need to connect the Cloud CDN load balancer through a Backend Service, instead of a Backend Bucket. See Configure private origin authentication for more details.
As of April 2024, the
In order to authenticate to a private GCS bucket, we need to connect the Cloud CDN load balancer through a Backend Service, instead of a Backend Bucket. See Configure private origin authentication for more details.
As of April 2024, the
import { useState, useEffect } from 'react' | |
import AsyncStorage from '@react-native-community/async-storage' | |
export const useAsyncStorage = <T>(key: string, initialValue: T) => { | |
const [storageItem, setStorageItem] = useState<T>(initialValue) | |
// initialize | |
useEffect(() => { | |
AsyncStorage.getItem(key) | |
.then((value) => { |
import { IStorageBackend, EmptyStorageModel, StorageOptions } from '@react-native-community/async-storage' | |
import firestore, { FirebaseFirestoreTypes } from '@react-native-firebase/firestore' | |
// UNTESTED | |
// @react-native-community/async-storage | |
class FirestoreSettings<T extends EmptyStorageModel = EmptyStorageModel> implements IStorageBackend<T> { | |
firestore: FirebaseFirestoreTypes.DocumentReference | |
constructor(firestore: FirebaseFirestoreTypes.DocumentReference) { |
// Returned promise | |
var promise = new Parse.Promise() | |
// Error function | |
var error = function() { | |
console.error('Error:', arguments) | |
// Break it | |
response.error('Query failed, check logs') | |
} |
Parse.Cloud.define("retrieveAllObjects", function(request, status) { | |
var result = []; | |
var chunk_size = 1000; | |
var processCallback = function(res) { | |
result = result.concat(res); | |
if (res.length === chunk_size) { | |
process(res[res.length-1].id); | |
} else { | |
status.success(result); | |
} |