Update vendored library cloud.google.com/go

This commit is contained in:
Alexander Neumann committed 2018-03-30 11:41:12 +02:00
1 parent a4ff591165
commit a951e7b126
221 files changed
+19911 -2075

No files matched your search

+19
View File
@@ -196,6 +196,25 @@ func ExampleBucketHandle_AddNotification() {
fmt.Println(n.ID)
}
func ExampleBucketHandle_LockRetentionPolicy() {
ctx := context.Background()
client, err := storage.NewClient(ctx)
if err != nil {
// TODO: handle error.
}
b := client.Bucket("my-bucket")
attrs, err := b.Attrs(ctx)
if err != nil {
// TODO: handle error.
}
// Note that locking the bucket without first attaching a RetentionPolicy
// that's at least 1 day is a no-op
err = b.If(storage.BucketConditions{MetagenerationMatch: attrs.MetaGeneration}).LockRetentionPolicy(ctx)
if err != nil {
// TODO: handle err
}
}
func ExampleBucketHandle_Notifications() {
ctx := context.Background()
client, err := storage.NewClient(ctx)