Developer Connect API v1 - Package cloud.google.com/go/developerconnect/apiv1 (v0.4.1) Stay organized with collections Save and categorize content based on your preferences.
Beta
This library is covered by thePre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see thelaunch stage descriptions.
Note: To get more information about this package, such as access to older versions, viewthis package on pkg.go.dev.Package developerconnect is an auto-generated package for theDeveloper Connect API.
Connect third-party source code management to Google
NOTE:Thispackageisinbeta.Itisnotstable,andmaybesubjecttochanges.
General documentation
For information that is relevant for all client libraries please referencehttps://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on thispage 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.
// go get cloud.google.com/go/developerconnect/apiv1@latestctx:=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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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, mentioned above.
req:=&developerconnectpb.CreateAccountConnectorRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#CreateAccountConnectorRequest.}op,err:=c.CreateAccountConnector(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp
Use of Context
The ctx passed to NewClient is used for authentication requests andfor 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
funcDefaultAuthScopes()[]stringDefaultAuthScopes reports the default set of authentication scopes to use with this package.
AccountConnectorIterator
typeAccountConnectorIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*developerconnectpb.AccountConnector,nextPageTokenstring,errerror)// contains filtered or unexported fields}AccountConnectorIterator manages a stream of *developerconnectpb.AccountConnector.
func (*AccountConnectorIterator) All
func(it*AccountConnectorIterator)All()iter.Seq2[*developerconnectpb.AccountConnector,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*AccountConnectorIterator) Next
func(it*AccountConnectorIterator)Next()(*developerconnectpb.AccountConnector,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*AccountConnectorIterator) PageInfo
func(it*AccountConnectorIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CallOptions
typeCallOptionsstruct{ListConnections[]gax.CallOptionGetConnection[]gax.CallOptionCreateConnection[]gax.CallOptionUpdateConnection[]gax.CallOptionDeleteConnection[]gax.CallOptionCreateGitRepositoryLink[]gax.CallOptionDeleteGitRepositoryLink[]gax.CallOptionListGitRepositoryLinks[]gax.CallOptionGetGitRepositoryLink[]gax.CallOptionFetchReadWriteToken[]gax.CallOptionFetchReadToken[]gax.CallOptionFetchLinkableGitRepositories[]gax.CallOptionFetchGitHubInstallations[]gax.CallOptionFetchGitRefs[]gax.CallOptionListAccountConnectors[]gax.CallOptionGetAccountConnector[]gax.CallOptionCreateAccountConnector[]gax.CallOptionUpdateAccountConnector[]gax.CallOptionDeleteAccountConnector[]gax.CallOptionFetchAccessToken[]gax.CallOptionListUsers[]gax.CallOptionDeleteUser[]gax.CallOptionFetchSelf[]gax.CallOptionDeleteSelf[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOption}CallOptions contains the retry settings for each method of Client.
Client
typeClientstruct{// 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 Developer Connect API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service describing handlers for resources
func NewClient
NewClient creates a new developer connect client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Service describing handlers for resources
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewRESTClient
NewRESTClient creates a new developer connect rest client.
Service describing handlers for resources
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1")funcmain(){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_Optionsc,err:=developerconnect.NewRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*Client) CancelOperation
func(c*Client)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*Client) Close
Close closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*Client) Connection (deprecated)
func(c*Client)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*Client) CreateAccountConnector
func(c*Client)CreateAccountConnector(ctxcontext.Context,req*developerconnectpb.CreateAccountConnectorRequest,opts...gax.CallOption)(*CreateAccountConnectorOperation,error)CreateAccountConnector creates a new AccountConnector in a given project and location.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.CreateAccountConnectorRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#CreateAccountConnectorRequest.}op,err:=c.CreateAccountConnector(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateAccountConnectorOperation
func(c*Client)CreateAccountConnectorOperation(namestring)*CreateAccountConnectorOperationCreateAccountConnectorOperation returns a new CreateAccountConnectorOperation from a given name.The name must be that of a previously created CreateAccountConnectorOperation, possibly from a different process.
func (*Client) CreateConnection
func(c*Client)CreateConnection(ctxcontext.Context,req*developerconnectpb.CreateConnectionRequest,opts...gax.CallOption)(*CreateConnectionOperation,error)CreateConnection creates a new Connection in a given project and location.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.CreateConnectionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#CreateConnectionRequest.}op,err:=c.CreateConnection(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateConnectionOperation
func(c*Client)CreateConnectionOperation(namestring)*CreateConnectionOperationCreateConnectionOperation returns a new CreateConnectionOperation from a given name.The name must be that of a previously created CreateConnectionOperation, possibly from a different process.
func (*Client) CreateGitRepositoryLink
func(c*Client)CreateGitRepositoryLink(ctxcontext.Context,req*developerconnectpb.CreateGitRepositoryLinkRequest,opts...gax.CallOption)(*CreateGitRepositoryLinkOperation,error)CreateGitRepositoryLink creates a GitRepositoryLink. Upon linking a Git Repository, DeveloperConnect will configure the Git Repository to send webhook events toDeveloper Connect. Connections that use Firebase GitHub Application willhave events forwarded to the Firebase service. All other Connections willhave events forwarded to Cloud Build.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.CreateGitRepositoryLinkRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#CreateGitRepositoryLinkRequest.}op,err:=c.CreateGitRepositoryLink(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateGitRepositoryLinkOperation
func(c*Client)CreateGitRepositoryLinkOperation(namestring)*CreateGitRepositoryLinkOperationCreateGitRepositoryLinkOperation returns a new CreateGitRepositoryLinkOperation from a given name.The name must be that of a previously created CreateGitRepositoryLinkOperation, possibly from a different process.
func (*Client) DeleteAccountConnector
func(c*Client)DeleteAccountConnector(ctxcontext.Context,req*developerconnectpb.DeleteAccountConnectorRequest,opts...gax.CallOption)(*DeleteAccountConnectorOperation,error)DeleteAccountConnector deletes a single AccountConnector.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.DeleteAccountConnectorRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#DeleteAccountConnectorRequest.}op,err:=c.DeleteAccountConnector(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteAccountConnectorOperation
func(c*Client)DeleteAccountConnectorOperation(namestring)*DeleteAccountConnectorOperationDeleteAccountConnectorOperation returns a new DeleteAccountConnectorOperation from a given name.The name must be that of a previously created DeleteAccountConnectorOperation, possibly from a different process.
func (*Client) DeleteConnection
func(c*Client)DeleteConnection(ctxcontext.Context,req*developerconnectpb.DeleteConnectionRequest,opts...gax.CallOption)(*DeleteConnectionOperation,error)DeleteConnection deletes a single Connection.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.DeleteConnectionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#DeleteConnectionRequest.}op,err:=c.DeleteConnection(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteConnectionOperation
func(c*Client)DeleteConnectionOperation(namestring)*DeleteConnectionOperationDeleteConnectionOperation returns a new DeleteConnectionOperation from a given name.The name must be that of a previously created DeleteConnectionOperation, possibly from a different process.
func (*Client) DeleteGitRepositoryLink
func(c*Client)DeleteGitRepositoryLink(ctxcontext.Context,req*developerconnectpb.DeleteGitRepositoryLinkRequest,opts...gax.CallOption)(*DeleteGitRepositoryLinkOperation,error)DeleteGitRepositoryLink deletes a single GitRepositoryLink.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.DeleteGitRepositoryLinkRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#DeleteGitRepositoryLinkRequest.}op,err:=c.DeleteGitRepositoryLink(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteGitRepositoryLinkOperation
func(c*Client)DeleteGitRepositoryLinkOperation(namestring)*DeleteGitRepositoryLinkOperationDeleteGitRepositoryLinkOperation returns a new DeleteGitRepositoryLinkOperation from a given name.The name must be that of a previously created DeleteGitRepositoryLinkOperation, possibly from a different process.
func (*Client) DeleteOperation
func(c*Client)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteSelf
func(c*Client)DeleteSelf(ctxcontext.Context,req*developerconnectpb.DeleteSelfRequest,opts...gax.CallOption)(*DeleteSelfOperation,error)DeleteSelf delete the User based on the user credentials.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.DeleteSelfRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#DeleteSelfRequest.}op,err:=c.DeleteSelf(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteSelfOperation
func(c*Client)DeleteSelfOperation(namestring)*DeleteSelfOperationDeleteSelfOperation returns a new DeleteSelfOperation from a given name.The name must be that of a previously created DeleteSelfOperation, possibly from a different process.
func (*Client) DeleteUser
func(c*Client)DeleteUser(ctxcontext.Context,req*developerconnectpb.DeleteUserRequest,opts...gax.CallOption)(*DeleteUserOperation,error)DeleteUser deletes a single User.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.DeleteUserRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#DeleteUserRequest.}op,err:=c.DeleteUser(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteUserOperation
func(c*Client)DeleteUserOperation(namestring)*DeleteUserOperationDeleteUserOperation returns a new DeleteUserOperation from a given name.The name must be that of a previously created DeleteUserOperation, possibly from a different process.
func (*Client) FetchAccessToken
func(c*Client)FetchAccessToken(ctxcontext.Context,req*developerconnectpb.FetchAccessTokenRequest,opts...gax.CallOption)(*developerconnectpb.FetchAccessTokenResponse,error)FetchAccessToken fetches OAuth access token based on end user credentials.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.FetchAccessTokenRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#FetchAccessTokenRequest.}resp,err:=c.FetchAccessToken(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) FetchGitHubInstallations
func(c*Client)FetchGitHubInstallations(ctxcontext.Context,req*developerconnectpb.FetchGitHubInstallationsRequest,opts...gax.CallOption)(*developerconnectpb.FetchGitHubInstallationsResponse,error)FetchGitHubInstallations fetchGitHubInstallations returns the list of GitHub Installations thatare available to be added to a Connection.For github.com (athttp://github.com), only installations accessible to the authorizer tokenare returned. For GitHub Enterprise, all installations are returned.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.FetchGitHubInstallationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#FetchGitHubInstallationsRequest.}resp,err:=c.FetchGitHubInstallations(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) FetchGitRefs
func(c*Client)FetchGitRefs(ctxcontext.Context,req*developerconnectpb.FetchGitRefsRequest,opts...gax.CallOption)*StringIteratorFetchGitRefs fetch the list of branches or tags for a given repository.
Examples
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.FetchGitRefsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#FetchGitRefsRequest.}it:=c.FetchGitRefs(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=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.(*developerconnectpb.FetchGitRefsResponse)}}all
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.FetchGitRefsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#FetchGitRefsRequest.}forresp,err:=rangec.FetchGitRefs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) FetchLinkableGitRepositories
func(c*Client)FetchLinkableGitRepositories(ctxcontext.Context,req*developerconnectpb.FetchLinkableGitRepositoriesRequest,opts...gax.CallOption)*LinkableGitRepositoryIteratorFetchLinkableGitRepositories fetchLinkableGitRepositories returns a list of git repositories from an SCMthat are available to be added to a Connection.
Examples
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.FetchLinkableGitRepositoriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#FetchLinkableGitRepositoriesRequest.}it:=c.FetchLinkableGitRepositories(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=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.(*developerconnectpb.FetchLinkableGitRepositoriesResponse)}}all
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.FetchLinkableGitRepositoriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#FetchLinkableGitRepositoriesRequest.}forresp,err:=rangec.FetchLinkableGitRepositories(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) FetchReadToken
func(c*Client)FetchReadToken(ctxcontext.Context,req*developerconnectpb.FetchReadTokenRequest,opts...gax.CallOption)(*developerconnectpb.FetchReadTokenResponse,error)FetchReadToken fetches read token of a given gitRepositoryLink.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.FetchReadTokenRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#FetchReadTokenRequest.}resp,err:=c.FetchReadToken(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) FetchReadWriteToken
func(c*Client)FetchReadWriteToken(ctxcontext.Context,req*developerconnectpb.FetchReadWriteTokenRequest,opts...gax.CallOption)(*developerconnectpb.FetchReadWriteTokenResponse,error)FetchReadWriteToken fetches read/write token of a given gitRepositoryLink.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.FetchReadWriteTokenRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#FetchReadWriteTokenRequest.}resp,err:=c.FetchReadWriteToken(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) FetchSelf
func(c*Client)FetchSelf(ctxcontext.Context,req*developerconnectpb.FetchSelfRequest,opts...gax.CallOption)(*developerconnectpb.User,error)FetchSelf fetch the User based on the user credentials.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.FetchSelfRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#FetchSelfRequest.}resp,err:=c.FetchSelf(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetAccountConnector
func(c*Client)GetAccountConnector(ctxcontext.Context,req*developerconnectpb.GetAccountConnectorRequest,opts...gax.CallOption)(*developerconnectpb.AccountConnector,error)GetAccountConnector gets details of a single AccountConnector.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.GetAccountConnectorRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#GetAccountConnectorRequest.}resp,err:=c.GetAccountConnector(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetConnection
func(c*Client)GetConnection(ctxcontext.Context,req*developerconnectpb.GetConnectionRequest,opts...gax.CallOption)(*developerconnectpb.Connection,error)GetConnection gets details of a single Connection.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.GetConnectionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#GetConnectionRequest.}resp,err:=c.GetConnection(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetGitRepositoryLink
func(c*Client)GetGitRepositoryLink(ctxcontext.Context,req*developerconnectpb.GetGitRepositoryLinkRequest,opts...gax.CallOption)(*developerconnectpb.GitRepositoryLink,error)GetGitRepositoryLink gets details of a single GitRepositoryLink.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.GetGitRepositoryLinkRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#GetGitRepositoryLinkRequest.}resp,err:=c.GetGitRepositoryLink(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetLocation
func(c*Client)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetOperation
func(c*Client)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ListAccountConnectors
func(c*Client)ListAccountConnectors(ctxcontext.Context,req*developerconnectpb.ListAccountConnectorsRequest,opts...gax.CallOption)*AccountConnectorIteratorListAccountConnectors lists AccountConnectors in a given project and location.
Examples
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.ListAccountConnectorsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListAccountConnectorsRequest.}it:=c.ListAccountConnectors(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=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.(*developerconnectpb.ListAccountConnectorsResponse)}}all
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.ListAccountConnectorsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListAccountConnectorsRequest.}forresp,err:=rangec.ListAccountConnectors(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListConnections
func(c*Client)ListConnections(ctxcontext.Context,req*developerconnectpb.ListConnectionsRequest,opts...gax.CallOption)*ConnectionIteratorListConnections lists Connections in a given project and location.
Examples
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.ListConnectionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListConnectionsRequest.}it:=c.ListConnections(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=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.(*developerconnectpb.ListConnectionsResponse)}}all
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.ListConnectionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListConnectionsRequest.}forresp,err:=rangec.ListConnections(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListGitRepositoryLinks
func(c*Client)ListGitRepositoryLinks(ctxcontext.Context,req*developerconnectpb.ListGitRepositoryLinksRequest,opts...gax.CallOption)*GitRepositoryLinkIteratorListGitRepositoryLinks lists GitRepositoryLinks in a given project, location, and connection.
Examples
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.ListGitRepositoryLinksRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListGitRepositoryLinksRequest.}it:=c.ListGitRepositoryLinks(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=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.(*developerconnectpb.ListGitRepositoryLinksResponse)}}all
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.ListGitRepositoryLinksRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListGitRepositoryLinksRequest.}forresp,err:=rangec.ListGitRepositoryLinks(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListLocations
func(c*Client)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1""google.golang.org/api/iterator"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=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
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.ListLocationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.}forresp,err:=rangec.ListLocations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListOperations
func(c*Client)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=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
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}forresp,err:=rangec.ListOperations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListUsers
func(c*Client)ListUsers(ctxcontext.Context,req*developerconnectpb.ListUsersRequest,opts...gax.CallOption)*UserIteratorListUsers lists Users in a given project, location, and account_connector.
Examples
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.ListUsersRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListUsersRequest.}it:=c.ListUsers(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=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.(*developerconnectpb.ListUsersResponse)}}all
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.ListUsersRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListUsersRequest.}forresp,err:=rangec.ListUsers(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) UpdateAccountConnector
func(c*Client)UpdateAccountConnector(ctxcontext.Context,req*developerconnectpb.UpdateAccountConnectorRequest,opts...gax.CallOption)(*UpdateAccountConnectorOperation,error)UpdateAccountConnector updates the parameters of a single AccountConnector.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.UpdateAccountConnectorRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#UpdateAccountConnectorRequest.}op,err:=c.UpdateAccountConnector(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateAccountConnectorOperation
func(c*Client)UpdateAccountConnectorOperation(namestring)*UpdateAccountConnectorOperationUpdateAccountConnectorOperation returns a new UpdateAccountConnectorOperation from a given name.The name must be that of a previously created UpdateAccountConnectorOperation, possibly from a different process.
func (*Client) UpdateConnection
func(c*Client)UpdateConnection(ctxcontext.Context,req*developerconnectpb.UpdateConnectionRequest,opts...gax.CallOption)(*UpdateConnectionOperation,error)UpdateConnection updates the parameters of a single Connection.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.UpdateConnectionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#UpdateConnectionRequest.}op,err:=c.UpdateConnection(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateConnectionOperation
func(c*Client)UpdateConnectionOperation(namestring)*UpdateConnectionOperationUpdateConnectionOperation returns a new UpdateConnectionOperation from a given name.The name must be that of a previously created UpdateConnectionOperation, possibly from a different process.
ConnectionIterator
typeConnectionIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*developerconnectpb.Connection,nextPageTokenstring,errerror)// contains filtered or unexported fields}ConnectionIterator manages a stream of *developerconnectpb.Connection.
func (*ConnectionIterator) All
func(it*ConnectionIterator)All()iter.Seq2[*developerconnectpb.Connection,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ConnectionIterator) Next
func(it*ConnectionIterator)Next()(*developerconnectpb.Connection,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ConnectionIterator) PageInfo
func(it*ConnectionIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CreateAccountConnectorOperation
typeCreateAccountConnectorOperationstruct{// contains filtered or unexported fields}CreateAccountConnectorOperation manages a long-running operation from CreateAccountConnector.
func (*CreateAccountConnectorOperation) Done
func(op*CreateAccountConnectorOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateAccountConnectorOperation) Metadata
func(op*CreateAccountConnectorOperation)Metadata()(*developerconnectpb.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 (*CreateAccountConnectorOperation) Name
func(op*CreateAccountConnectorOperation)Name()stringName 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 (*CreateAccountConnectorOperation) Poll
func(op*CreateAccountConnectorOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.AccountConnector,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 andthe 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 (*CreateAccountConnectorOperation) Wait
func(op*CreateAccountConnectorOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.AccountConnector,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.
CreateConnectionOperation
typeCreateConnectionOperationstruct{// contains filtered or unexported fields}CreateConnectionOperation manages a long-running operation from CreateConnection.
func (*CreateConnectionOperation) Done
func(op*CreateConnectionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateConnectionOperation) Metadata
func(op*CreateConnectionOperation)Metadata()(*developerconnectpb.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 (*CreateConnectionOperation) Name
func(op*CreateConnectionOperation)Name()stringName 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 (*CreateConnectionOperation) Poll
func(op*CreateConnectionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.Connection,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 andthe 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 (*CreateConnectionOperation) Wait
func(op*CreateConnectionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.Connection,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.
CreateGitRepositoryLinkOperation
typeCreateGitRepositoryLinkOperationstruct{// contains filtered or unexported fields}CreateGitRepositoryLinkOperation manages a long-running operation from CreateGitRepositoryLink.
func (*CreateGitRepositoryLinkOperation) Done
func(op*CreateGitRepositoryLinkOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateGitRepositoryLinkOperation) Metadata
func(op*CreateGitRepositoryLinkOperation)Metadata()(*developerconnectpb.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 (*CreateGitRepositoryLinkOperation) Name
func(op*CreateGitRepositoryLinkOperation)Name()stringName 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 (*CreateGitRepositoryLinkOperation) Poll
func(op*CreateGitRepositoryLinkOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.GitRepositoryLink,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 andthe 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 (*CreateGitRepositoryLinkOperation) Wait
func(op*CreateGitRepositoryLinkOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.GitRepositoryLink,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.
CreateInsightsConfigOperation
typeCreateInsightsConfigOperationstruct{// contains filtered or unexported fields}CreateInsightsConfigOperation manages a long-running operation from CreateInsightsConfig.
func (*CreateInsightsConfigOperation) Done
func(op*CreateInsightsConfigOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateInsightsConfigOperation) Metadata
func(op*CreateInsightsConfigOperation)Metadata()(*developerconnectpb.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 (*CreateInsightsConfigOperation) Name
func(op*CreateInsightsConfigOperation)Name()stringName 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 (*CreateInsightsConfigOperation) Poll
func(op*CreateInsightsConfigOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.InsightsConfig,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 andthe 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 (*CreateInsightsConfigOperation) Wait
func(op*CreateInsightsConfigOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.InsightsConfig,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.
DeleteAccountConnectorOperation
typeDeleteAccountConnectorOperationstruct{// contains filtered or unexported fields}DeleteAccountConnectorOperation manages a long-running operation from DeleteAccountConnector.
func (*DeleteAccountConnectorOperation) Done
func(op*DeleteAccountConnectorOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteAccountConnectorOperation) Metadata
func(op*DeleteAccountConnectorOperation)Metadata()(*developerconnectpb.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 (*DeleteAccountConnectorOperation) Name
func(op*DeleteAccountConnectorOperation)Name()stringName 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 (*DeleteAccountConnectorOperation) Poll
func(op*DeleteAccountConnectorOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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 (*DeleteAccountConnectorOperation) Wait
func(op*DeleteAccountConnectorOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteConnectionOperation
typeDeleteConnectionOperationstruct{// contains filtered or unexported fields}DeleteConnectionOperation manages a long-running operation from DeleteConnection.
func (*DeleteConnectionOperation) Done
func(op*DeleteConnectionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteConnectionOperation) Metadata
func(op*DeleteConnectionOperation)Metadata()(*developerconnectpb.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 (*DeleteConnectionOperation) Name
func(op*DeleteConnectionOperation)Name()stringName 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 (*DeleteConnectionOperation) Poll
func(op*DeleteConnectionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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 (*DeleteConnectionOperation) Wait
func(op*DeleteConnectionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteGitRepositoryLinkOperation
typeDeleteGitRepositoryLinkOperationstruct{// contains filtered or unexported fields}DeleteGitRepositoryLinkOperation manages a long-running operation from DeleteGitRepositoryLink.
func (*DeleteGitRepositoryLinkOperation) Done
func(op*DeleteGitRepositoryLinkOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteGitRepositoryLinkOperation) Metadata
func(op*DeleteGitRepositoryLinkOperation)Metadata()(*developerconnectpb.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 (*DeleteGitRepositoryLinkOperation) Name
func(op*DeleteGitRepositoryLinkOperation)Name()stringName 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 (*DeleteGitRepositoryLinkOperation) Poll
func(op*DeleteGitRepositoryLinkOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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 (*DeleteGitRepositoryLinkOperation) Wait
func(op*DeleteGitRepositoryLinkOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteInsightsConfigOperation
typeDeleteInsightsConfigOperationstruct{// contains filtered or unexported fields}DeleteInsightsConfigOperation manages a long-running operation from DeleteInsightsConfig.
func (*DeleteInsightsConfigOperation) Done
func(op*DeleteInsightsConfigOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteInsightsConfigOperation) Metadata
func(op*DeleteInsightsConfigOperation)Metadata()(*developerconnectpb.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 (*DeleteInsightsConfigOperation) Name
func(op*DeleteInsightsConfigOperation)Name()stringName 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 (*DeleteInsightsConfigOperation) Poll
func(op*DeleteInsightsConfigOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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 (*DeleteInsightsConfigOperation) Wait
func(op*DeleteInsightsConfigOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteSelfOperation
typeDeleteSelfOperationstruct{// contains filtered or unexported fields}DeleteSelfOperation manages a long-running operation from DeleteSelf.
func (*DeleteSelfOperation) Done
func(op*DeleteSelfOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteSelfOperation) Metadata
func(op*DeleteSelfOperation)Metadata()(*developerconnectpb.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 (*DeleteSelfOperation) Name
func(op*DeleteSelfOperation)Name()stringName 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 (*DeleteSelfOperation) Poll
func(op*DeleteSelfOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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 (*DeleteSelfOperation) Wait
func(op*DeleteSelfOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteUserOperation
typeDeleteUserOperationstruct{// contains filtered or unexported fields}DeleteUserOperation manages a long-running operation from DeleteUser.
func (*DeleteUserOperation) Done
func(op*DeleteUserOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteUserOperation) Metadata
func(op*DeleteUserOperation)Metadata()(*developerconnectpb.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 (*DeleteUserOperation) Name
func(op*DeleteUserOperation)Name()stringName 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 (*DeleteUserOperation) Poll
func(op*DeleteUserOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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 (*DeleteUserOperation) Wait
func(op*DeleteUserOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
GitRepositoryLinkIterator
typeGitRepositoryLinkIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*developerconnectpb.GitRepositoryLink,nextPageTokenstring,errerror)// contains filtered or unexported fields}GitRepositoryLinkIterator manages a stream of *developerconnectpb.GitRepositoryLink.
func (*GitRepositoryLinkIterator) All
func(it*GitRepositoryLinkIterator)All()iter.Seq2[*developerconnectpb.GitRepositoryLink,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*GitRepositoryLinkIterator) Next
func(it*GitRepositoryLinkIterator)Next()(*developerconnectpb.GitRepositoryLink,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*GitRepositoryLinkIterator) PageInfo
func(it*GitRepositoryLinkIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
InsightsConfigCallOptions
typeInsightsConfigCallOptionsstruct{ListInsightsConfigs[]gax.CallOptionCreateInsightsConfig[]gax.CallOptionGetInsightsConfig[]gax.CallOptionUpdateInsightsConfig[]gax.CallOptionDeleteInsightsConfig[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOption}InsightsConfigCallOptions contains the retry settings for each method of InsightsConfigClient.
InsightsConfigClient
typeInsightsConfigClientstruct{// The call options for this service.CallOptions*InsightsConfigCallOptions// 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}InsightsConfigClient is a client for interacting with Developer Connect API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Creates and manages InsightsConfigs.
The InsightsConfig resource is the core configuration object to captureevents from your Software Development Lifecycle. It acts as the central hubfor managing how Developer connect understands your application, its runtimeenvironments, and the artifacts deployed within them.A user can create an InsightsConfig, list previously-requestedInsightsConfigs or get InsightsConfigs by their ID to determine the status ofthe InsightsConfig.
func NewInsightsConfigClient
funcNewInsightsConfigClient(ctxcontext.Context,opts...option.ClientOption)(*InsightsConfigClient,error)NewInsightsConfigClient creates a new insights config service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Creates and manages InsightsConfigs.
The InsightsConfig resource is the core configuration object to captureevents from your Software Development Lifecycle. It acts as the central hubfor managing how Developer connect understands your application, its runtimeenvironments, and the artifacts deployed within them.A user can create an InsightsConfig, list previously-requestedInsightsConfigs or get InsightsConfigs by their ID to determine the status ofthe InsightsConfig.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewInsightsConfigRESTClient
funcNewInsightsConfigRESTClient(ctxcontext.Context,opts...option.ClientOption)(*InsightsConfigClient,error)NewInsightsConfigRESTClient creates a new insights config service rest client.
Creates and manages InsightsConfigs.
The InsightsConfig resource is the core configuration object to captureevents from your Software Development Lifecycle. It acts as the central hubfor managing how Developer connect understands your application, its runtimeenvironments, and the artifacts deployed within them.A user can create an InsightsConfig, list previously-requestedInsightsConfigs or get InsightsConfigs by their ID to determine the status ofthe InsightsConfig.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*InsightsConfigClient) CancelOperation
func(c*InsightsConfigClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*InsightsConfigClient) Close
func(c*InsightsConfigClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*InsightsConfigClient) Connection (deprecated)
func(c*InsightsConfigClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*InsightsConfigClient) CreateInsightsConfig
func(c*InsightsConfigClient)CreateInsightsConfig(ctxcontext.Context,req*developerconnectpb.CreateInsightsConfigRequest,opts...gax.CallOption)(*CreateInsightsConfigOperation,error)CreateInsightsConfig creates a new InsightsConfig in a given project and location.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.CreateInsightsConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#CreateInsightsConfigRequest.}op,err:=c.CreateInsightsConfig(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*InsightsConfigClient) CreateInsightsConfigOperation
func(c*InsightsConfigClient)CreateInsightsConfigOperation(namestring)*CreateInsightsConfigOperationCreateInsightsConfigOperation returns a new CreateInsightsConfigOperation from a given name.The name must be that of a previously created CreateInsightsConfigOperation, possibly from a different process.
func (*InsightsConfigClient) DeleteInsightsConfig
func(c*InsightsConfigClient)DeleteInsightsConfig(ctxcontext.Context,req*developerconnectpb.DeleteInsightsConfigRequest,opts...gax.CallOption)(*DeleteInsightsConfigOperation,error)DeleteInsightsConfig delete a single Insight.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.DeleteInsightsConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#DeleteInsightsConfigRequest.}op,err:=c.DeleteInsightsConfig(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*InsightsConfigClient) DeleteInsightsConfigOperation
func(c*InsightsConfigClient)DeleteInsightsConfigOperation(namestring)*DeleteInsightsConfigOperationDeleteInsightsConfigOperation returns a new DeleteInsightsConfigOperation from a given name.The name must be that of a previously created DeleteInsightsConfigOperation, possibly from a different process.
func (*InsightsConfigClient) DeleteOperation
func(c*InsightsConfigClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*InsightsConfigClient) GetInsightsConfig
func(c*InsightsConfigClient)GetInsightsConfig(ctxcontext.Context,req*developerconnectpb.GetInsightsConfigRequest,opts...gax.CallOption)(*developerconnectpb.InsightsConfig,error)GetInsightsConfig gets details of a single Insight.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.GetInsightsConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#GetInsightsConfigRequest.}resp,err:=c.GetInsightsConfig(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*InsightsConfigClient) GetLocation
func(c*InsightsConfigClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*InsightsConfigClient) GetOperation
func(c*InsightsConfigClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*InsightsConfigClient) ListInsightsConfigs
func(c*InsightsConfigClient)ListInsightsConfigs(ctxcontext.Context,req*developerconnectpb.ListInsightsConfigsRequest,opts...gax.CallOption)*InsightsConfigIteratorListInsightsConfigs lists InsightsConfigs in a given project and location.
Examples
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.ListInsightsConfigsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListInsightsConfigsRequest.}it:=c.ListInsightsConfigs(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=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.(*developerconnectpb.ListInsightsConfigsResponse)}}all
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.ListInsightsConfigsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListInsightsConfigsRequest.}forresp,err:=rangec.ListInsightsConfigs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*InsightsConfigClient) ListLocations
func(c*InsightsConfigClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1""google.golang.org/api/iterator"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=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
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.ListLocationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.}forresp,err:=rangec.ListLocations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*InsightsConfigClient) ListOperations
func(c*InsightsConfigClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=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
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}forresp,err:=rangec.ListOperations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*InsightsConfigClient) UpdateInsightsConfig
func(c*InsightsConfigClient)UpdateInsightsConfig(ctxcontext.Context,req*developerconnectpb.UpdateInsightsConfigRequest,opts...gax.CallOption)(*UpdateInsightsConfigOperation,error)UpdateInsightsConfig updates the parameters of a single InsightsConfig.
Example
packagemainimport("context"developerconnect"cloud.google.com/go/developerconnect/apiv1"developerconnectpb"cloud.google.com/go/developerconnect/apiv1/developerconnectpb")funcmain(){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_Optionsc,err:=developerconnect.NewInsightsConfigClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&developerconnectpb.UpdateInsightsConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#UpdateInsightsConfigRequest.}op,err:=c.UpdateInsightsConfig(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*InsightsConfigClient) UpdateInsightsConfigOperation
func(c*InsightsConfigClient)UpdateInsightsConfigOperation(namestring)*UpdateInsightsConfigOperationUpdateInsightsConfigOperation returns a new UpdateInsightsConfigOperation from a given name.The name must be that of a previously created UpdateInsightsConfigOperation, possibly from a different process.
InsightsConfigIterator
typeInsightsConfigIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*developerconnectpb.InsightsConfig,nextPageTokenstring,errerror)// contains filtered or unexported fields}InsightsConfigIterator manages a stream of *developerconnectpb.InsightsConfig.
func (*InsightsConfigIterator) All
func(it*InsightsConfigIterator)All()iter.Seq2[*developerconnectpb.InsightsConfig,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*InsightsConfigIterator) Next
func(it*InsightsConfigIterator)Next()(*developerconnectpb.InsightsConfig,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*InsightsConfigIterator) PageInfo
func(it*InsightsConfigIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
LinkableGitRepositoryIterator
typeLinkableGitRepositoryIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*developerconnectpb.LinkableGitRepository,nextPageTokenstring,errerror)// contains filtered or unexported fields}LinkableGitRepositoryIterator manages a stream of *developerconnectpb.LinkableGitRepository.
func (*LinkableGitRepositoryIterator) All
func(it*LinkableGitRepositoryIterator)All()iter.Seq2[*developerconnectpb.LinkableGitRepository,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*LinkableGitRepositoryIterator) Next
func(it*LinkableGitRepositoryIterator)Next()(*developerconnectpb.LinkableGitRepository,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*LinkableGitRepositoryIterator) PageInfo
func(it*LinkableGitRepositoryIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
LocationIterator
typeLocationIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*locationpb.Location,nextPageTokenstring,errerror)// 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, theiterator 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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*LocationIterator) PageInfo
func(it*LocationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
OperationIterator
typeOperationIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*longrunningpb.Operation,nextPageTokenstring,errerror)// 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, theiterator 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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo
func(it*OperationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
StringIterator
typeStringIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]string,nextPageTokenstring,errerror)// contains filtered or unexported fields}StringIterator manages a stream of string.
func (*StringIterator) All
func(it*StringIterator)All()iter.Seq2[string,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*StringIterator) Next
func(it*StringIterator)Next()(string,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*StringIterator) PageInfo
func(it*StringIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
UpdateAccountConnectorOperation
typeUpdateAccountConnectorOperationstruct{// contains filtered or unexported fields}UpdateAccountConnectorOperation manages a long-running operation from UpdateAccountConnector.
func (*UpdateAccountConnectorOperation) Done
func(op*UpdateAccountConnectorOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateAccountConnectorOperation) Metadata
func(op*UpdateAccountConnectorOperation)Metadata()(*developerconnectpb.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 (*UpdateAccountConnectorOperation) Name
func(op*UpdateAccountConnectorOperation)Name()stringName 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 (*UpdateAccountConnectorOperation) Poll
func(op*UpdateAccountConnectorOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.AccountConnector,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 andthe 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 (*UpdateAccountConnectorOperation) Wait
func(op*UpdateAccountConnectorOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.AccountConnector,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.
UpdateConnectionOperation
typeUpdateConnectionOperationstruct{// contains filtered or unexported fields}UpdateConnectionOperation manages a long-running operation from UpdateConnection.
func (*UpdateConnectionOperation) Done
func(op*UpdateConnectionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateConnectionOperation) Metadata
func(op*UpdateConnectionOperation)Metadata()(*developerconnectpb.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 (*UpdateConnectionOperation) Name
func(op*UpdateConnectionOperation)Name()stringName 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 (*UpdateConnectionOperation) Poll
func(op*UpdateConnectionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.Connection,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 andthe 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 (*UpdateConnectionOperation) Wait
func(op*UpdateConnectionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.Connection,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.
UpdateInsightsConfigOperation
typeUpdateInsightsConfigOperationstruct{// contains filtered or unexported fields}UpdateInsightsConfigOperation manages a long-running operation from UpdateInsightsConfig.
func (*UpdateInsightsConfigOperation) Done
func(op*UpdateInsightsConfigOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateInsightsConfigOperation) Metadata
func(op*UpdateInsightsConfigOperation)Metadata()(*developerconnectpb.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 (*UpdateInsightsConfigOperation) Name
func(op*UpdateInsightsConfigOperation)Name()stringName 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 (*UpdateInsightsConfigOperation) Poll
func(op*UpdateInsightsConfigOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.InsightsConfig,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 andthe 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 (*UpdateInsightsConfigOperation) Wait
func(op*UpdateInsightsConfigOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*developerconnectpb.InsightsConfig,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.
UserIterator
typeUserIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*developerconnectpb.User,nextPageTokenstring,errerror)// contains filtered or unexported fields}UserIterator manages a stream of *developerconnectpb.User.
func (*UserIterator) All
func(it*UserIterator)All()iter.Seq2[*developerconnectpb.User,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*UserIterator) Next
func(it*UserIterator)Next()(*developerconnectpb.User,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*UserIterator) PageInfo
func(it*UserIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.