package secretmanager

Import Path
	cloud.google.com/go/secretmanager/apiv1 (on go.dev)

Dependency Relation
	imports 21 packages, and imported by one package

Involved Source Files Package secretmanager is an auto-generated package for the Secret Manager API. Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security. Use of Context The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. 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 pkg.go.dev/cloud.google.com/go. iam.go secret_manager_client.go
Package-Level Type Names (total 6, in which 4 are exported)
/* sort exporteds by: | */
CallOptions contains the retry settings for each method of Client. AccessSecretVersion []gax.CallOption AddSecretVersion []gax.CallOption CreateSecret []gax.CallOption DeleteSecret []gax.CallOption DestroySecretVersion []gax.CallOption DisableSecretVersion []gax.CallOption EnableSecretVersion []gax.CallOption GetIamPolicy []gax.CallOption GetSecret []gax.CallOption GetSecretVersion []gax.CallOption ListSecretVersions []gax.CallOption ListSecrets []gax.CallOption SetIamPolicy []gax.CallOption TestIamPermissions []gax.CallOption UpdateSecret []gax.CallOption
Client is a client for interacting with Secret Manager API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. The call options for this service. AccessSecretVersion accesses a SecretVersion. This call returns the secret data. projects/*/secrets/*/versions/latest is an alias to the latest SecretVersion. AddSecretVersion creates a new SecretVersion containing secret data and attaches it to an existing Secret. Close closes the connection to the API service. The user should invoke this when the client is no longer required. Connection returns a connection to the API service. Deprecated. CreateSecret creates a new Secret containing no SecretVersions. DeleteSecret deletes a Secret. DestroySecretVersion destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data. DisableSecretVersion disables a SecretVersion. Sets the state of the SecretVersion to DISABLED. EnableSecretVersion enables a SecretVersion. Sets the state of the SecretVersion to ENABLED. GetIamPolicy gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set. GetSecret gets metadata for a given Secret. GetSecretVersion gets metadata for a SecretVersion. projects/*/secrets/*/versions/latest is an alias to the latest SecretVersion. IAM returns a handle to inspect and change permissions of the resource indicated by the given resource path. Name should be of the format `projects/my-project/secrets/my-secret`. ListSecretVersions lists SecretVersions. This call does not return secret data. ListSecrets lists Secrets. SetIamPolicy sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret. TestIamPermissions returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning. UpdateSecret updates metadata of an existing Secret. *T : io.Closer func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)
SecretIterator manages a stream of *secretmanagerpb.Secret. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. 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. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. 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. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*Client).ListSecrets(ctx context.Context, req *secretmanagerpb.ListSecretsRequest, opts ...gax.CallOption) *SecretIterator
SecretVersionIterator manages a stream of *secretmanagerpb.SecretVersion. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. 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. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. 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. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*Client).ListSecretVersions(ctx context.Context, req *secretmanagerpb.ListSecretVersionsRequest, opts ...gax.CallOption) *SecretVersionIterator
Package-Level Functions (total 7, in which 2 are exported)
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
NewClient creates a new secret manager service client. Secret Manager Service Manages secrets and operations using those secrets. Implements a REST model with the following objects: Secret SecretVersion
Package-Level Variables (only one, which is unexported)
Package-Level Constants (only one, which is unexported)