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
/** | |
* Make a request to an application protected by Identity-Aware Proxy. | |
* | |
* @param string $url The Identity-Aware Proxy-protected URL to fetch. | |
* @param string $clientId The client ID used by Identity-Aware Proxy. | |
* | |
* @return The response body. | |
*/ | |
function make_iap_request($url, $clientId, $pathToServiceAccount) | |
{ |
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
using CommandLine; | |
using Google.Cloud.Firestore; | |
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
namespace GoogleCloudSamples | |
{ | |
public class QuickStartFirestoreProgram | |
{ |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>netcoreapp2.0</TargetFramework> | |
<StartupObject>GoogleCloudSamples.QuickStartFirestoreProgram</StartupObject> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="CommandLineParser" Version="2.1.1-beta" /> | |
<PackageReference Include="Google.Cloud.Firestore" Version="1.0.0-beta02" /> | |
</ItemGroup> |
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
Unhandled Exception: System.InvalidOperationException: Shutdown has already been called | |
at Grpc.Core.Internal.CompletionQueueSafeHandle.BeginOp() | |
at Grpc.Core.Internal.CallSafeHandle.StartReceiveMessage(IReceivedMessageCallback callback) | |
at Grpc.Core.Internal.AsyncCallBase`2.ReadMessageInternalAsync() | |
at Grpc.Core.Internal.ClientResponseStream`2.<MoveNext>d__5.MoveNext() | |
--- End of stack trace from previous location where exception was thrown --- | |
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() | |
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) | |
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() | |
at System.Linq.AsyncEnumerable.<ForEachAsync_>d__174`1.MoveNext() |
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
Program.cs(77,53): error CS1061: 'CollectionReference' does not contain a definition for 'GetSnapshotAsync' and no extension method 'GetSnapshotAsync' accepting a first argument of type 'CollectionReference' could be found (are you missing a using directive or an assembly reference?) [/Users/ryanmats/testing/dotnet-docs-samples/firestore/api/QuickStartFirestore/QuickStartFirestore.csproj] | |
The build failed. Please fix the build errors and run again. |
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
Unhandled Exception: System.AggregateException: One or more errors occurred. (Status(StatusCode=InvalidArgument, Detail="Entity has a nested entity property named 'Favorites' as well as a property prefixed with 'Favorites.', this results in name collision.")) ---> Grpc.Core.RpcException: Status(StatusCode=InvalidArgument, Detail="Entity has a nested entity property named 'Favorites' as well as a property prefixed with 'Favorites.', this results in name collision.") | |
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() | |
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) | |
at Google.Api.Gax.Grpc.ApiCallRetryExtensions.<>c__DisplayClass0_0`2.<<WithRetry>b__0>d.MoveNext() | |
--- End of stack trace from previous location where exception was thrown --- | |
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() | |
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) | |
at Google.Cloud.Firestore.WriteB |
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
using CommandLine; | |
using Google.Cloud.Firestore; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
namespace GoogleCloudSamples | |
{ | |
public class QuickStartFirestoreProgram |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>netcoreapp2.0</TargetFramework> | |
<StartupObject>GoogleCloudSamples.QuickStartFirestoreProgram</StartupObject> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="CommandLineParser" Version="2.1.1-beta" /> | |
<PackageReference Include="Google.Cloud.Firestore" Version="1.0.0-beta02" /> | |
</ItemGroup> |
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
require "google/cloud/firestore" | |
firestore = Google::Cloud::Firestore.new | |
frank_ref = firestore.doc "users/frank" | |
frank_ref.set({ | |
name: "Frank", | |
favorites: { | |
food: "Pizza", | |
color: "Blue", | |
subject: "Recess" | |
}, |
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
require "google/cloud/firestore" | |
firestore = Google::Cloud::Firestore.new(project_id: project_id) | |
cities_ref = firestore.col "cities" | |
query = cities_ref | |
query.get do |document_snapshot| | |
puts "Deleting document #{document_snapshot.document_id}." | |
document_ref = document_snapshot.ref | |
document_ref.delete |
OlderNewer