Documentation
¶
Overview ¶
Package developerconnect is an auto-generated package for the Developer Connect API.
Connect third-party source code management to Google
NOTE: This package is in beta. It is not stable, and may be subject to changes.
General documentation ¶
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage ¶
To get started with this package, create a client.
// go get cloud.google.com/go/developerconnect/apiv1@latest
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client ¶
The following is an example of making an API call with the newly created client, 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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
Use of Context ¶
The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Index ¶
- func DefaultAuthScopes() []string
- type AccountConnectorIterator
- type CallOptions
- type Client
- func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *Client) Close() error
- func (c *Client) Connection() *grpc.ClientConndeprecated
- func (c *Client) CreateAccountConnector(ctx context.Context, req *developerconnectpb.CreateAccountConnectorRequest, ...) (*CreateAccountConnectorOperation, error)
- func (c *Client) CreateAccountConnectorOperation(name string) *CreateAccountConnectorOperation
- func (c *Client) CreateConnection(ctx context.Context, req *developerconnectpb.CreateConnectionRequest, ...) (*CreateConnectionOperation, error)
- func (c *Client) CreateConnectionOperation(name string) *CreateConnectionOperation
- func (c *Client) CreateGitRepositoryLink(ctx context.Context, req *developerconnectpb.CreateGitRepositoryLinkRequest, ...) (*CreateGitRepositoryLinkOperation, error)
- func (c *Client) CreateGitRepositoryLinkOperation(name string) *CreateGitRepositoryLinkOperation
- func (c *Client) DeleteAccountConnector(ctx context.Context, req *developerconnectpb.DeleteAccountConnectorRequest, ...) (*DeleteAccountConnectorOperation, error)
- func (c *Client) DeleteAccountConnectorOperation(name string) *DeleteAccountConnectorOperation
- func (c *Client) DeleteConnection(ctx context.Context, req *developerconnectpb.DeleteConnectionRequest, ...) (*DeleteConnectionOperation, error)
- func (c *Client) DeleteConnectionOperation(name string) *DeleteConnectionOperation
- func (c *Client) DeleteGitRepositoryLink(ctx context.Context, req *developerconnectpb.DeleteGitRepositoryLinkRequest, ...) (*DeleteGitRepositoryLinkOperation, error)
- func (c *Client) DeleteGitRepositoryLinkOperation(name string) *DeleteGitRepositoryLinkOperation
- func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *Client) DeleteSelf(ctx context.Context, req *developerconnectpb.DeleteSelfRequest, ...) (*DeleteSelfOperation, error)
- func (c *Client) DeleteSelfOperation(name string) *DeleteSelfOperation
- func (c *Client) DeleteUser(ctx context.Context, req *developerconnectpb.DeleteUserRequest, ...) (*DeleteUserOperation, error)
- func (c *Client) DeleteUserOperation(name string) *DeleteUserOperation
- func (c *Client) FetchAccessToken(ctx context.Context, req *developerconnectpb.FetchAccessTokenRequest, ...) (*developerconnectpb.FetchAccessTokenResponse, error)
- func (c *Client) FetchGitHubInstallations(ctx context.Context, req *developerconnectpb.FetchGitHubInstallationsRequest, ...) (*developerconnectpb.FetchGitHubInstallationsResponse, error)
- func (c *Client) FetchGitRefs(ctx context.Context, req *developerconnectpb.FetchGitRefsRequest, ...) *StringIterator
- func (c *Client) FetchLinkableGitRepositories(ctx context.Context, ...) *LinkableGitRepositoryIterator
- func (c *Client) FetchReadToken(ctx context.Context, req *developerconnectpb.FetchReadTokenRequest, ...) (*developerconnectpb.FetchReadTokenResponse, error)
- func (c *Client) FetchReadWriteToken(ctx context.Context, req *developerconnectpb.FetchReadWriteTokenRequest, ...) (*developerconnectpb.FetchReadWriteTokenResponse, error)
- func (c *Client) FetchSelf(ctx context.Context, req *developerconnectpb.FetchSelfRequest, ...) (*developerconnectpb.User, error)
- func (c *Client) GetAccountConnector(ctx context.Context, req *developerconnectpb.GetAccountConnectorRequest, ...) (*developerconnectpb.AccountConnector, error)
- func (c *Client) GetConnection(ctx context.Context, req *developerconnectpb.GetConnectionRequest, ...) (*developerconnectpb.Connection, error)
- func (c *Client) GetGitRepositoryLink(ctx context.Context, req *developerconnectpb.GetGitRepositoryLinkRequest, ...) (*developerconnectpb.GitRepositoryLink, error)
- func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *Client) ListAccountConnectors(ctx context.Context, req *developerconnectpb.ListAccountConnectorsRequest, ...) *AccountConnectorIterator
- func (c *Client) ListConnections(ctx context.Context, req *developerconnectpb.ListConnectionsRequest, ...) *ConnectionIterator
- func (c *Client) ListGitRepositoryLinks(ctx context.Context, req *developerconnectpb.ListGitRepositoryLinksRequest, ...) *GitRepositoryLinkIterator
- func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *Client) ListUsers(ctx context.Context, req *developerconnectpb.ListUsersRequest, ...) *UserIterator
- func (c *Client) UpdateAccountConnector(ctx context.Context, req *developerconnectpb.UpdateAccountConnectorRequest, ...) (*UpdateAccountConnectorOperation, error)
- func (c *Client) UpdateAccountConnectorOperation(name string) *UpdateAccountConnectorOperation
- func (c *Client) UpdateConnection(ctx context.Context, req *developerconnectpb.UpdateConnectionRequest, ...) (*UpdateConnectionOperation, error)
- func (c *Client) UpdateConnectionOperation(name string) *UpdateConnectionOperation
- type ConnectionIterator
- type CreateAccountConnectorOperation
- func (op *CreateAccountConnectorOperation) Done() bool
- func (op *CreateAccountConnectorOperation) Metadata() (*developerconnectpb.OperationMetadata, error)
- func (op *CreateAccountConnectorOperation) Name() string
- func (op *CreateAccountConnectorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.AccountConnector, error)
- func (op *CreateAccountConnectorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.AccountConnector, error)
- type CreateConnectionOperation
- func (op *CreateConnectionOperation) Done() bool
- func (op *CreateConnectionOperation) Metadata() (*developerconnectpb.OperationMetadata, error)
- func (op *CreateConnectionOperation) Name() string
- func (op *CreateConnectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.Connection, error)
- func (op *CreateConnectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.Connection, error)
- type CreateGitRepositoryLinkOperation
- func (op *CreateGitRepositoryLinkOperation) Done() bool
- func (op *CreateGitRepositoryLinkOperation) Metadata() (*developerconnectpb.OperationMetadata, error)
- func (op *CreateGitRepositoryLinkOperation) Name() string
- func (op *CreateGitRepositoryLinkOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.GitRepositoryLink, error)
- func (op *CreateGitRepositoryLinkOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.GitRepositoryLink, error)
- type CreateInsightsConfigOperation
- func (op *CreateInsightsConfigOperation) Done() bool
- func (op *CreateInsightsConfigOperation) Metadata() (*developerconnectpb.OperationMetadata, error)
- func (op *CreateInsightsConfigOperation) Name() string
- func (op *CreateInsightsConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.InsightsConfig, error)
- func (op *CreateInsightsConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.InsightsConfig, error)
- type DeleteAccountConnectorOperation
- func (op *DeleteAccountConnectorOperation) Done() bool
- func (op *DeleteAccountConnectorOperation) Metadata() (*developerconnectpb.OperationMetadata, error)
- func (op *DeleteAccountConnectorOperation) Name() string
- func (op *DeleteAccountConnectorOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteAccountConnectorOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteConnectionOperation
- func (op *DeleteConnectionOperation) Done() bool
- func (op *DeleteConnectionOperation) Metadata() (*developerconnectpb.OperationMetadata, error)
- func (op *DeleteConnectionOperation) Name() string
- func (op *DeleteConnectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteConnectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteGitRepositoryLinkOperation
- func (op *DeleteGitRepositoryLinkOperation) Done() bool
- func (op *DeleteGitRepositoryLinkOperation) Metadata() (*developerconnectpb.OperationMetadata, error)
- func (op *DeleteGitRepositoryLinkOperation) Name() string
- func (op *DeleteGitRepositoryLinkOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteGitRepositoryLinkOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteInsightsConfigOperation
- func (op *DeleteInsightsConfigOperation) Done() bool
- func (op *DeleteInsightsConfigOperation) Metadata() (*developerconnectpb.OperationMetadata, error)
- func (op *DeleteInsightsConfigOperation) Name() string
- func (op *DeleteInsightsConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteInsightsConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteSelfOperation
- func (op *DeleteSelfOperation) Done() bool
- func (op *DeleteSelfOperation) Metadata() (*developerconnectpb.OperationMetadata, error)
- func (op *DeleteSelfOperation) Name() string
- func (op *DeleteSelfOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteSelfOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteUserOperation
- func (op *DeleteUserOperation) Done() bool
- func (op *DeleteUserOperation) Metadata() (*developerconnectpb.OperationMetadata, error)
- func (op *DeleteUserOperation) Name() string
- func (op *DeleteUserOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteUserOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type GitRepositoryLinkIterator
- type InsightsConfigCallOptions
- type InsightsConfigClient
- func (c *InsightsConfigClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *InsightsConfigClient) Close() error
- func (c *InsightsConfigClient) Connection() *grpc.ClientConndeprecated
- func (c *InsightsConfigClient) CreateInsightsConfig(ctx context.Context, req *developerconnectpb.CreateInsightsConfigRequest, ...) (*CreateInsightsConfigOperation, error)
- func (c *InsightsConfigClient) CreateInsightsConfigOperation(name string) *CreateInsightsConfigOperation
- func (c *InsightsConfigClient) DeleteInsightsConfig(ctx context.Context, req *developerconnectpb.DeleteInsightsConfigRequest, ...) (*DeleteInsightsConfigOperation, error)
- func (c *InsightsConfigClient) DeleteInsightsConfigOperation(name string) *DeleteInsightsConfigOperation
- func (c *InsightsConfigClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *InsightsConfigClient) GetInsightsConfig(ctx context.Context, req *developerconnectpb.GetInsightsConfigRequest, ...) (*developerconnectpb.InsightsConfig, error)
- func (c *InsightsConfigClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *InsightsConfigClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *InsightsConfigClient) ListInsightsConfigs(ctx context.Context, req *developerconnectpb.ListInsightsConfigsRequest, ...) *InsightsConfigIterator
- func (c *InsightsConfigClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *InsightsConfigClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *InsightsConfigClient) UpdateInsightsConfig(ctx context.Context, req *developerconnectpb.UpdateInsightsConfigRequest, ...) (*UpdateInsightsConfigOperation, error)
- func (c *InsightsConfigClient) UpdateInsightsConfigOperation(name string) *UpdateInsightsConfigOperation
- type InsightsConfigIterator
- type LinkableGitRepositoryIterator
- type LocationIterator
- type OperationIterator
- type StringIterator
- type UpdateAccountConnectorOperation
- func (op *UpdateAccountConnectorOperation) Done() bool
- func (op *UpdateAccountConnectorOperation) Metadata() (*developerconnectpb.OperationMetadata, error)
- func (op *UpdateAccountConnectorOperation) Name() string
- func (op *UpdateAccountConnectorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.AccountConnector, error)
- func (op *UpdateAccountConnectorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.AccountConnector, error)
- type UpdateConnectionOperation
- func (op *UpdateConnectionOperation) Done() bool
- func (op *UpdateConnectionOperation) Metadata() (*developerconnectpb.OperationMetadata, error)
- func (op *UpdateConnectionOperation) Name() string
- func (op *UpdateConnectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.Connection, error)
- func (op *UpdateConnectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.Connection, error)
- type UpdateInsightsConfigOperation
- func (op *UpdateInsightsConfigOperation) Done() bool
- func (op *UpdateInsightsConfigOperation) Metadata() (*developerconnectpb.OperationMetadata, error)
- func (op *UpdateInsightsConfigOperation) Name() string
- func (op *UpdateInsightsConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.InsightsConfig, error)
- func (op *UpdateInsightsConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*developerconnectpb.InsightsConfig, error)
- type UserIterator
Examples ¶
- Client.CancelOperation
- Client.CreateAccountConnector
- Client.CreateConnection
- Client.CreateGitRepositoryLink
- Client.DeleteAccountConnector
- Client.DeleteConnection
- Client.DeleteGitRepositoryLink
- Client.DeleteOperation
- Client.DeleteSelf
- Client.DeleteUser
- Client.FetchAccessToken
- Client.FetchGitHubInstallations
- Client.FetchGitRefs
- Client.FetchGitRefs (All)
- Client.FetchLinkableGitRepositories
- Client.FetchLinkableGitRepositories (All)
- Client.FetchReadToken
- Client.FetchReadWriteToken
- Client.FetchSelf
- Client.GetAccountConnector
- Client.GetConnection
- Client.GetGitRepositoryLink
- Client.GetLocation
- Client.GetOperation
- Client.ListAccountConnectors
- Client.ListAccountConnectors (All)
- Client.ListConnections
- Client.ListConnections (All)
- Client.ListGitRepositoryLinks
- Client.ListGitRepositoryLinks (All)
- Client.ListLocations
- Client.ListLocations (All)
- Client.ListOperations
- Client.ListOperations (All)
- Client.ListUsers
- Client.ListUsers (All)
- Client.UpdateAccountConnector
- Client.UpdateConnection
- InsightsConfigClient.CancelOperation
- InsightsConfigClient.CreateInsightsConfig
- InsightsConfigClient.DeleteInsightsConfig
- InsightsConfigClient.DeleteOperation
- InsightsConfigClient.GetInsightsConfig
- InsightsConfigClient.GetLocation
- InsightsConfigClient.GetOperation
- InsightsConfigClient.ListInsightsConfigs
- InsightsConfigClient.ListInsightsConfigs (All)
- InsightsConfigClient.ListLocations
- InsightsConfigClient.ListLocations (All)
- InsightsConfigClient.ListOperations
- InsightsConfigClient.ListOperations (All)
- InsightsConfigClient.UpdateInsightsConfig
- NewClient
- NewInsightsConfigClient
- NewInsightsConfigRESTClient
- NewRESTClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type AccountConnectorIterator ¶ added in v0.4.0
type AccountConnectorIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*developerconnectpb.AccountConnector, nextPageToken string, err error)
// contains filtered or unexported fields
}
AccountConnectorIterator manages a stream of *developerconnectpb.AccountConnector.
func (*AccountConnectorIterator) All ¶ added in v0.4.0
func (it *AccountConnectorIterator) All() iter.Seq2[*developerconnectpb.AccountConnector, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*AccountConnectorIterator) Next ¶ added in v0.4.0
func (it *AccountConnectorIterator) Next() (*developerconnectpb.AccountConnector, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*AccountConnectorIterator) PageInfo ¶ added in v0.4.0
func (it *AccountConnectorIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CallOptions ¶
type CallOptions struct {
ListConnections []gax.CallOption
GetConnection []gax.CallOption
CreateConnection []gax.CallOption
UpdateConnection []gax.CallOption
DeleteConnection []gax.CallOption
CreateGitRepositoryLink []gax.CallOption
DeleteGitRepositoryLink []gax.CallOption
ListGitRepositoryLinks []gax.CallOption
GetGitRepositoryLink []gax.CallOption
FetchReadWriteToken []gax.CallOption
FetchReadToken []gax.CallOption
FetchLinkableGitRepositories []gax.CallOption
FetchGitHubInstallations []gax.CallOption
FetchGitRefs []gax.CallOption
ListAccountConnectors []gax.CallOption
GetAccountConnector []gax.CallOption
CreateAccountConnector []gax.CallOption
UpdateAccountConnector []gax.CallOption
DeleteAccountConnector []gax.CallOption
FetchAccessToken []gax.CallOption
ListUsers []gax.CallOption
DeleteUser []gax.CallOption
FetchSelf []gax.CallOption
DeleteSelf []gax.CallOption
GetLocation []gax.CallOption
ListLocations []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
CallOptions contains the retry settings for each method of Client.
type Client ¶
type Client struct {
// The call options for this service.
CallOptions *CallOptions
// LROClient is used internally to handle long-running operations.
// It is exposed so that its CallOptions can be modified if required.
// Users should not Close this client.
LROClient *lroauto.OperationsClient
// contains filtered or unexported fields
}
Client is a client for interacting with 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 ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewRESTClient ¶
NewRESTClient creates a new developer connect rest client.
Service describing handlers for resources
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*Client) CancelOperation ¶
func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) Close ¶
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) Connection
deprecated
func (c *Client) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*Client) CreateAccountConnector ¶ added in v0.4.0
func (c *Client) CreateAccountConnector(ctx context.Context, req *developerconnectpb.CreateAccountConnectorRequest, opts ...gax.CallOption) (*CreateAccountConnectorOperation, error)
CreateAccountConnector creates a new AccountConnector in a given project and location.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateAccountConnectorOperation ¶ added in v0.4.0
func (c *Client) CreateAccountConnectorOperation(name string) *CreateAccountConnectorOperation
CreateAccountConnectorOperation 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(ctx context.Context, req *developerconnectpb.CreateConnectionRequest, opts ...gax.CallOption) (*CreateConnectionOperation, error)
CreateConnection creates a new Connection in a given project and location.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateConnectionOperation ¶
func (c *Client) CreateConnectionOperation(name string) *CreateConnectionOperation
CreateConnectionOperation 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(ctx context.Context, req *developerconnectpb.CreateGitRepositoryLinkRequest, opts ...gax.CallOption) (*CreateGitRepositoryLinkOperation, error)
CreateGitRepositoryLink creates a GitRepositoryLink. Upon linking a Git Repository, Developer Connect will configure the Git Repository to send webhook events to Developer Connect. Connections that use Firebase GitHub Application will have events forwarded to the Firebase service. All other Connections will have events forwarded to Cloud Build.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateGitRepositoryLinkOperation ¶
func (c *Client) CreateGitRepositoryLinkOperation(name string) *CreateGitRepositoryLinkOperation
CreateGitRepositoryLinkOperation 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 ¶ added in v0.4.0
func (c *Client) DeleteAccountConnector(ctx context.Context, req *developerconnectpb.DeleteAccountConnectorRequest, opts ...gax.CallOption) (*DeleteAccountConnectorOperation, error)
DeleteAccountConnector deletes a single AccountConnector.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteAccountConnectorOperation ¶ added in v0.4.0
func (c *Client) DeleteAccountConnectorOperation(name string) *DeleteAccountConnectorOperation
DeleteAccountConnectorOperation 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(ctx context.Context, req *developerconnectpb.DeleteConnectionRequest, opts ...gax.CallOption) (*DeleteConnectionOperation, error)
DeleteConnection deletes a single Connection.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteConnectionOperation ¶
func (c *Client) DeleteConnectionOperation(name string) *DeleteConnectionOperation
DeleteConnectionOperation 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(ctx context.Context, req *developerconnectpb.DeleteGitRepositoryLinkRequest, opts ...gax.CallOption) (*DeleteGitRepositoryLinkOperation, error)
DeleteGitRepositoryLink deletes a single GitRepositoryLink.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteGitRepositoryLinkOperation ¶
func (c *Client) DeleteGitRepositoryLinkOperation(name string) *DeleteGitRepositoryLinkOperation
DeleteGitRepositoryLinkOperation 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(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.DeleteOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
}
err = c.DeleteOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteSelf ¶ added in v0.4.0
func (c *Client) DeleteSelf(ctx context.Context, req *developerconnectpb.DeleteSelfRequest, opts ...gax.CallOption) (*DeleteSelfOperation, error)
DeleteSelf delete the User based on the user credentials.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteSelfOperation ¶ added in v0.4.0
func (c *Client) DeleteSelfOperation(name string) *DeleteSelfOperation
DeleteSelfOperation 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 ¶ added in v0.4.0
func (c *Client) DeleteUser(ctx context.Context, req *developerconnectpb.DeleteUserRequest, opts ...gax.CallOption) (*DeleteUserOperation, error)
DeleteUser deletes a single User.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteUserOperation ¶ added in v0.4.0
func (c *Client) DeleteUserOperation(name string) *DeleteUserOperation
DeleteUserOperation 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 ¶ added in v0.4.0
func (c *Client) FetchAccessToken(ctx context.Context, req *developerconnectpb.FetchAccessTokenRequest, opts ...gax.CallOption) (*developerconnectpb.FetchAccessTokenResponse, error)
FetchAccessToken fetches OAuth access token based on end user credentials.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) FetchGitHubInstallations ¶
func (c *Client) FetchGitHubInstallations(ctx context.Context, req *developerconnectpb.FetchGitHubInstallationsRequest, opts ...gax.CallOption) (*developerconnectpb.FetchGitHubInstallationsResponse, error)
FetchGitHubInstallations fetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection. For github.com (at http://github.com), only installations accessible to the authorizer token are returned. For GitHub Enterprise, all installations are returned.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) FetchGitRefs ¶
func (c *Client) FetchGitRefs(ctx context.Context, req *developerconnectpb.FetchGitRefsRequest, opts ...gax.CallOption) *StringIterator
FetchGitRefs fetch the list of branches or tags for a given repository.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*developerconnectpb.FetchGitRefsResponse)
}
}
Example (All) ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &developerconnectpb.FetchGitRefsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#FetchGitRefsRequest.
}
for resp, err := range c.FetchGitRefs(ctx, req).All() {
if err != 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(ctx context.Context, req *developerconnectpb.FetchLinkableGitRepositoriesRequest, opts ...gax.CallOption) *LinkableGitRepositoryIterator
FetchLinkableGitRepositories fetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*developerconnectpb.FetchLinkableGitRepositoriesResponse)
}
}
Example (All) ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &developerconnectpb.FetchLinkableGitRepositoriesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#FetchLinkableGitRepositoriesRequest.
}
for resp, err := range c.FetchLinkableGitRepositories(ctx, req).All() {
if err != 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(ctx context.Context, req *developerconnectpb.FetchReadTokenRequest, opts ...gax.CallOption) (*developerconnectpb.FetchReadTokenResponse, error)
FetchReadToken fetches read token of a given gitRepositoryLink.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) FetchReadWriteToken ¶
func (c *Client) FetchReadWriteToken(ctx context.Context, req *developerconnectpb.FetchReadWriteTokenRequest, opts ...gax.CallOption) (*developerconnectpb.FetchReadWriteTokenResponse, error)
FetchReadWriteToken fetches read/write token of a given gitRepositoryLink.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) FetchSelf ¶ added in v0.4.0
func (c *Client) FetchSelf(ctx context.Context, req *developerconnectpb.FetchSelfRequest, opts ...gax.CallOption) (*developerconnectpb.User, error)
FetchSelf fetch the User based on the user credentials.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetAccountConnector ¶ added in v0.4.0
func (c *Client) GetAccountConnector(ctx context.Context, req *developerconnectpb.GetAccountConnectorRequest, opts ...gax.CallOption) (*developerconnectpb.AccountConnector, error)
GetAccountConnector gets details of a single AccountConnector.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetConnection ¶
func (c *Client) GetConnection(ctx context.Context, req *developerconnectpb.GetConnectionRequest, opts ...gax.CallOption) (*developerconnectpb.Connection, error)
GetConnection gets details of a single Connection.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetGitRepositoryLink ¶
func (c *Client) GetGitRepositoryLink(ctx context.Context, req *developerconnectpb.GetGitRepositoryLinkRequest, opts ...gax.CallOption) (*developerconnectpb.GitRepositoryLink, error)
GetGitRepositoryLink gets details of a single GitRepositoryLink.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetLocation ¶
func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.GetLocationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
}
resp, err := c.GetLocation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetOperation ¶
func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ListAccountConnectors ¶ added in v0.4.0
func (c *Client) ListAccountConnectors(ctx context.Context, req *developerconnectpb.ListAccountConnectorsRequest, opts ...gax.CallOption) *AccountConnectorIterator
ListAccountConnectors lists AccountConnectors in a given project and location.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*developerconnectpb.ListAccountConnectorsResponse)
}
}
Example (All) ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &developerconnectpb.ListAccountConnectorsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListAccountConnectorsRequest.
}
for resp, err := range c.ListAccountConnectors(ctx, req).All() {
if err != 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(ctx context.Context, req *developerconnectpb.ListConnectionsRequest, opts ...gax.CallOption) *ConnectionIterator
ListConnections lists Connections in a given project and location.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*developerconnectpb.ListConnectionsResponse)
}
}
Example (All) ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &developerconnectpb.ListConnectionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListConnectionsRequest.
}
for resp, err := range c.ListConnections(ctx, req).All() {
if err != 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(ctx context.Context, req *developerconnectpb.ListGitRepositoryLinksRequest, opts ...gax.CallOption) *GitRepositoryLinkIterator
ListGitRepositoryLinks lists GitRepositoryLinks in a given project, location, and connection.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*developerconnectpb.ListGitRepositoryLinksResponse)
}
}
Example (All) ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &developerconnectpb.ListGitRepositoryLinksRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListGitRepositoryLinksRequest.
}
for resp, err := range c.ListGitRepositoryLinks(ctx, req).All() {
if err != 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(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
"google.golang.org/api/iterator"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
it := c.ListLocations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*locationpb.ListLocationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
for resp, err := range c.ListLocations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListOperations ¶
func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
for resp, err := range c.ListOperations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListUsers ¶ added in v0.4.0
func (c *Client) ListUsers(ctx context.Context, req *developerconnectpb.ListUsersRequest, opts ...gax.CallOption) *UserIterator
ListUsers lists Users in a given project, location, and account_connector.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*developerconnectpb.ListUsersResponse)
}
}
Example (All) ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &developerconnectpb.ListUsersRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListUsersRequest.
}
for resp, err := range c.ListUsers(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) UpdateAccountConnector ¶ added in v0.4.0
func (c *Client) UpdateAccountConnector(ctx context.Context, req *developerconnectpb.UpdateAccountConnectorRequest, opts ...gax.CallOption) (*UpdateAccountConnectorOperation, error)
UpdateAccountConnector updates the parameters of a single AccountConnector.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateAccountConnectorOperation ¶ added in v0.4.0
func (c *Client) UpdateAccountConnectorOperation(name string) *UpdateAccountConnectorOperation
UpdateAccountConnectorOperation 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(ctx context.Context, req *developerconnectpb.UpdateConnectionRequest, opts ...gax.CallOption) (*UpdateConnectionOperation, error)
UpdateConnection updates the parameters of a single Connection.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateConnectionOperation ¶
func (c *Client) UpdateConnectionOperation(name string) *UpdateConnectionOperation
UpdateConnectionOperation returns a new UpdateConnectionOperation from a given name. The name must be that of a previously created UpdateConnectionOperation, possibly from a different process.
type ConnectionIterator ¶
type ConnectionIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*developerconnectpb.Connection, nextPageToken string, err error)
// contains filtered or unexported fields
}
ConnectionIterator manages a stream of *developerconnectpb.Connection.
func (*ConnectionIterator) All ¶ added in v0.2.0
func (it *ConnectionIterator) All() iter.Seq2[*developerconnectpb.Connection, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*ConnectionIterator) PageInfo ¶
func (it *ConnectionIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CreateAccountConnectorOperation ¶ added in v0.4.0
type CreateAccountConnectorOperation struct {
// contains filtered or unexported fields
}
CreateAccountConnectorOperation manages a long-running operation from CreateAccountConnector.
func (*CreateAccountConnectorOperation) Done ¶ added in v0.4.0
func (op *CreateAccountConnectorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateAccountConnectorOperation) Metadata ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (op *CreateAccountConnectorOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateAccountConnectorOperation) Poll ¶ added in v0.4.0
func (op *CreateAccountConnectorOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateAccountConnectorOperation) Wait ¶ added in v0.4.0
func (op *CreateAccountConnectorOperation) Wait(ctx context.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.
type CreateConnectionOperation ¶
type CreateConnectionOperation struct {
// contains filtered or unexported fields
}
CreateConnectionOperation manages a long-running operation from CreateConnection.
func (*CreateConnectionOperation) Done ¶
func (op *CreateConnectionOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateConnectionOperation) Poll ¶
func (op *CreateConnectionOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateConnectionOperation) Wait ¶
func (op *CreateConnectionOperation) Wait(ctx context.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.
type CreateGitRepositoryLinkOperation ¶
type CreateGitRepositoryLinkOperation struct {
// contains filtered or unexported fields
}
CreateGitRepositoryLinkOperation manages a long-running operation from CreateGitRepositoryLink.
func (*CreateGitRepositoryLinkOperation) Done ¶
func (op *CreateGitRepositoryLinkOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateGitRepositoryLinkOperation) Poll ¶
func (op *CreateGitRepositoryLinkOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateGitRepositoryLinkOperation) Wait ¶
func (op *CreateGitRepositoryLinkOperation) Wait(ctx context.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.
type CreateInsightsConfigOperation ¶ added in v0.4.0
type CreateInsightsConfigOperation struct {
// contains filtered or unexported fields
}
CreateInsightsConfigOperation manages a long-running operation from CreateInsightsConfig.
func (*CreateInsightsConfigOperation) Done ¶ added in v0.4.0
func (op *CreateInsightsConfigOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateInsightsConfigOperation) Metadata ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (op *CreateInsightsConfigOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateInsightsConfigOperation) Poll ¶ added in v0.4.0
func (op *CreateInsightsConfigOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateInsightsConfigOperation) Wait ¶ added in v0.4.0
func (op *CreateInsightsConfigOperation) Wait(ctx context.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.
type DeleteAccountConnectorOperation ¶ added in v0.4.0
type DeleteAccountConnectorOperation struct {
// contains filtered or unexported fields
}
DeleteAccountConnectorOperation manages a long-running operation from DeleteAccountConnector.
func (*DeleteAccountConnectorOperation) Done ¶ added in v0.4.0
func (op *DeleteAccountConnectorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteAccountConnectorOperation) Metadata ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (op *DeleteAccountConnectorOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteAccountConnectorOperation) Poll ¶ added in v0.4.0
func (op *DeleteAccountConnectorOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteAccountConnectorOperation) Wait ¶ added in v0.4.0
func (op *DeleteAccountConnectorOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteConnectionOperation ¶
type DeleteConnectionOperation struct {
// contains filtered or unexported fields
}
DeleteConnectionOperation manages a long-running operation from DeleteConnection.
func (*DeleteConnectionOperation) Done ¶
func (op *DeleteConnectionOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteConnectionOperation) Poll ¶
func (op *DeleteConnectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteConnectionOperation) Wait ¶
func (op *DeleteConnectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteGitRepositoryLinkOperation ¶
type DeleteGitRepositoryLinkOperation struct {
// contains filtered or unexported fields
}
DeleteGitRepositoryLinkOperation manages a long-running operation from DeleteGitRepositoryLink.
func (*DeleteGitRepositoryLinkOperation) Done ¶
func (op *DeleteGitRepositoryLinkOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteGitRepositoryLinkOperation) Poll ¶
func (op *DeleteGitRepositoryLinkOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteGitRepositoryLinkOperation) Wait ¶
func (op *DeleteGitRepositoryLinkOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteInsightsConfigOperation ¶ added in v0.4.0
type DeleteInsightsConfigOperation struct {
// contains filtered or unexported fields
}
DeleteInsightsConfigOperation manages a long-running operation from DeleteInsightsConfig.
func (*DeleteInsightsConfigOperation) Done ¶ added in v0.4.0
func (op *DeleteInsightsConfigOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteInsightsConfigOperation) Metadata ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (op *DeleteInsightsConfigOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteInsightsConfigOperation) Poll ¶ added in v0.4.0
func (op *DeleteInsightsConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteInsightsConfigOperation) Wait ¶ added in v0.4.0
func (op *DeleteInsightsConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteSelfOperation ¶ added in v0.4.0
type DeleteSelfOperation struct {
// contains filtered or unexported fields
}
DeleteSelfOperation manages a long-running operation from DeleteSelf.
func (*DeleteSelfOperation) Done ¶ added in v0.4.0
func (op *DeleteSelfOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteSelfOperation) Metadata ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (op *DeleteSelfOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteSelfOperation) Poll ¶ added in v0.4.0
func (op *DeleteSelfOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteSelfOperation) Wait ¶ added in v0.4.0
func (op *DeleteSelfOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteUserOperation ¶ added in v0.4.0
type DeleteUserOperation struct {
// contains filtered or unexported fields
}
DeleteUserOperation manages a long-running operation from DeleteUser.
func (*DeleteUserOperation) Done ¶ added in v0.4.0
func (op *DeleteUserOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteUserOperation) Metadata ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (op *DeleteUserOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteUserOperation) Poll ¶ added in v0.4.0
func (op *DeleteUserOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteUserOperation) Wait ¶ added in v0.4.0
func (op *DeleteUserOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type GitRepositoryLinkIterator ¶
type GitRepositoryLinkIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*developerconnectpb.GitRepositoryLink, nextPageToken string, err error)
// contains filtered or unexported fields
}
GitRepositoryLinkIterator manages a stream of *developerconnectpb.GitRepositoryLink.
func (*GitRepositoryLinkIterator) All ¶ added in v0.2.0
func (it *GitRepositoryLinkIterator) All() iter.Seq2[*developerconnectpb.GitRepositoryLink, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*GitRepositoryLinkIterator) PageInfo ¶
func (it *GitRepositoryLinkIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type InsightsConfigCallOptions ¶ added in v0.4.0
type InsightsConfigCallOptions struct {
ListInsightsConfigs []gax.CallOption
CreateInsightsConfig []gax.CallOption
GetInsightsConfig []gax.CallOption
UpdateInsightsConfig []gax.CallOption
DeleteInsightsConfig []gax.CallOption
GetLocation []gax.CallOption
ListLocations []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
InsightsConfigCallOptions contains the retry settings for each method of InsightsConfigClient.
type InsightsConfigClient ¶ added in v0.4.0
type InsightsConfigClient struct {
// 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 capture events from your Software Development Lifecycle. It acts as the central hub for managing how Developer connect understands your application, its runtime environments, and the artifacts deployed within them. A user can create an InsightsConfig, list previously-requested InsightsConfigs or get InsightsConfigs by their ID to determine the status of the InsightsConfig.
func NewInsightsConfigClient ¶ added in v0.4.0
func NewInsightsConfigClient(ctx context.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 capture events from your Software Development Lifecycle. It acts as the central hub for managing how Developer connect understands your application, its runtime environments, and the artifacts deployed within them. A user can create an InsightsConfig, list previously-requested InsightsConfigs or get InsightsConfigs by their ID to determine the status of the InsightsConfig.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewInsightsConfigRESTClient ¶ added in v0.4.0
func NewInsightsConfigRESTClient(ctx context.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 capture events from your Software Development Lifecycle. It acts as the central hub for managing how Developer connect understands your application, its runtime environments, and the artifacts deployed within them. A user can create an InsightsConfig, list previously-requested InsightsConfigs or get InsightsConfigs by their ID to determine the status of the InsightsConfig.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*InsightsConfigClient) CancelOperation ¶ added in v0.4.0
func (c *InsightsConfigClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*InsightsConfigClient) Close ¶ added in v0.4.0
func (c *InsightsConfigClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*InsightsConfigClient) Connection
deprecated
added in
v0.4.0
func (c *InsightsConfigClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*InsightsConfigClient) CreateInsightsConfig ¶ added in v0.4.0
func (c *InsightsConfigClient) CreateInsightsConfig(ctx context.Context, req *developerconnectpb.CreateInsightsConfigRequest, opts ...gax.CallOption) (*CreateInsightsConfigOperation, error)
CreateInsightsConfig creates a new InsightsConfig in a given project and location.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InsightsConfigClient) CreateInsightsConfigOperation ¶ added in v0.4.0
func (c *InsightsConfigClient) CreateInsightsConfigOperation(name string) *CreateInsightsConfigOperation
CreateInsightsConfigOperation 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 ¶ added in v0.4.0
func (c *InsightsConfigClient) DeleteInsightsConfig(ctx context.Context, req *developerconnectpb.DeleteInsightsConfigRequest, opts ...gax.CallOption) (*DeleteInsightsConfigOperation, error)
DeleteInsightsConfig delete a single Insight.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*InsightsConfigClient) DeleteInsightsConfigOperation ¶ added in v0.4.0
func (c *InsightsConfigClient) DeleteInsightsConfigOperation(name string) *DeleteInsightsConfigOperation
DeleteInsightsConfigOperation 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 ¶ added in v0.4.0
func (c *InsightsConfigClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.DeleteOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
}
err = c.DeleteOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*InsightsConfigClient) GetInsightsConfig ¶ added in v0.4.0
func (c *InsightsConfigClient) GetInsightsConfig(ctx context.Context, req *developerconnectpb.GetInsightsConfigRequest, opts ...gax.CallOption) (*developerconnectpb.InsightsConfig, error)
GetInsightsConfig gets details of a single Insight.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InsightsConfigClient) GetLocation ¶ added in v0.4.0
func (c *InsightsConfigClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.GetLocationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
}
resp, err := c.GetLocation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InsightsConfigClient) GetOperation ¶ added in v0.4.0
func (c *InsightsConfigClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InsightsConfigClient) ListInsightsConfigs ¶ added in v0.4.0
func (c *InsightsConfigClient) ListInsightsConfigs(ctx context.Context, req *developerconnectpb.ListInsightsConfigsRequest, opts ...gax.CallOption) *InsightsConfigIterator
ListInsightsConfigs lists InsightsConfigs in a given project and location.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*developerconnectpb.ListInsightsConfigsResponse)
}
}
Example (All) ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &developerconnectpb.ListInsightsConfigsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/developerconnect/apiv1/developerconnectpb#ListInsightsConfigsRequest.
}
for resp, err := range c.ListInsightsConfigs(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*InsightsConfigClient) ListLocations ¶ added in v0.4.0
func (c *InsightsConfigClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
"google.golang.org/api/iterator"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
it := c.ListLocations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*locationpb.ListLocationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
for resp, err := range c.ListLocations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*InsightsConfigClient) ListOperations ¶ added in v0.4.0
func (c *InsightsConfigClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
for resp, err := range c.ListOperations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*InsightsConfigClient) UpdateInsightsConfig ¶ added in v0.4.0
func (c *InsightsConfigClient) UpdateInsightsConfig(ctx context.Context, req *developerconnectpb.UpdateInsightsConfigRequest, opts ...gax.CallOption) (*UpdateInsightsConfigOperation, error)
UpdateInsightsConfig updates the parameters of a single InsightsConfig.
Example ¶
package main
import (
"context"
developerconnect "cloud.google.com/go/developerconnect/apiv1"
developerconnectpb "cloud.google.com/go/developerconnect/apiv1/developerconnectpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := developerconnect.NewInsightsConfigClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InsightsConfigClient) UpdateInsightsConfigOperation ¶ added in v0.4.0
func (c *InsightsConfigClient) UpdateInsightsConfigOperation(name string) *UpdateInsightsConfigOperation
UpdateInsightsConfigOperation returns a new UpdateInsightsConfigOperation from a given name. The name must be that of a previously created UpdateInsightsConfigOperation, possibly from a different process.
type InsightsConfigIterator ¶ added in v0.4.0
type InsightsConfigIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*developerconnectpb.InsightsConfig, nextPageToken string, err error)
// contains filtered or unexported fields
}
InsightsConfigIterator manages a stream of *developerconnectpb.InsightsConfig.
func (*InsightsConfigIterator) All ¶ added in v0.4.0
func (it *InsightsConfigIterator) All() iter.Seq2[*developerconnectpb.InsightsConfig, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*InsightsConfigIterator) Next ¶ added in v0.4.0
func (it *InsightsConfigIterator) Next() (*developerconnectpb.InsightsConfig, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*InsightsConfigIterator) PageInfo ¶ added in v0.4.0
func (it *InsightsConfigIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type LinkableGitRepositoryIterator ¶
type LinkableGitRepositoryIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*developerconnectpb.LinkableGitRepository, nextPageToken string, err error)
// contains filtered or unexported fields
}
LinkableGitRepositoryIterator manages a stream of *developerconnectpb.LinkableGitRepository.
func (*LinkableGitRepositoryIterator) All ¶ added in v0.2.0
func (it *LinkableGitRepositoryIterator) All() iter.Seq2[*developerconnectpb.LinkableGitRepository, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*LinkableGitRepositoryIterator) PageInfo ¶
func (it *LinkableGitRepositoryIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type LocationIterator ¶
type LocationIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error)
// contains filtered or unexported fields
}
LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) All ¶ added in v0.2.0
func (it *LocationIterator) All() iter.Seq2[*locationpb.Location, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*LocationIterator) Next ¶
func (it *LocationIterator) Next() (*locationpb.Location, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*LocationIterator) PageInfo ¶
func (it *LocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type OperationIterator ¶
type OperationIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
// contains filtered or unexported fields
}
OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All ¶ added in v0.2.0
func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*OperationIterator) Next ¶
func (it *OperationIterator) Next() (*longrunningpb.Operation, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo ¶
func (it *OperationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type StringIterator ¶
type StringIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []string, nextPageToken string, err error)
// contains filtered or unexported fields
}
StringIterator manages a stream of string.
func (*StringIterator) All ¶ added in v0.2.0
func (it *StringIterator) All() iter.Seq2[string, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*StringIterator) PageInfo ¶
func (it *StringIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type UpdateAccountConnectorOperation ¶ added in v0.4.0
type UpdateAccountConnectorOperation struct {
// contains filtered or unexported fields
}
UpdateAccountConnectorOperation manages a long-running operation from UpdateAccountConnector.
func (*UpdateAccountConnectorOperation) Done ¶ added in v0.4.0
func (op *UpdateAccountConnectorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateAccountConnectorOperation) Metadata ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (op *UpdateAccountConnectorOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateAccountConnectorOperation) Poll ¶ added in v0.4.0
func (op *UpdateAccountConnectorOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateAccountConnectorOperation) Wait ¶ added in v0.4.0
func (op *UpdateAccountConnectorOperation) Wait(ctx context.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.
type UpdateConnectionOperation ¶
type UpdateConnectionOperation struct {
// contains filtered or unexported fields
}
UpdateConnectionOperation manages a long-running operation from UpdateConnection.
func (*UpdateConnectionOperation) Done ¶
func (op *UpdateConnectionOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateConnectionOperation) Poll ¶
func (op *UpdateConnectionOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateConnectionOperation) Wait ¶
func (op *UpdateConnectionOperation) Wait(ctx context.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.
type UpdateInsightsConfigOperation ¶ added in v0.4.0
type UpdateInsightsConfigOperation struct {
// contains filtered or unexported fields
}
UpdateInsightsConfigOperation manages a long-running operation from UpdateInsightsConfig.
func (*UpdateInsightsConfigOperation) Done ¶ added in v0.4.0
func (op *UpdateInsightsConfigOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateInsightsConfigOperation) Metadata ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (op *UpdateInsightsConfigOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateInsightsConfigOperation) Poll ¶ added in v0.4.0
func (op *UpdateInsightsConfigOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateInsightsConfigOperation) Wait ¶ added in v0.4.0
func (op *UpdateInsightsConfigOperation) Wait(ctx context.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.
type UserIterator ¶ added in v0.4.0
type UserIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*developerconnectpb.User, nextPageToken string, err error)
// contains filtered or unexported fields
}
UserIterator manages a stream of *developerconnectpb.User.
func (*UserIterator) All ¶ added in v0.4.0
func (it *UserIterator) All() iter.Seq2[*developerconnectpb.User, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*UserIterator) Next ¶ added in v0.4.0
func (it *UserIterator) Next() (*developerconnectpb.User, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*UserIterator) PageInfo ¶ added in v0.4.0
func (it *UserIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.