mirror of
https://github.com/restic/restic.git
synced 2026-11-23 05:42:39 +00:00
Update vendored library cloud.google.com/go
This commit is contained in:
1 parent
a4ff591165
commit
a951e7b126
221 files changed
+19911
-2075
No files matched your search
+22
@@ -396,6 +396,28 @@ func ExampleClient_GetAll() {
|
||||
}
|
||||
}
|
||||
|
||||
func ExampleClient_Mutate() {
|
||||
ctx := context.Background()
|
||||
client, err := datastore.NewClient(ctx, "project-id")
|
||||
if err != nil {
|
||||
// TODO: Handle error.
|
||||
}
|
||||
|
||||
key1 := datastore.NameKey("Post", "post1", nil)
|
||||
key2 := datastore.NameKey("Post", "post2", nil)
|
||||
key3 := datastore.NameKey("Post", "post3", nil)
|
||||
key4 := datastore.NameKey("Post", "post4", nil)
|
||||
|
||||
_, err = client.Mutate(ctx,
|
||||
datastore.NewInsert(key1, Post{Title: "Post 1"}),
|
||||
datastore.NewUpsert(key2, Post{Title: "Post 2"}),
|
||||
datastore.NewUpdate(key3, Post{Title: "Post 3"}),
|
||||
datastore.NewDelete(key4))
|
||||
if err != nil {
|
||||
// TODO: Handle error.
|
||||
}
|
||||
}
|
||||
|
||||
func ExampleCommit_Key() {
|
||||
ctx := context.Background()
|
||||
client, err := datastore.NewClient(ctx, "")
|
||||
|
||||
Reference in new issue
Block a user