vendor: update all dependencies
This commit is contained in:
+74
-74
@@ -59,10 +59,7 @@ type IamCallOptions struct {
|
||||
func defaultIamClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
option.WithEndpoint("iam.googleapis.com:443"),
|
||||
option.WithScopes(
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/iam",
|
||||
),
|
||||
option.WithScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,17 +77,6 @@ func defaultIamCallOptions() *IamCallOptions {
|
||||
})
|
||||
}),
|
||||
},
|
||||
{"default", "non_idempotent"}: {
|
||||
gax.WithRetry(func() gax.Retryer {
|
||||
return gax.OnCodes([]codes.Code{
|
||||
codes.Unavailable,
|
||||
}, gax.Backoff{
|
||||
Initial: 100 * time.Millisecond,
|
||||
Max: 60000 * time.Millisecond,
|
||||
Multiplier: 1.3,
|
||||
})
|
||||
}),
|
||||
},
|
||||
}
|
||||
return &IamCallOptions{
|
||||
ListServiceAccounts: retry[[2]string{"default", "idempotent"}],
|
||||
@@ -122,7 +108,7 @@ type IamClient struct {
|
||||
CallOptions *IamCallOptions
|
||||
|
||||
// The metadata to be sent with each request.
|
||||
xGoogHeader string
|
||||
xGoogHeader []string
|
||||
}
|
||||
|
||||
// NewIamClient creates a new iam client.
|
||||
@@ -174,8 +160,8 @@ func (c *IamClient) Close() error {
|
||||
// use by Google-written clients.
|
||||
func (c *IamClient) SetGoogleClientInfo(keyval ...string) {
|
||||
kv := append([]string{"gl-go", version.Go()}, keyval...)
|
||||
kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", "")
|
||||
c.xGoogHeader = gax.XGoogHeader(kv...)
|
||||
kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
|
||||
c.xGoogHeader = []string{gax.XGoogHeader(kv...)}
|
||||
}
|
||||
|
||||
// IamProjectPath returns the path for the project resource.
|
||||
@@ -215,8 +201,9 @@ func IamKeyPath(project, serviceAccount, key string) string {
|
||||
}
|
||||
|
||||
// ListServiceAccounts lists [ServiceAccounts][google.iam.admin.v1.ServiceAccount] for a project.
|
||||
func (c *IamClient) ListServiceAccounts(ctx context.Context, req *adminpb.ListServiceAccountsRequest) *ServiceAccountIterator {
|
||||
func (c *IamClient) ListServiceAccounts(ctx context.Context, req *adminpb.ListServiceAccountsRequest, opts ...gax.CallOption) *ServiceAccountIterator {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.ListServiceAccounts[0:len(c.CallOptions.ListServiceAccounts):len(c.CallOptions.ListServiceAccounts)], opts...)
|
||||
it := &ServiceAccountIterator{}
|
||||
it.InternalFetch = func(pageSize int, pageToken string) ([]*adminpb.ServiceAccount, string, error) {
|
||||
var resp *adminpb.ListServiceAccountsResponse
|
||||
@@ -226,11 +213,11 @@ func (c *IamClient) ListServiceAccounts(ctx context.Context, req *adminpb.ListSe
|
||||
} else {
|
||||
req.PageSize = int32(pageSize)
|
||||
}
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.iamClient.ListServiceAccounts(ctx, req)
|
||||
resp, err = c.iamClient.ListServiceAccounts(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.ListServiceAccounts...)
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
@@ -249,14 +236,15 @@ func (c *IamClient) ListServiceAccounts(ctx context.Context, req *adminpb.ListSe
|
||||
}
|
||||
|
||||
// GetServiceAccount gets a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
|
||||
func (c *IamClient) GetServiceAccount(ctx context.Context, req *adminpb.GetServiceAccountRequest) (*adminpb.ServiceAccount, error) {
|
||||
func (c *IamClient) GetServiceAccount(ctx context.Context, req *adminpb.GetServiceAccountRequest, opts ...gax.CallOption) (*adminpb.ServiceAccount, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.GetServiceAccount[0:len(c.CallOptions.GetServiceAccount):len(c.CallOptions.GetServiceAccount)], opts...)
|
||||
var resp *adminpb.ServiceAccount
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.iamClient.GetServiceAccount(ctx, req)
|
||||
resp, err = c.iamClient.GetServiceAccount(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.GetServiceAccount...)
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -265,14 +253,15 @@ func (c *IamClient) GetServiceAccount(ctx context.Context, req *adminpb.GetServi
|
||||
|
||||
// CreateServiceAccount creates a [ServiceAccount][google.iam.admin.v1.ServiceAccount]
|
||||
// and returns it.
|
||||
func (c *IamClient) CreateServiceAccount(ctx context.Context, req *adminpb.CreateServiceAccountRequest) (*adminpb.ServiceAccount, error) {
|
||||
func (c *IamClient) CreateServiceAccount(ctx context.Context, req *adminpb.CreateServiceAccountRequest, opts ...gax.CallOption) (*adminpb.ServiceAccount, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.CreateServiceAccount[0:len(c.CallOptions.CreateServiceAccount):len(c.CallOptions.CreateServiceAccount)], opts...)
|
||||
var resp *adminpb.ServiceAccount
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.iamClient.CreateServiceAccount(ctx, req)
|
||||
resp, err = c.iamClient.CreateServiceAccount(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.CreateServiceAccount...)
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -284,14 +273,15 @@ func (c *IamClient) CreateServiceAccount(ctx context.Context, req *adminpb.Creat
|
||||
// Currently, only the following fields are updatable:
|
||||
// `display_name` .
|
||||
// The `etag` is mandatory.
|
||||
func (c *IamClient) UpdateServiceAccount(ctx context.Context, req *adminpb.ServiceAccount) (*adminpb.ServiceAccount, error) {
|
||||
func (c *IamClient) UpdateServiceAccount(ctx context.Context, req *adminpb.ServiceAccount, opts ...gax.CallOption) (*adminpb.ServiceAccount, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.UpdateServiceAccount[0:len(c.CallOptions.UpdateServiceAccount):len(c.CallOptions.UpdateServiceAccount)], opts...)
|
||||
var resp *adminpb.ServiceAccount
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.iamClient.UpdateServiceAccount(ctx, req)
|
||||
resp, err = c.iamClient.UpdateServiceAccount(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.UpdateServiceAccount...)
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -299,25 +289,27 @@ func (c *IamClient) UpdateServiceAccount(ctx context.Context, req *adminpb.Servi
|
||||
}
|
||||
|
||||
// DeleteServiceAccount deletes a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
|
||||
func (c *IamClient) DeleteServiceAccount(ctx context.Context, req *adminpb.DeleteServiceAccountRequest) error {
|
||||
func (c *IamClient) DeleteServiceAccount(ctx context.Context, req *adminpb.DeleteServiceAccountRequest, opts ...gax.CallOption) error {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
opts = append(c.CallOptions.DeleteServiceAccount[0:len(c.CallOptions.DeleteServiceAccount):len(c.CallOptions.DeleteServiceAccount)], opts...)
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
_, err = c.iamClient.DeleteServiceAccount(ctx, req)
|
||||
_, err = c.iamClient.DeleteServiceAccount(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.DeleteServiceAccount...)
|
||||
}, opts...)
|
||||
return err
|
||||
}
|
||||
|
||||
// ListServiceAccountKeys lists [ServiceAccountKeys][google.iam.admin.v1.ServiceAccountKey].
|
||||
func (c *IamClient) ListServiceAccountKeys(ctx context.Context, req *adminpb.ListServiceAccountKeysRequest) (*adminpb.ListServiceAccountKeysResponse, error) {
|
||||
func (c *IamClient) ListServiceAccountKeys(ctx context.Context, req *adminpb.ListServiceAccountKeysRequest, opts ...gax.CallOption) (*adminpb.ListServiceAccountKeysResponse, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.ListServiceAccountKeys[0:len(c.CallOptions.ListServiceAccountKeys):len(c.CallOptions.ListServiceAccountKeys)], opts...)
|
||||
var resp *adminpb.ListServiceAccountKeysResponse
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.iamClient.ListServiceAccountKeys(ctx, req)
|
||||
resp, err = c.iamClient.ListServiceAccountKeys(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.ListServiceAccountKeys...)
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -326,14 +318,15 @@ func (c *IamClient) ListServiceAccountKeys(ctx context.Context, req *adminpb.Lis
|
||||
|
||||
// GetServiceAccountKey gets the [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]
|
||||
// by key id.
|
||||
func (c *IamClient) GetServiceAccountKey(ctx context.Context, req *adminpb.GetServiceAccountKeyRequest) (*adminpb.ServiceAccountKey, error) {
|
||||
func (c *IamClient) GetServiceAccountKey(ctx context.Context, req *adminpb.GetServiceAccountKeyRequest, opts ...gax.CallOption) (*adminpb.ServiceAccountKey, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.GetServiceAccountKey[0:len(c.CallOptions.GetServiceAccountKey):len(c.CallOptions.GetServiceAccountKey)], opts...)
|
||||
var resp *adminpb.ServiceAccountKey
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.iamClient.GetServiceAccountKey(ctx, req)
|
||||
resp, err = c.iamClient.GetServiceAccountKey(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.GetServiceAccountKey...)
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -342,14 +335,15 @@ func (c *IamClient) GetServiceAccountKey(ctx context.Context, req *adminpb.GetSe
|
||||
|
||||
// CreateServiceAccountKey creates a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]
|
||||
// and returns it.
|
||||
func (c *IamClient) CreateServiceAccountKey(ctx context.Context, req *adminpb.CreateServiceAccountKeyRequest) (*adminpb.ServiceAccountKey, error) {
|
||||
func (c *IamClient) CreateServiceAccountKey(ctx context.Context, req *adminpb.CreateServiceAccountKeyRequest, opts ...gax.CallOption) (*adminpb.ServiceAccountKey, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.CreateServiceAccountKey[0:len(c.CallOptions.CreateServiceAccountKey):len(c.CallOptions.CreateServiceAccountKey)], opts...)
|
||||
var resp *adminpb.ServiceAccountKey
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.iamClient.CreateServiceAccountKey(ctx, req)
|
||||
resp, err = c.iamClient.CreateServiceAccountKey(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.CreateServiceAccountKey...)
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -357,25 +351,27 @@ func (c *IamClient) CreateServiceAccountKey(ctx context.Context, req *adminpb.Cr
|
||||
}
|
||||
|
||||
// DeleteServiceAccountKey deletes a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey].
|
||||
func (c *IamClient) DeleteServiceAccountKey(ctx context.Context, req *adminpb.DeleteServiceAccountKeyRequest) error {
|
||||
func (c *IamClient) DeleteServiceAccountKey(ctx context.Context, req *adminpb.DeleteServiceAccountKeyRequest, opts ...gax.CallOption) error {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
opts = append(c.CallOptions.DeleteServiceAccountKey[0:len(c.CallOptions.DeleteServiceAccountKey):len(c.CallOptions.DeleteServiceAccountKey)], opts...)
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
_, err = c.iamClient.DeleteServiceAccountKey(ctx, req)
|
||||
_, err = c.iamClient.DeleteServiceAccountKey(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.DeleteServiceAccountKey...)
|
||||
}, opts...)
|
||||
return err
|
||||
}
|
||||
|
||||
// SignBlob signs a blob using a service account's system-managed private key.
|
||||
func (c *IamClient) SignBlob(ctx context.Context, req *adminpb.SignBlobRequest) (*adminpb.SignBlobResponse, error) {
|
||||
func (c *IamClient) SignBlob(ctx context.Context, req *adminpb.SignBlobRequest, opts ...gax.CallOption) (*adminpb.SignBlobResponse, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.SignBlob[0:len(c.CallOptions.SignBlob):len(c.CallOptions.SignBlob)], opts...)
|
||||
var resp *adminpb.SignBlobResponse
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.iamClient.SignBlob(ctx, req)
|
||||
resp, err = c.iamClient.SignBlob(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.SignBlob...)
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -384,14 +380,15 @@ func (c *IamClient) SignBlob(ctx context.Context, req *adminpb.SignBlobRequest)
|
||||
|
||||
// getIamPolicy returns the IAM access control policy for a
|
||||
// [ServiceAccount][google.iam.admin.v1.ServiceAccount].
|
||||
func (c *IamClient) getIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest) (*iampb.Policy, error) {
|
||||
func (c *IamClient) getIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.GetIamPolicy[0:len(c.CallOptions.GetIamPolicy):len(c.CallOptions.GetIamPolicy)], opts...)
|
||||
var resp *iampb.Policy
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.iamClient.GetIamPolicy(ctx, req)
|
||||
resp, err = c.iamClient.GetIamPolicy(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.GetIamPolicy...)
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -400,14 +397,15 @@ func (c *IamClient) getIamPolicy(ctx context.Context, req *iampb.GetIamPolicyReq
|
||||
|
||||
// setIamPolicy sets the IAM access control policy for a
|
||||
// [ServiceAccount][google.iam.admin.v1.ServiceAccount].
|
||||
func (c *IamClient) setIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest) (*iampb.Policy, error) {
|
||||
func (c *IamClient) setIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.SetIamPolicy[0:len(c.CallOptions.SetIamPolicy):len(c.CallOptions.SetIamPolicy)], opts...)
|
||||
var resp *iampb.Policy
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.iamClient.SetIamPolicy(ctx, req)
|
||||
resp, err = c.iamClient.SetIamPolicy(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.SetIamPolicy...)
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -416,14 +414,15 @@ func (c *IamClient) setIamPolicy(ctx context.Context, req *iampb.SetIamPolicyReq
|
||||
|
||||
// TestIamPermissions tests the specified permissions against the IAM access control policy
|
||||
// for a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
|
||||
func (c *IamClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) {
|
||||
func (c *IamClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.TestIamPermissions[0:len(c.CallOptions.TestIamPermissions):len(c.CallOptions.TestIamPermissions)], opts...)
|
||||
var resp *iampb.TestIamPermissionsResponse
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.iamClient.TestIamPermissions(ctx, req)
|
||||
resp, err = c.iamClient.TestIamPermissions(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.TestIamPermissions...)
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -433,14 +432,15 @@ func (c *IamClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPe
|
||||
// QueryGrantableRoles queries roles that can be granted on a particular resource.
|
||||
// A role is grantable if it can be used as the role in a binding for a policy
|
||||
// for that resource.
|
||||
func (c *IamClient) QueryGrantableRoles(ctx context.Context, req *adminpb.QueryGrantableRolesRequest) (*adminpb.QueryGrantableRolesResponse, error) {
|
||||
func (c *IamClient) QueryGrantableRoles(ctx context.Context, req *adminpb.QueryGrantableRolesRequest, opts ...gax.CallOption) (*adminpb.QueryGrantableRolesResponse, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.QueryGrantableRoles[0:len(c.CallOptions.QueryGrantableRoles):len(c.CallOptions.QueryGrantableRoles)], opts...)
|
||||
var resp *adminpb.QueryGrantableRolesResponse
|
||||
err := gax.Invoke(ctx, func(ctx context.Context) error {
|
||||
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
var err error
|
||||
resp, err = c.iamClient.QueryGrantableRoles(ctx, req)
|
||||
resp, err = c.iamClient.QueryGrantableRoles(ctx, req, settings.GRPC...)
|
||||
return err
|
||||
}, c.CallOptions.QueryGrantableRoles...)
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user