build(deps): bump cloud.google.com/go/storage from 1.27.0 to 1.30.1
Bumps [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) from 1.27.0 to 1.30.1. - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.27.0...pubsub/v1.30.1) --- updated-dependencies: - dependency-name: cloud.google.com/go/storage dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
cd5cc08ce6
commit
1410a1e6de
21 changed files with 2503 additions and 2365 deletions
10
vendor/cloud.google.com/go/storage/internal/apiv2/doc.go
generated
vendored
10
vendor/cloud.google.com/go/storage/internal/apiv2/doc.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2022 Google LLC
|
||||
// Copyright 2023 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -21,6 +21,11 @@
|
|||
//
|
||||
// NOTE: This package is in alpha. It is not stable, and is likely to change.
|
||||
//
|
||||
// # General documentation
|
||||
//
|
||||
// For information about setting deadlines, reusing contexts, and more
|
||||
// please visit https://pkg.go.dev/cloud.google.com/go.
|
||||
//
|
||||
// # Example usage
|
||||
//
|
||||
// To get started with this package, create a client.
|
||||
|
|
@ -73,9 +78,6 @@
|
|||
// Individual methods on the client use the ctx given to them.
|
||||
//
|
||||
// To close the open connection, use the Close() method.
|
||||
//
|
||||
// For information about setting deadlines, reusing contexts, and more
|
||||
// please visit https://pkg.go.dev/cloud.google.com/go.
|
||||
package storage // import "cloud.google.com/go/storage/internal/apiv2"
|
||||
|
||||
import (
|
||||
|
|
|
|||
16
vendor/cloud.google.com/go/storage/internal/apiv2/gapic_metadata.json
generated
vendored
16
vendor/cloud.google.com/go/storage/internal/apiv2/gapic_metadata.json
generated
vendored
|
|
@ -30,9 +30,9 @@
|
|||
"CreateHmacKey"
|
||||
]
|
||||
},
|
||||
"CreateNotification": {
|
||||
"CreateNotificationConfig": {
|
||||
"methods": [
|
||||
"CreateNotification"
|
||||
"CreateNotificationConfig"
|
||||
]
|
||||
},
|
||||
"DeleteBucket": {
|
||||
|
|
@ -45,9 +45,9 @@
|
|||
"DeleteHmacKey"
|
||||
]
|
||||
},
|
||||
"DeleteNotification": {
|
||||
"DeleteNotificationConfig": {
|
||||
"methods": [
|
||||
"DeleteNotification"
|
||||
"DeleteNotificationConfig"
|
||||
]
|
||||
},
|
||||
"DeleteObject": {
|
||||
|
|
@ -70,9 +70,9 @@
|
|||
"GetIamPolicy"
|
||||
]
|
||||
},
|
||||
"GetNotification": {
|
||||
"GetNotificationConfig": {
|
||||
"methods": [
|
||||
"GetNotification"
|
||||
"GetNotificationConfig"
|
||||
]
|
||||
},
|
||||
"GetObject": {
|
||||
|
|
@ -95,9 +95,9 @@
|
|||
"ListHmacKeys"
|
||||
]
|
||||
},
|
||||
"ListNotifications": {
|
||||
"ListNotificationConfigs": {
|
||||
"methods": [
|
||||
"ListNotifications"
|
||||
"ListNotificationConfigs"
|
||||
]
|
||||
},
|
||||
"ListObjects": {
|
||||
|
|
|
|||
132
vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go
generated
vendored
132
vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2022 Google LLC
|
||||
// Copyright 2023 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -24,13 +24,13 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
iampb "cloud.google.com/go/iam/apiv1/iampb"
|
||||
storagepb "cloud.google.com/go/storage/internal/apiv2/stubs"
|
||||
gax "github.com/googleapis/gax-go/v2"
|
||||
"google.golang.org/api/iterator"
|
||||
"google.golang.org/api/option"
|
||||
"google.golang.org/api/option/internaloption"
|
||||
gtransport "google.golang.org/api/transport/grpc"
|
||||
iampb "google.golang.org/genproto/googleapis/iam/v1"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
|
@ -49,10 +49,10 @@ type CallOptions struct {
|
|||
SetIamPolicy []gax.CallOption
|
||||
TestIamPermissions []gax.CallOption
|
||||
UpdateBucket []gax.CallOption
|
||||
DeleteNotification []gax.CallOption
|
||||
GetNotification []gax.CallOption
|
||||
CreateNotification []gax.CallOption
|
||||
ListNotifications []gax.CallOption
|
||||
DeleteNotificationConfig []gax.CallOption
|
||||
GetNotificationConfig []gax.CallOption
|
||||
CreateNotificationConfig []gax.CallOption
|
||||
ListNotificationConfigs []gax.CallOption
|
||||
ComposeObject []gax.CallOption
|
||||
DeleteObject []gax.CallOption
|
||||
CancelResumableWrite []gax.CallOption
|
||||
|
|
@ -95,10 +95,10 @@ func defaultCallOptions() *CallOptions {
|
|||
SetIamPolicy: []gax.CallOption{},
|
||||
TestIamPermissions: []gax.CallOption{},
|
||||
UpdateBucket: []gax.CallOption{},
|
||||
DeleteNotification: []gax.CallOption{},
|
||||
GetNotification: []gax.CallOption{},
|
||||
CreateNotification: []gax.CallOption{},
|
||||
ListNotifications: []gax.CallOption{},
|
||||
DeleteNotificationConfig: []gax.CallOption{},
|
||||
GetNotificationConfig: []gax.CallOption{},
|
||||
CreateNotificationConfig: []gax.CallOption{},
|
||||
ListNotificationConfigs: []gax.CallOption{},
|
||||
ComposeObject: []gax.CallOption{},
|
||||
DeleteObject: []gax.CallOption{},
|
||||
CancelResumableWrite: []gax.CallOption{},
|
||||
|
|
@ -133,10 +133,10 @@ type internalClient interface {
|
|||
SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error)
|
||||
TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
|
||||
UpdateBucket(context.Context, *storagepb.UpdateBucketRequest, ...gax.CallOption) (*storagepb.Bucket, error)
|
||||
DeleteNotification(context.Context, *storagepb.DeleteNotificationRequest, ...gax.CallOption) error
|
||||
GetNotification(context.Context, *storagepb.GetNotificationRequest, ...gax.CallOption) (*storagepb.Notification, error)
|
||||
CreateNotification(context.Context, *storagepb.CreateNotificationRequest, ...gax.CallOption) (*storagepb.Notification, error)
|
||||
ListNotifications(context.Context, *storagepb.ListNotificationsRequest, ...gax.CallOption) *NotificationIterator
|
||||
DeleteNotificationConfig(context.Context, *storagepb.DeleteNotificationConfigRequest, ...gax.CallOption) error
|
||||
GetNotificationConfig(context.Context, *storagepb.GetNotificationConfigRequest, ...gax.CallOption) (*storagepb.NotificationConfig, error)
|
||||
CreateNotificationConfig(context.Context, *storagepb.CreateNotificationConfigRequest, ...gax.CallOption) (*storagepb.NotificationConfig, error)
|
||||
ListNotificationConfigs(context.Context, *storagepb.ListNotificationConfigsRequest, ...gax.CallOption) *NotificationConfigIterator
|
||||
ComposeObject(context.Context, *storagepb.ComposeObjectRequest, ...gax.CallOption) (*storagepb.Object, error)
|
||||
DeleteObject(context.Context, *storagepb.DeleteObjectRequest, ...gax.CallOption) error
|
||||
CancelResumableWrite(context.Context, *storagepb.CancelResumableWriteRequest, ...gax.CallOption) (*storagepb.CancelResumableWriteResponse, error)
|
||||
|
|
@ -238,17 +238,26 @@ func (c *Client) LockBucketRetentionPolicy(ctx context.Context, req *storagepb.L
|
|||
}
|
||||
|
||||
// GetIamPolicy gets the IAM policy for a specified bucket or object.
|
||||
// The resource field in the request should be
|
||||
// projects//buckets/<bucket_name> for a bucket or
|
||||
// projects//buckets/<bucket_name>/objects/<object_name> for an object.
|
||||
func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {
|
||||
return c.internalClient.GetIamPolicy(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// SetIamPolicy updates an IAM policy for the specified bucket or object.
|
||||
// The resource field in the request should be
|
||||
// projects//buckets/<bucket_name> for a bucket or
|
||||
// projects//buckets/<bucket_name>/objects/<object_name> for an object.
|
||||
func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {
|
||||
return c.internalClient.SetIamPolicy(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// TestIamPermissions tests a set of permissions on the given bucket or object to see which, if
|
||||
// any, are held by the caller.
|
||||
// The resource field in the request should be
|
||||
// projects//buckets/<bucket_name> for a bucket or
|
||||
// projects//buckets/<bucket_name>/objects/<object_name> for an object.
|
||||
func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {
|
||||
return c.internalClient.TestIamPermissions(ctx, req, opts...)
|
||||
}
|
||||
|
|
@ -258,27 +267,27 @@ func (c *Client) UpdateBucket(ctx context.Context, req *storagepb.UpdateBucketRe
|
|||
return c.internalClient.UpdateBucket(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// DeleteNotification permanently deletes a notification subscription.
|
||||
func (c *Client) DeleteNotification(ctx context.Context, req *storagepb.DeleteNotificationRequest, opts ...gax.CallOption) error {
|
||||
return c.internalClient.DeleteNotification(ctx, req, opts...)
|
||||
// DeleteNotificationConfig permanently deletes a NotificationConfig.
|
||||
func (c *Client) DeleteNotificationConfig(ctx context.Context, req *storagepb.DeleteNotificationConfigRequest, opts ...gax.CallOption) error {
|
||||
return c.internalClient.DeleteNotificationConfig(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// GetNotification view a notification config.
|
||||
func (c *Client) GetNotification(ctx context.Context, req *storagepb.GetNotificationRequest, opts ...gax.CallOption) (*storagepb.Notification, error) {
|
||||
return c.internalClient.GetNotification(ctx, req, opts...)
|
||||
// GetNotificationConfig view a NotificationConfig.
|
||||
func (c *Client) GetNotificationConfig(ctx context.Context, req *storagepb.GetNotificationConfigRequest, opts ...gax.CallOption) (*storagepb.NotificationConfig, error) {
|
||||
return c.internalClient.GetNotificationConfig(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// CreateNotification creates a notification subscription for a given bucket.
|
||||
// These notifications, when triggered, publish messages to the specified
|
||||
// Pub/Sub topics.
|
||||
// See https://cloud.google.com/storage/docs/pubsub-notifications (at https://cloud.google.com/storage/docs/pubsub-notifications).
|
||||
func (c *Client) CreateNotification(ctx context.Context, req *storagepb.CreateNotificationRequest, opts ...gax.CallOption) (*storagepb.Notification, error) {
|
||||
return c.internalClient.CreateNotification(ctx, req, opts...)
|
||||
// CreateNotificationConfig creates a NotificationConfig for a given bucket.
|
||||
// These NotificationConfigs, when triggered, publish messages to the
|
||||
// specified Pub/Sub topics. See
|
||||
// https://cloud.google.com/storage/docs/pubsub-notifications (at https://cloud.google.com/storage/docs/pubsub-notifications).
|
||||
func (c *Client) CreateNotificationConfig(ctx context.Context, req *storagepb.CreateNotificationConfigRequest, opts ...gax.CallOption) (*storagepb.NotificationConfig, error) {
|
||||
return c.internalClient.CreateNotificationConfig(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// ListNotifications retrieves a list of notification subscriptions for a given bucket.
|
||||
func (c *Client) ListNotifications(ctx context.Context, req *storagepb.ListNotificationsRequest, opts ...gax.CallOption) *NotificationIterator {
|
||||
return c.internalClient.ListNotifications(ctx, req, opts...)
|
||||
// ListNotificationConfigs retrieves a list of NotificationConfigs for a given bucket.
|
||||
func (c *Client) ListNotificationConfigs(ctx context.Context, req *storagepb.ListNotificationConfigsRequest, opts ...gax.CallOption) *NotificationConfigIterator {
|
||||
return c.internalClient.ListNotificationConfigs(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// ComposeObject concatenates a list of existing objects into a new object in the same
|
||||
|
|
@ -356,8 +365,9 @@ func (c *Client) UpdateObject(ctx context.Context, req *storagepb.UpdateObjectRe
|
|||
// returned persisted_size; in this case, the service will skip data at
|
||||
// offsets that were already persisted (without checking that it matches
|
||||
// the previously written data), and write only the data starting from the
|
||||
// persisted offset. This behavior can make client-side handling simpler
|
||||
// in some cases.
|
||||
// persisted offset. Even though the data isn’t written, it may still
|
||||
// incur a performance cost over resuming at the correct write offset.
|
||||
// This behavior can make client-side handling simpler in some cases.
|
||||
//
|
||||
// The service will not view the object as complete until the client has
|
||||
// sent a WriteObjectRequest with finish_write set to true. Sending any
|
||||
|
|
@ -594,6 +604,9 @@ func (c *gRPCClient) CreateBucket(ctx context.Context, req *storagepb.CreateBuck
|
|||
if reg := regexp.MustCompile("(?P<project>.*)"); reg.MatchString(req.GetParent()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetParent())[1])) > 0 {
|
||||
routingHeadersMap["project"] = url.QueryEscape(reg.FindStringSubmatch(req.GetParent())[1])
|
||||
}
|
||||
if reg := regexp.MustCompile("(?P<project>.*)"); reg.MatchString(req.GetBucket().GetProject()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetBucket().GetProject())[1])) > 0 {
|
||||
routingHeadersMap["project"] = url.QueryEscape(reg.FindStringSubmatch(req.GetBucket().GetProject())[1])
|
||||
}
|
||||
for headerName, headerValue := range routingHeadersMap {
|
||||
routingHeaders = fmt.Sprintf("%s%s=%s&", routingHeaders, headerName, headerValue)
|
||||
}
|
||||
|
|
@ -807,7 +820,7 @@ func (c *gRPCClient) UpdateBucket(ctx context.Context, req *storagepb.UpdateBuck
|
|||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *gRPCClient) DeleteNotification(ctx context.Context, req *storagepb.DeleteNotificationRequest, opts ...gax.CallOption) error {
|
||||
func (c *gRPCClient) DeleteNotificationConfig(ctx context.Context, req *storagepb.DeleteNotificationConfigRequest, opts ...gax.CallOption) error {
|
||||
routingHeaders := ""
|
||||
routingHeadersMap := make(map[string]string)
|
||||
if reg := regexp.MustCompile("(?P<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?"); reg.MatchString(req.GetName()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetName())[1])) > 0 {
|
||||
|
|
@ -820,16 +833,16 @@ func (c *gRPCClient) DeleteNotification(ctx context.Context, req *storagepb.Dele
|
|||
md := metadata.Pairs("x-goog-request-params", routingHeaders)
|
||||
|
||||
ctx = insertMetadata(ctx, c.xGoogMetadata, md)
|
||||
opts = append((*c.CallOptions).DeleteNotification[0:len((*c.CallOptions).DeleteNotification):len((*c.CallOptions).DeleteNotification)], opts...)
|
||||
opts = append((*c.CallOptions).DeleteNotificationConfig[0:len((*c.CallOptions).DeleteNotificationConfig):len((*c.CallOptions).DeleteNotificationConfig)], opts...)
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
_, err = c.client.DeleteNotification(ctx, req, settings.GRPC...)
|
||||
_, err = c.client.DeleteNotificationConfig(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, opts...)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *gRPCClient) GetNotification(ctx context.Context, req *storagepb.GetNotificationRequest, opts ...gax.CallOption) (*storagepb.Notification, error) {
|
||||
func (c *gRPCClient) GetNotificationConfig(ctx context.Context, req *storagepb.GetNotificationConfigRequest, opts ...gax.CallOption) (*storagepb.NotificationConfig, error) {
|
||||
routingHeaders := ""
|
||||
routingHeadersMap := make(map[string]string)
|
||||
if reg := regexp.MustCompile("(?P<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?"); reg.MatchString(req.GetName()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetName())[1])) > 0 {
|
||||
|
|
@ -842,11 +855,11 @@ func (c *gRPCClient) GetNotification(ctx context.Context, req *storagepb.GetNoti
|
|||
md := metadata.Pairs("x-goog-request-params", routingHeaders)
|
||||
|
||||
ctx = insertMetadata(ctx, c.xGoogMetadata, md)
|
||||
opts = append((*c.CallOptions).GetNotification[0:len((*c.CallOptions).GetNotification):len((*c.CallOptions).GetNotification)], opts...)
|
||||
var resp *storagepb.Notification
|
||||
opts = append((*c.CallOptions).GetNotificationConfig[0:len((*c.CallOptions).GetNotificationConfig):len((*c.CallOptions).GetNotificationConfig)], opts...)
|
||||
var resp *storagepb.NotificationConfig
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.client.GetNotification(ctx, req, settings.GRPC...)
|
||||
resp, err = c.client.GetNotificationConfig(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
|
|
@ -855,7 +868,7 @@ func (c *gRPCClient) GetNotification(ctx context.Context, req *storagepb.GetNoti
|
|||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *gRPCClient) CreateNotification(ctx context.Context, req *storagepb.CreateNotificationRequest, opts ...gax.CallOption) (*storagepb.Notification, error) {
|
||||
func (c *gRPCClient) CreateNotificationConfig(ctx context.Context, req *storagepb.CreateNotificationConfigRequest, opts ...gax.CallOption) (*storagepb.NotificationConfig, error) {
|
||||
routingHeaders := ""
|
||||
routingHeadersMap := make(map[string]string)
|
||||
if reg := regexp.MustCompile("(?P<bucket>.*)"); reg.MatchString(req.GetParent()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetParent())[1])) > 0 {
|
||||
|
|
@ -868,11 +881,11 @@ func (c *gRPCClient) CreateNotification(ctx context.Context, req *storagepb.Crea
|
|||
md := metadata.Pairs("x-goog-request-params", routingHeaders)
|
||||
|
||||
ctx = insertMetadata(ctx, c.xGoogMetadata, md)
|
||||
opts = append((*c.CallOptions).CreateNotification[0:len((*c.CallOptions).CreateNotification):len((*c.CallOptions).CreateNotification)], opts...)
|
||||
var resp *storagepb.Notification
|
||||
opts = append((*c.CallOptions).CreateNotificationConfig[0:len((*c.CallOptions).CreateNotificationConfig):len((*c.CallOptions).CreateNotificationConfig)], opts...)
|
||||
var resp *storagepb.NotificationConfig
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.client.CreateNotification(ctx, req, settings.GRPC...)
|
||||
resp, err = c.client.CreateNotificationConfig(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
|
|
@ -881,7 +894,7 @@ func (c *gRPCClient) CreateNotification(ctx context.Context, req *storagepb.Crea
|
|||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *gRPCClient) ListNotifications(ctx context.Context, req *storagepb.ListNotificationsRequest, opts ...gax.CallOption) *NotificationIterator {
|
||||
func (c *gRPCClient) ListNotificationConfigs(ctx context.Context, req *storagepb.ListNotificationConfigsRequest, opts ...gax.CallOption) *NotificationConfigIterator {
|
||||
routingHeaders := ""
|
||||
routingHeadersMap := make(map[string]string)
|
||||
if reg := regexp.MustCompile("(?P<bucket>.*)"); reg.MatchString(req.GetParent()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetParent())[1])) > 0 {
|
||||
|
|
@ -894,11 +907,11 @@ func (c *gRPCClient) ListNotifications(ctx context.Context, req *storagepb.ListN
|
|||
md := metadata.Pairs("x-goog-request-params", routingHeaders)
|
||||
|
||||
ctx = insertMetadata(ctx, c.xGoogMetadata, md)
|
||||
opts = append((*c.CallOptions).ListNotifications[0:len((*c.CallOptions).ListNotifications):len((*c.CallOptions).ListNotifications)], opts...)
|
||||
it := &NotificationIterator{}
|
||||
req = proto.Clone(req).(*storagepb.ListNotificationsRequest)
|
||||
it.InternalFetch = func(pageSize int, pageToken string) ([]*storagepb.Notification, string, error) {
|
||||
resp := &storagepb.ListNotificationsResponse{}
|
||||
opts = append((*c.CallOptions).ListNotificationConfigs[0:len((*c.CallOptions).ListNotificationConfigs):len((*c.CallOptions).ListNotificationConfigs)], opts...)
|
||||
it := &NotificationConfigIterator{}
|
||||
req = proto.Clone(req).(*storagepb.ListNotificationConfigsRequest)
|
||||
it.InternalFetch = func(pageSize int, pageToken string) ([]*storagepb.NotificationConfig, string, error) {
|
||||
resp := &storagepb.ListNotificationConfigsResponse{}
|
||||
if pageToken != "" {
|
||||
req.PageToken = pageToken
|
||||
}
|
||||
|
|
@ -909,7 +922,7 @@ func (c *gRPCClient) ListNotifications(ctx context.Context, req *storagepb.ListN
|
|||
}
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.client.ListNotifications(ctx, req, settings.GRPC...)
|
||||
resp, err = c.client.ListNotificationConfigs(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
|
|
@ -917,7 +930,7 @@ func (c *gRPCClient) ListNotifications(ctx context.Context, req *storagepb.ListN
|
|||
}
|
||||
|
||||
it.Response = resp
|
||||
return resp.GetNotifications(), resp.GetNextPageToken(), nil
|
||||
return resp.GetNotificationConfigs(), resp.GetNextPageToken(), nil
|
||||
}
|
||||
fetch := func(pageSize int, pageToken string) (string, error) {
|
||||
items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
|
||||
|
|
@ -1048,6 +1061,7 @@ func (c *gRPCClient) ReadObject(ctx context.Context, req *storagepb.ReadObjectRe
|
|||
md := metadata.Pairs("x-goog-request-params", routingHeaders)
|
||||
|
||||
ctx = insertMetadata(ctx, c.xGoogMetadata, md)
|
||||
opts = append((*c.CallOptions).ReadObject[0:len((*c.CallOptions).ReadObject):len((*c.CallOptions).ReadObject)], opts...)
|
||||
var resp storagepb.Storage_ReadObjectClient
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
|
|
@ -1510,9 +1524,9 @@ func (it *HmacKeyMetadataIterator) takeBuf() interface{} {
|
|||
return b
|
||||
}
|
||||
|
||||
// NotificationIterator manages a stream of *storagepb.Notification.
|
||||
type NotificationIterator struct {
|
||||
items []*storagepb.Notification
|
||||
// NotificationConfigIterator manages a stream of *storagepb.NotificationConfig.
|
||||
type NotificationConfigIterator struct {
|
||||
items []*storagepb.NotificationConfig
|
||||
pageInfo *iterator.PageInfo
|
||||
nextFunc func() error
|
||||
|
||||
|
|
@ -1527,18 +1541,18 @@ type NotificationIterator struct {
|
|||
// InternalFetch returns results from a single call to the underlying RPC.
|
||||
// The number of results is no greater than pageSize.
|
||||
// If there are no more results, nextPageToken is empty and err is nil.
|
||||
InternalFetch func(pageSize int, pageToken string) (results []*storagepb.Notification, nextPageToken string, err error)
|
||||
InternalFetch func(pageSize int, pageToken string) (results []*storagepb.NotificationConfig, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NotificationIterator) PageInfo() *iterator.PageInfo {
|
||||
func (it *NotificationConfigIterator) PageInfo() *iterator.PageInfo {
|
||||
return it.pageInfo
|
||||
}
|
||||
|
||||
// Next returns the next result. Its second return value is iterator.Done if there are no more
|
||||
// results. Once Next returns Done, all subsequent calls will return Done.
|
||||
func (it *NotificationIterator) Next() (*storagepb.Notification, error) {
|
||||
var item *storagepb.Notification
|
||||
func (it *NotificationConfigIterator) Next() (*storagepb.NotificationConfig, error) {
|
||||
var item *storagepb.NotificationConfig
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
|
|
@ -1547,11 +1561,11 @@ func (it *NotificationIterator) Next() (*storagepb.Notification, error) {
|
|||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NotificationIterator) bufLen() int {
|
||||
func (it *NotificationConfigIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NotificationIterator) takeBuf() interface{} {
|
||||
func (it *NotificationConfigIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
|
|
|
|||
3809
vendor/cloud.google.com/go/storage/internal/apiv2/stubs/storage.pb.go
generated
vendored
3809
vendor/cloud.google.com/go/storage/internal/apiv2/stubs/storage.pb.go
generated
vendored
File diff suppressed because it is too large
Load diff
2
vendor/cloud.google.com/go/storage/internal/apiv2/version.go
generated
vendored
2
vendor/cloud.google.com/go/storage/internal/apiv2/version.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2022 Google LLC
|
||||
// Copyright 2023 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
|
|||
2
vendor/cloud.google.com/go/storage/internal/version.go
generated
vendored
2
vendor/cloud.google.com/go/storage/internal/version.go
generated
vendored
|
|
@ -15,4 +15,4 @@
|
|||
package internal
|
||||
|
||||
// Version is the current tagged release of the library.
|
||||
const Version = "1.28.1"
|
||||
const Version = "1.30.1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue