mirror of
https://github.com/restic/restic.git
synced 2025-10-27 12:18:35 +00:00
Update dependencies
This commit is contained in:
3
vendor/cloud.google.com/go/iam/admin/apiv1/doc.go
generated
vendored
3
vendor/cloud.google.com/go/iam/admin/apiv1/doc.go
generated
vendored
@@ -34,8 +34,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context {
|
||||
return metadata.NewOutgoingContext(ctx, md)
|
||||
}
|
||||
|
||||
// DefaultAuthScopes reports the authentication scopes required
|
||||
// by this package.
|
||||
// DefaultAuthScopes reports the default set of authentication scopes to use with this package.
|
||||
func DefaultAuthScopes() []string {
|
||||
return []string{
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
|
||||
72
vendor/cloud.google.com/go/iam/admin/apiv1/iam_client.go
generated
vendored
72
vendor/cloud.google.com/go/iam/admin/apiv1/iam_client.go
generated
vendored
@@ -32,12 +32,6 @@ import (
|
||||
"google.golang.org/grpc/codes"
|
||||
)
|
||||
|
||||
var (
|
||||
iamProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}")
|
||||
iamServiceAccountPathTemplate = gax.MustCompilePathTemplate("projects/{project}/serviceAccounts/{service_account}")
|
||||
iamKeyPathTemplate = gax.MustCompilePathTemplate("projects/{project}/serviceAccounts/{service_account}/keys/{key}")
|
||||
)
|
||||
|
||||
// IamCallOptions contains the retry settings for each method of IamClient.
|
||||
type IamCallOptions struct {
|
||||
ListServiceAccounts []gax.CallOption
|
||||
@@ -119,16 +113,16 @@ type IamClient struct {
|
||||
// of to an individual end user. It is used to authenticate calls
|
||||
// to a Google API.
|
||||
//
|
||||
// To create a service account, specify the `project_id` and `account_id`
|
||||
// for the account. The `account_id` is unique within the project, and used
|
||||
// To create a service account, specify the project_id and account_id
|
||||
// for the account. The account_id is unique within the project, and used
|
||||
// to generate the service account email address and a stable
|
||||
// `unique_id`.
|
||||
// unique_id.
|
||||
//
|
||||
// All other methods can identify accounts using the format
|
||||
// `projects/{project}/serviceAccounts/{account}`.
|
||||
// Using `-` as a wildcard for the project will infer the project from
|
||||
// the account. The `account` value can be the `email` address or the
|
||||
// `unique_id` of the service account.
|
||||
// projects/{project}/serviceAccounts/{account}.
|
||||
// Using - as a wildcard for the project will infer the project from
|
||||
// the account. The account value can be the email address or the
|
||||
// unique_id of the service account.
|
||||
func NewIamClient(ctx context.Context, opts ...option.ClientOption) (*IamClient, error) {
|
||||
conn, err := transport.DialGRPC(ctx, append(defaultIamClientOptions(), opts...)...)
|
||||
if err != nil {
|
||||
@@ -140,7 +134,7 @@ func NewIamClient(ctx context.Context, opts ...option.ClientOption) (*IamClient,
|
||||
|
||||
iamClient: adminpb.NewIAMClient(conn),
|
||||
}
|
||||
c.SetGoogleClientInfo()
|
||||
c.setGoogleClientInfo()
|
||||
return c, nil
|
||||
}
|
||||
|
||||
@@ -155,10 +149,10 @@ func (c *IamClient) Close() error {
|
||||
return c.conn.Close()
|
||||
}
|
||||
|
||||
// SetGoogleClientInfo sets the name and version of the application in
|
||||
// setGoogleClientInfo sets the name and version of the application in
|
||||
// the `x-goog-api-client` header passed on each request. Intended for
|
||||
// use by Google-written clients.
|
||||
func (c *IamClient) SetGoogleClientInfo(keyval ...string) {
|
||||
func (c *IamClient) setGoogleClientInfo(keyval ...string) {
|
||||
kv := append([]string{"gl-go", version.Go()}, keyval...)
|
||||
kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
|
||||
c.xGoogHeader = []string{gax.XGoogHeader(kv...)}
|
||||
@@ -166,38 +160,32 @@ func (c *IamClient) SetGoogleClientInfo(keyval ...string) {
|
||||
|
||||
// IamProjectPath returns the path for the project resource.
|
||||
func IamProjectPath(project string) string {
|
||||
path, err := iamProjectPathTemplate.Render(map[string]string{
|
||||
"project": project,
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return path
|
||||
return "" +
|
||||
"projects/" +
|
||||
project +
|
||||
""
|
||||
}
|
||||
|
||||
// IamServiceAccountPath returns the path for the service account resource.
|
||||
func IamServiceAccountPath(project, serviceAccount string) string {
|
||||
path, err := iamServiceAccountPathTemplate.Render(map[string]string{
|
||||
"project": project,
|
||||
"service_account": serviceAccount,
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return path
|
||||
return "" +
|
||||
"projects/" +
|
||||
project +
|
||||
"/serviceAccounts/" +
|
||||
serviceAccount +
|
||||
""
|
||||
}
|
||||
|
||||
// IamKeyPath returns the path for the key resource.
|
||||
func IamKeyPath(project, serviceAccount, key string) string {
|
||||
path, err := iamKeyPathTemplate.Render(map[string]string{
|
||||
"project": project,
|
||||
"service_account": serviceAccount,
|
||||
"key": key,
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return path
|
||||
return "" +
|
||||
"projects/" +
|
||||
project +
|
||||
"/serviceAccounts/" +
|
||||
serviceAccount +
|
||||
"/keys/" +
|
||||
key +
|
||||
""
|
||||
}
|
||||
|
||||
// ListServiceAccounts lists [ServiceAccounts][google.iam.admin.v1.ServiceAccount] for a project.
|
||||
@@ -271,8 +259,8 @@ func (c *IamClient) CreateServiceAccount(ctx context.Context, req *adminpb.Creat
|
||||
// UpdateServiceAccount updates a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
|
||||
//
|
||||
// Currently, only the following fields are updatable:
|
||||
// `display_name` .
|
||||
// The `etag` is mandatory.
|
||||
// display_name .
|
||||
// The etag is mandatory.
|
||||
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...)
|
||||
|
||||
Reference in New Issue
Block a user