Package securesourcemanager is an auto-generated package for the Secure Source Manager API.
Regionally deployed, single-tenant managed source code repository hosted on Google Cloud.
General documentation
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client
The following is an example of making an API call with the newly created client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &securesourcemanagerpb.CreateBranchRuleRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreateBranchRuleRequest. } op, err := c.CreateBranchRule(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
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.
Functions
func DefaultAuthScopes
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
BranchRuleIterator
type BranchRuleIterator struct {
// 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.
Response interface{}
// 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.
InternalFetch func(pageSize int, pageToken string) (results []*securesourcemanagerpb.BranchRule, nextPageToken string, err error)
// contains filtered or unexported fields
}
BranchRuleIterator manages a stream of *securesourcemanagerpb.BranchRule.
func (*BranchRuleIterator) All
func (it *BranchRuleIterator) All() iter.Seq2[*securesourcemanagerpb.BranchRule, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*BranchRuleIterator) Next
func (it *BranchRuleIterator) Next() (*securesourcemanagerpb.BranchRule, error)
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 (*BranchRuleIterator) PageInfo
func (it *BranchRuleIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
CallOptions
type CallOptions struct {
ListInstances []gax.CallOption
GetInstance []gax.CallOption
CreateInstance []gax.CallOption
DeleteInstance []gax.CallOption
ListRepositories []gax.CallOption
GetRepository []gax.CallOption
CreateRepository []gax.CallOption
DeleteRepository []gax.CallOption
GetIamPolicyRepo []gax.CallOption
SetIamPolicyRepo []gax.CallOption
TestIamPermissionsRepo []gax.CallOption
CreateBranchRule []gax.CallOption
ListBranchRules []gax.CallOption
GetBranchRule []gax.CallOption
UpdateBranchRule []gax.CallOption
DeleteBranchRule []gax.CallOption
GetLocation []gax.CallOption
ListLocations []gax.CallOption
GetIamPolicy []gax.CallOption
SetIamPolicy []gax.CallOption
TestIamPermissions []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
CallOptions contains the retry settings for each method of Client.
Client
type Client struct {
// The call options for this service.
CallOptions *CallOptions
// LROClient is used internally to handle long-running operations.
// It is exposed so that its CallOptions can be modified if required.
// Users should not Close this client.
LROClient *lroauto.OperationsClient
// contains filtered or unexported fields
}
Client is a client for interacting with Secure Source Manager API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Secure Source Manager API
Access Secure Source Manager instances, resources, and repositories.
This API is split across two servers: the Control Plane and the Data Plane.
Data Plane endpoints are hosted directly by your Secure Source Manager instance, so you must connect to your instance’s API hostname to access them. The API hostname looks like the following:
For example,
Data Plane endpoints are denoted with Host: Data Plane.
All other endpoints are found in the normal Cloud API location, namely, securcesourcemanager.googleapis.com.
func NewClient
NewClient creates a new secure source manager client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Secure Source Manager API
Access Secure Source Manager instances, resources, and repositories.
This API is split across two servers: the Control Plane and the Data Plane.
Data Plane endpoints are hosted directly by your Secure Source Manager instance, so you must connect to your instance’s API hostname to access them. The API hostname looks like the following:
For example,
Data Plane endpoints are denoted with Host: Data Plane.
All other endpoints are found in the normal Cloud API location, namely, securcesourcemanager.googleapis.com.
Example
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewRESTClient
NewRESTClient creates a new secure source manager rest client.
Secure Source Manager API
Access Secure Source Manager instances, resources, and repositories.
This API is split across two servers: the Control Plane and the Data Plane.
Data Plane endpoints are hosted directly by your Secure Source Manager instance, so you must connect to your instance’s API hostname to access them. The API hostname looks like the following:
For example,
Data Plane endpoints are denoted with Host: Data Plane.
All other endpoints are found in the normal Cloud API location, namely, securcesourcemanager.googleapis.com.
Example
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*Client) CancelOperation
func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) Close
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) Connection (deprecated)
func (c *Client) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*Client) CreateBranchRule
func (c *Client) CreateBranchRule(ctx context.Context, req *securesourcemanagerpb.CreateBranchRuleRequest, opts ...gax.CallOption) (*CreateBranchRuleOperation, error)
CreateBranchRule createBranchRule creates a branch rule in a given repository.
Example
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.CreateBranchRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreateBranchRuleRequest.
}
op, err := c.CreateBranchRule(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateBranchRuleOperation
func (c *Client) CreateBranchRuleOperation(name string) *CreateBranchRuleOperation
CreateBranchRuleOperation returns a new CreateBranchRuleOperation from a given name. The name must be that of a previously created CreateBranchRuleOperation, possibly from a different process.
func (*Client) CreateInstance
func (c *Client) CreateInstance(ctx context.Context, req *securesourcemanagerpb.CreateInstanceRequest, opts ...gax.CallOption) (*CreateInstanceOperation, error)
CreateInstance creates a new instance in a given project and location.
Example
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.CreateInstanceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreateInstanceRequest.
}
op, err := c.CreateInstance(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateInstanceOperation
func (c *Client) CreateInstanceOperation(name string) *CreateInstanceOperation
CreateInstanceOperation returns a new CreateInstanceOperation from a given name. The name must be that of a previously created CreateInstanceOperation, possibly from a different process.
func (*Client) CreateRepository
func (c *Client) CreateRepository(ctx context.Context, req *securesourcemanagerpb.CreateRepositoryRequest, opts ...gax.CallOption) (*CreateRepositoryOperation, error)
CreateRepository creates a new repository in a given project and location.
Host: Data Plane
Example
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.CreateRepositoryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreateRepositoryRequest.
}
op, err := c.CreateRepository(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateRepositoryOperation
func (c *Client) CreateRepositoryOperation(name string) *CreateRepositoryOperation
CreateRepositoryOperation returns a new CreateRepositoryOperation from a given name. The name must be that of a previously created CreateRepositoryOperation, possibly from a different process.
func (*Client) DeleteBranchRule
func (c *Client) DeleteBranchRule(ctx context.Context, req *securesourcemanagerpb.DeleteBranchRuleRequest, opts ...gax.CallOption) (*DeleteBranchRuleOperation, error)
DeleteBranchRule deleteBranchRule deletes a branch rule.
Example
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.DeleteBranchRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#DeleteBranchRuleRequest.
}
op, err := c.DeleteBranchRule(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteBranchRuleOperation
func (c *Client) DeleteBranchRuleOperation(name string) *DeleteBranchRuleOperation
DeleteBranchRuleOperation returns a new DeleteBranchRuleOperation from a given name. The name must be that of a previously created DeleteBranchRuleOperation, possibly from a different process.
func (*Client) DeleteInstance
func (c *Client) DeleteInstance(ctx context.Context, req *securesourcemanagerpb.DeleteInstanceRequest, opts ...gax.CallOption) (*DeleteInstanceOperation, error)
DeleteInstance deletes a single instance.
Example
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.DeleteInstanceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#DeleteInstanceRequest.
}
op, err := c.DeleteInstance(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteInstanceOperation
func (c *Client) DeleteInstanceOperation(name string) *DeleteInstanceOperation
DeleteInstanceOperation returns a new DeleteInstanceOperation from a given name. The name must be that of a previously created DeleteInstanceOperation, possibly from a different process.
func (*Client) DeleteOperation
func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.DeleteOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
}
err = c.DeleteOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteRepository
func (c *Client) DeleteRepository(ctx context.Context, req *securesourcemanagerpb.DeleteRepositoryRequest, opts ...gax.CallOption) (*DeleteRepositoryOperation, error)
DeleteRepository deletes a Repository.
Host: Data Plane
Example
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.DeleteRepositoryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#DeleteRepositoryRequest.
}
op, err := c.DeleteRepository(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteRepositoryOperation
func (c *Client) DeleteRepositoryOperation(name string) *DeleteRepositoryOperation
DeleteRepositoryOperation returns a new DeleteRepositoryOperation from a given name. The name must be that of a previously created DeleteRepositoryOperation, possibly from a different process.
func (*Client) GetBranchRule
func (c *Client) GetBranchRule(ctx context.Context, req *securesourcemanagerpb.GetBranchRuleRequest, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
GetBranchRule getBranchRule gets a branch rule.
Example
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.GetBranchRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#GetBranchRuleRequest.
}
resp, err := c.GetBranchRule(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetIamPolicy
func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.GetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.
}
resp, err := c.GetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetIamPolicyRepo
func (c *Client) GetIamPolicyRepo(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicyRepo get IAM policy for a repository.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.GetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.
}
resp, err := c.GetIamPolicyRepo(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetInstance
func (c *Client) GetInstance(ctx context.Context, req *securesourcemanagerpb.GetInstanceRequest, opts ...gax.CallOption) (*securesourcemanagerpb.Instance, error)
GetInstance gets details of a single instance.
Example
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.GetInstanceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#GetInstanceRequest.
}
resp, err := c.GetInstance(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetLocation
func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.GetLocationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
}
resp, err := c.GetLocation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetOperation
func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetRepository
func (c *Client) GetRepository(ctx context.Context, req *securesourcemanagerpb.GetRepositoryRequest, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
GetRepository gets metadata of a repository.
Host: Data Plane
Example
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.GetRepositoryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#GetRepositoryRequest.
}
resp, err := c.GetRepository(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ListBranchRules
func (c *Client) ListBranchRules(ctx context.Context, req *securesourcemanagerpb.ListBranchRulesRequest, opts ...gax.CallOption) *BranchRuleIterator
ListBranchRules listBranchRules lists branch rules in a given repository.
Examples
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListBranchRulesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListBranchRulesRequest.
}
it := c.ListBranchRules(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*securesourcemanagerpb.ListBranchRulesResponse)
}
}
all
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListBranchRulesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListBranchRulesRequest.
}
for resp, err := range c.ListBranchRules(ctx, req).All() {
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListInstances
func (c *Client) ListInstances(ctx context.Context, req *securesourcemanagerpb.ListInstancesRequest, opts ...gax.CallOption) *InstanceIterator
ListInstances lists Instances in a given project and location.
Examples
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListInstancesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListInstancesRequest.
}
it := c.ListInstances(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*securesourcemanagerpb.ListInstancesResponse)
}
}
all
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListInstancesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListInstancesRequest.
}
for resp, err := range c.ListInstances(ctx, req).All() {
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListLocations
func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Examples
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
"google.golang.org/api/iterator"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
it := c.ListLocations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*locationpb.ListLocationsResponse)
}
}
all
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
for resp, err := range c.ListLocations(ctx, req).All() {
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListOperations
func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
all
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
for resp, err := range c.ListOperations(ctx, req).All() {
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListRepositories
func (c *Client) ListRepositories(ctx context.Context, req *securesourcemanagerpb.ListRepositoriesRequest, opts ...gax.CallOption) *RepositoryIterator
ListRepositories lists Repositories in a given project and location.
Host: Data Plane
Examples
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListRepositoriesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListRepositoriesRequest.
}
it := c.ListRepositories(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*securesourcemanagerpb.ListRepositoriesResponse)
}
}
all
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListRepositoriesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListRepositoriesRequest.
}
for resp, err := range c.ListRepositories(ctx, req).All() {
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) SetIamPolicy
func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.SetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.
}
resp, err := c.SetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) SetIamPolicyRepo
func (c *Client) SetIamPolicyRepo(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicyRepo set IAM policy on a repository.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.SetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.
}
resp, err := c.SetIamPolicyRepo(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) TestIamPermissions
func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return 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.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.TestIamPermissionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.
}
resp, err := c.TestIamPermissions(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) TestIamPermissionsRepo
func (c *Client) TestIamPermissionsRepo(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissionsRepo test IAM permissions on a repository. IAM permission checks are not required on this method.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.TestIamPermissionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.
}
resp, err := c.TestIamPermissionsRepo(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateBranchRule
func (c *Client) UpdateBranchRule(ctx context.Context, req *securesourcemanagerpb.UpdateBranchRuleRequest, opts ...gax.CallOption) (*UpdateBranchRuleOperation, error)
UpdateBranchRule updateBranchRule updates a branch rule.
Example
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.UpdateBranchRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#UpdateBranchRuleRequest.
}
op, err := c.UpdateBranchRule(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateBranchRuleOperation
func (c *Client) UpdateBranchRuleOperation(name string) *UpdateBranchRuleOperation
UpdateBranchRuleOperation returns a new UpdateBranchRuleOperation from a given name. The name must be that of a previously created UpdateBranchRuleOperation, possibly from a different process.
CreateBranchRuleOperation
type CreateBranchRuleOperation struct {
// contains filtered or unexported fields
}
CreateBranchRuleOperation manages a long-running operation from CreateBranchRule.
func (*CreateBranchRuleOperation) Done
func (op *CreateBranchRuleOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateBranchRuleOperation) Metadata
func (op *CreateBranchRuleOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateBranchRuleOperation) Name
func (op *CreateBranchRuleOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateBranchRuleOperation) Poll
func (op *CreateBranchRuleOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateBranchRuleOperation) Wait
func (op *CreateBranchRuleOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateInstanceOperation
type CreateInstanceOperation struct {
// contains filtered or unexported fields
}
CreateInstanceOperation manages a long-running operation from CreateInstance.
func (*CreateInstanceOperation) Done
func (op *CreateInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateInstanceOperation) Metadata
func (op *CreateInstanceOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateInstanceOperation) Name
func (op *CreateInstanceOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateInstanceOperation) Poll
func (op *CreateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Instance, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateInstanceOperation) Wait
func (op *CreateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Instance, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateRepositoryOperation
type CreateRepositoryOperation struct {
// contains filtered or unexported fields
}
CreateRepositoryOperation manages a long-running operation from CreateRepository.
func (*CreateRepositoryOperation) Done
func (op *CreateRepositoryOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateRepositoryOperation) Metadata
func (op *CreateRepositoryOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateRepositoryOperation) Name
func (op *CreateRepositoryOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateRepositoryOperation) Poll
func (op *CreateRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateRepositoryOperation) Wait
func (op *CreateRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteBranchRuleOperation
type DeleteBranchRuleOperation struct {
// contains filtered or unexported fields
}
DeleteBranchRuleOperation manages a long-running operation from DeleteBranchRule.
func (*DeleteBranchRuleOperation) Done
func (op *DeleteBranchRuleOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteBranchRuleOperation) Metadata
func (op *DeleteBranchRuleOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteBranchRuleOperation) Name
func (op *DeleteBranchRuleOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteBranchRuleOperation) Poll
func (op *DeleteBranchRuleOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteBranchRuleOperation) Wait
func (op *DeleteBranchRuleOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteInstanceOperation
type DeleteInstanceOperation struct {
// contains filtered or unexported fields
}
DeleteInstanceOperation manages a long-running operation from DeleteInstance.
func (*DeleteInstanceOperation) Done
func (op *DeleteInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteInstanceOperation) Metadata
func (op *DeleteInstanceOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteInstanceOperation) Name
func (op *DeleteInstanceOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteInstanceOperation) Poll
func (op *DeleteInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteInstanceOperation) Wait
func (op *DeleteInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteRepositoryOperation
type DeleteRepositoryOperation struct {
// contains filtered or unexported fields
}
DeleteRepositoryOperation manages a long-running operation from DeleteRepository.
func (*DeleteRepositoryOperation) Done
func (op *DeleteRepositoryOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteRepositoryOperation) Metadata
func (op *DeleteRepositoryOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteRepositoryOperation) Name
func (op *DeleteRepositoryOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteRepositoryOperation) Poll
func (op *DeleteRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteRepositoryOperation) Wait
func (op *DeleteRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
InstanceIterator
type InstanceIterator struct {
// 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.
Response interface{}
// 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.
InternalFetch func(pageSize int, pageToken string) (results []*securesourcemanagerpb.Instance, nextPageToken string, err error)
// contains filtered or unexported fields
}
InstanceIterator manages a stream of *securesourcemanagerpb.Instance.
func (*InstanceIterator) All
func (it *InstanceIterator) All() iter.Seq2[*securesourcemanagerpb.Instance, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*InstanceIterator) Next
func (it *InstanceIterator) Next() (*securesourcemanagerpb.Instance, error)
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 (*InstanceIterator) PageInfo
func (it *InstanceIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
LocationIterator
type LocationIterator struct {
// 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.
Response interface{}
// 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.
InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error)
// contains filtered or unexported fields
}
LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) All
func (it *LocationIterator) All() iter.Seq2[*locationpb.Location, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*LocationIterator) Next
func (it *LocationIterator) Next() (*locationpb.Location, error)
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 (*LocationIterator) PageInfo
func (it *LocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
OperationIterator
type OperationIterator struct {
// 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.
Response interface{}
// 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.
InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
// contains filtered or unexported fields
}
OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All
func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*OperationIterator) Next
func (it *OperationIterator) Next() (*longrunningpb.Operation, error)
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 (*OperationIterator) PageInfo
func (it *OperationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
RepositoryIterator
type RepositoryIterator struct {
// 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.
Response interface{}
// 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.
InternalFetch func(pageSize int, pageToken string) (results []*securesourcemanagerpb.Repository, nextPageToken string, err error)
// contains filtered or unexported fields
}
RepositoryIterator manages a stream of *securesourcemanagerpb.Repository.
func (*RepositoryIterator) All
func (it *RepositoryIterator) All() iter.Seq2[*securesourcemanagerpb.Repository, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*RepositoryIterator) Next
func (it *RepositoryIterator) Next() (*securesourcemanagerpb.Repository, error)
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 (*RepositoryIterator) PageInfo
func (it *RepositoryIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
UpdateBranchRuleOperation
type UpdateBranchRuleOperation struct {
// contains filtered or unexported fields
}
UpdateBranchRuleOperation manages a long-running operation from UpdateBranchRule.
func (*UpdateBranchRuleOperation) Done
func (op *UpdateBranchRuleOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateBranchRuleOperation) Metadata
func (op *UpdateBranchRuleOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateBranchRuleOperation) Name
func (op *UpdateBranchRuleOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateBranchRuleOperation) Poll
func (op *UpdateBranchRuleOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateBranchRuleOperation) Wait
func (op *UpdateBranchRuleOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.