Documentation
¶
Overview ¶
Package securesourcemanager is an auto-generated package for the Secure Source Manager API.
Regionally deployed, single-tenant managed source code repository hosted on Google Cloud.
General documentation ¶
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage ¶
To get started with this package, create a client.
// go get cloud.google.com/go/securesourcemanager/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 := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client ¶
The following is an example of making an API call with the newly created client, mentioned above.
req := &securesourcemanagerpb.BatchCreatePullRequestCommentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#BatchCreatePullRequestCommentsRequest.
}
op, err := c.BatchCreatePullRequestComments(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 BatchCreatePullRequestCommentsOperation
- func (op *BatchCreatePullRequestCommentsOperation) Done() bool
- func (op *BatchCreatePullRequestCommentsOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *BatchCreatePullRequestCommentsOperation) Name() string
- func (op *BatchCreatePullRequestCommentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BatchCreatePullRequestCommentsResponse, error)
- func (op *BatchCreatePullRequestCommentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BatchCreatePullRequestCommentsResponse, error)
- type BranchRuleIterator
- type CallOptions
- type Client
- func (c *Client) BatchCreatePullRequestComments(ctx context.Context, ...) (*BatchCreatePullRequestCommentsOperation, error)
- func (c *Client) BatchCreatePullRequestCommentsOperation(name string) *BatchCreatePullRequestCommentsOperation
- func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *Client) Close() error
- func (c *Client) CloseIssue(ctx context.Context, req *securesourcemanagerpb.CloseIssueRequest, ...) (*CloseIssueOperation, error)
- func (c *Client) CloseIssueOperation(name string) *CloseIssueOperation
- func (c *Client) ClosePullRequest(ctx context.Context, req *securesourcemanagerpb.ClosePullRequestRequest, ...) (*ClosePullRequestOperation, error)
- func (c *Client) ClosePullRequestOperation(name string) *ClosePullRequestOperation
- func (c *Client) Connection() *grpc.ClientConndeprecated
- func (c *Client) CreateBranchRule(ctx context.Context, req *securesourcemanagerpb.CreateBranchRuleRequest, ...) (*CreateBranchRuleOperation, error)
- func (c *Client) CreateBranchRuleOperation(name string) *CreateBranchRuleOperation
- func (c *Client) CreateHook(ctx context.Context, req *securesourcemanagerpb.CreateHookRequest, ...) (*CreateHookOperation, error)
- func (c *Client) CreateHookOperation(name string) *CreateHookOperation
- func (c *Client) CreateInstance(ctx context.Context, req *securesourcemanagerpb.CreateInstanceRequest, ...) (*CreateInstanceOperation, error)
- func (c *Client) CreateInstanceOperation(name string) *CreateInstanceOperation
- func (c *Client) CreateIssue(ctx context.Context, req *securesourcemanagerpb.CreateIssueRequest, ...) (*CreateIssueOperation, error)
- func (c *Client) CreateIssueComment(ctx context.Context, req *securesourcemanagerpb.CreateIssueCommentRequest, ...) (*CreateIssueCommentOperation, error)
- func (c *Client) CreateIssueCommentOperation(name string) *CreateIssueCommentOperation
- func (c *Client) CreateIssueOperation(name string) *CreateIssueOperation
- func (c *Client) CreatePullRequest(ctx context.Context, req *securesourcemanagerpb.CreatePullRequestRequest, ...) (*CreatePullRequestOperation, error)
- func (c *Client) CreatePullRequestComment(ctx context.Context, ...) (*CreatePullRequestCommentOperation, error)
- func (c *Client) CreatePullRequestCommentOperation(name string) *CreatePullRequestCommentOperation
- func (c *Client) CreatePullRequestOperation(name string) *CreatePullRequestOperation
- func (c *Client) CreateRepository(ctx context.Context, req *securesourcemanagerpb.CreateRepositoryRequest, ...) (*CreateRepositoryOperation, error)
- func (c *Client) CreateRepositoryOperation(name string) *CreateRepositoryOperation
- func (c *Client) DeleteBranchRule(ctx context.Context, req *securesourcemanagerpb.DeleteBranchRuleRequest, ...) (*DeleteBranchRuleOperation, error)
- func (c *Client) DeleteBranchRuleOperation(name string) *DeleteBranchRuleOperation
- func (c *Client) DeleteHook(ctx context.Context, req *securesourcemanagerpb.DeleteHookRequest, ...) (*DeleteHookOperation, error)
- func (c *Client) DeleteHookOperation(name string) *DeleteHookOperation
- func (c *Client) DeleteInstance(ctx context.Context, req *securesourcemanagerpb.DeleteInstanceRequest, ...) (*DeleteInstanceOperation, error)
- func (c *Client) DeleteInstanceOperation(name string) *DeleteInstanceOperation
- func (c *Client) DeleteIssue(ctx context.Context, req *securesourcemanagerpb.DeleteIssueRequest, ...) (*DeleteIssueOperation, error)
- func (c *Client) DeleteIssueComment(ctx context.Context, req *securesourcemanagerpb.DeleteIssueCommentRequest, ...) (*DeleteIssueCommentOperation, error)
- func (c *Client) DeleteIssueCommentOperation(name string) *DeleteIssueCommentOperation
- func (c *Client) DeleteIssueOperation(name string) *DeleteIssueOperation
- func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *Client) DeletePullRequestComment(ctx context.Context, ...) (*DeletePullRequestCommentOperation, error)
- func (c *Client) DeletePullRequestCommentOperation(name string) *DeletePullRequestCommentOperation
- func (c *Client) DeleteRepository(ctx context.Context, req *securesourcemanagerpb.DeleteRepositoryRequest, ...) (*DeleteRepositoryOperation, error)
- func (c *Client) DeleteRepositoryOperation(name string) *DeleteRepositoryOperation
- func (c *Client) FetchBlob(ctx context.Context, req *securesourcemanagerpb.FetchBlobRequest, ...) (*securesourcemanagerpb.FetchBlobResponse, error)
- func (c *Client) FetchTree(ctx context.Context, req *securesourcemanagerpb.FetchTreeRequest, ...) *TreeEntryIterator
- func (c *Client) GetBranchRule(ctx context.Context, req *securesourcemanagerpb.GetBranchRuleRequest, ...) (*securesourcemanagerpb.BranchRule, error)
- func (c *Client) GetHook(ctx context.Context, req *securesourcemanagerpb.GetHookRequest, ...) (*securesourcemanagerpb.Hook, error)
- func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *Client) GetIamPolicyRepo(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *Client) GetInstance(ctx context.Context, req *securesourcemanagerpb.GetInstanceRequest, ...) (*securesourcemanagerpb.Instance, error)
- func (c *Client) GetIssue(ctx context.Context, req *securesourcemanagerpb.GetIssueRequest, ...) (*securesourcemanagerpb.Issue, error)
- func (c *Client) GetIssueComment(ctx context.Context, req *securesourcemanagerpb.GetIssueCommentRequest, ...) (*securesourcemanagerpb.IssueComment, 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) GetPullRequest(ctx context.Context, req *securesourcemanagerpb.GetPullRequestRequest, ...) (*securesourcemanagerpb.PullRequest, error)
- func (c *Client) GetPullRequestComment(ctx context.Context, req *securesourcemanagerpb.GetPullRequestCommentRequest, ...) (*securesourcemanagerpb.PullRequestComment, error)
- func (c *Client) GetRepository(ctx context.Context, req *securesourcemanagerpb.GetRepositoryRequest, ...) (*securesourcemanagerpb.Repository, error)
- func (c *Client) ListBranchRules(ctx context.Context, req *securesourcemanagerpb.ListBranchRulesRequest, ...) *BranchRuleIterator
- func (c *Client) ListHooks(ctx context.Context, req *securesourcemanagerpb.ListHooksRequest, ...) *HookIterator
- func (c *Client) ListInstances(ctx context.Context, req *securesourcemanagerpb.ListInstancesRequest, ...) *InstanceIterator
- func (c *Client) ListIssueComments(ctx context.Context, req *securesourcemanagerpb.ListIssueCommentsRequest, ...) *IssueCommentIterator
- func (c *Client) ListIssues(ctx context.Context, req *securesourcemanagerpb.ListIssuesRequest, ...) *IssueIterator
- 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) ListPullRequestComments(ctx context.Context, req *securesourcemanagerpb.ListPullRequestCommentsRequest, ...) *PullRequestCommentIterator
- func (c *Client) ListPullRequestFileDiffs(ctx context.Context, ...) *FileDiffIterator
- func (c *Client) ListPullRequests(ctx context.Context, req *securesourcemanagerpb.ListPullRequestsRequest, ...) *PullRequestIterator
- func (c *Client) ListRepositories(ctx context.Context, req *securesourcemanagerpb.ListRepositoriesRequest, ...) *RepositoryIterator
- func (c *Client) MergePullRequest(ctx context.Context, req *securesourcemanagerpb.MergePullRequestRequest, ...) (*MergePullRequestOperation, error)
- func (c *Client) MergePullRequestOperation(name string) *MergePullRequestOperation
- func (c *Client) OpenIssue(ctx context.Context, req *securesourcemanagerpb.OpenIssueRequest, ...) (*OpenIssueOperation, error)
- func (c *Client) OpenIssueOperation(name string) *OpenIssueOperation
- func (c *Client) OpenPullRequest(ctx context.Context, req *securesourcemanagerpb.OpenPullRequestRequest, ...) (*OpenPullRequestOperation, error)
- func (c *Client) OpenPullRequestOperation(name string) *OpenPullRequestOperation
- func (c *Client) ResolvePullRequestComments(ctx context.Context, ...) (*ResolvePullRequestCommentsOperation, error)
- func (c *Client) ResolvePullRequestCommentsOperation(name string) *ResolvePullRequestCommentsOperation
- func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *Client) SetIamPolicyRepo(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, ...) (*iampb.TestIamPermissionsResponse, error)
- func (c *Client) TestIamPermissionsRepo(ctx context.Context, req *iampb.TestIamPermissionsRequest, ...) (*iampb.TestIamPermissionsResponse, error)
- func (c *Client) UnresolvePullRequestComments(ctx context.Context, ...) (*UnresolvePullRequestCommentsOperation, error)
- func (c *Client) UnresolvePullRequestCommentsOperation(name string) *UnresolvePullRequestCommentsOperation
- func (c *Client) UpdateBranchRule(ctx context.Context, req *securesourcemanagerpb.UpdateBranchRuleRequest, ...) (*UpdateBranchRuleOperation, error)
- func (c *Client) UpdateBranchRuleOperation(name string) *UpdateBranchRuleOperation
- func (c *Client) UpdateHook(ctx context.Context, req *securesourcemanagerpb.UpdateHookRequest, ...) (*UpdateHookOperation, error)
- func (c *Client) UpdateHookOperation(name string) *UpdateHookOperation
- func (c *Client) UpdateIssue(ctx context.Context, req *securesourcemanagerpb.UpdateIssueRequest, ...) (*UpdateIssueOperation, error)
- func (c *Client) UpdateIssueComment(ctx context.Context, req *securesourcemanagerpb.UpdateIssueCommentRequest, ...) (*UpdateIssueCommentOperation, error)
- func (c *Client) UpdateIssueCommentOperation(name string) *UpdateIssueCommentOperation
- func (c *Client) UpdateIssueOperation(name string) *UpdateIssueOperation
- func (c *Client) UpdatePullRequest(ctx context.Context, req *securesourcemanagerpb.UpdatePullRequestRequest, ...) (*UpdatePullRequestOperation, error)
- func (c *Client) UpdatePullRequestComment(ctx context.Context, ...) (*UpdatePullRequestCommentOperation, error)
- func (c *Client) UpdatePullRequestCommentOperation(name string) *UpdatePullRequestCommentOperation
- func (c *Client) UpdatePullRequestOperation(name string) *UpdatePullRequestOperation
- func (c *Client) UpdateRepository(ctx context.Context, req *securesourcemanagerpb.UpdateRepositoryRequest, ...) (*UpdateRepositoryOperation, error)
- func (c *Client) UpdateRepositoryOperation(name string) *UpdateRepositoryOperation
- type CloseIssueOperation
- func (op *CloseIssueOperation) Done() bool
- func (op *CloseIssueOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *CloseIssueOperation) Name() string
- func (op *CloseIssueOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, error)
- func (op *CloseIssueOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, error)
- type ClosePullRequestOperation
- func (op *ClosePullRequestOperation) Done() bool
- func (op *ClosePullRequestOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *ClosePullRequestOperation) Name() string
- func (op *ClosePullRequestOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, error)
- func (op *ClosePullRequestOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, error)
- type CreateBranchRuleOperation
- func (op *CreateBranchRuleOperation) Done() bool
- func (op *CreateBranchRuleOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *CreateBranchRuleOperation) Name() string
- func (op *CreateBranchRuleOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
- func (op *CreateBranchRuleOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
- type CreateHookOperation
- func (op *CreateHookOperation) Done() bool
- func (op *CreateHookOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *CreateHookOperation) Name() string
- func (op *CreateHookOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Hook, error)
- func (op *CreateHookOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Hook, error)
- type CreateInstanceOperation
- func (op *CreateInstanceOperation) Done() bool
- func (op *CreateInstanceOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *CreateInstanceOperation) Name() string
- func (op *CreateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Instance, error)
- func (op *CreateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Instance, error)
- type CreateIssueCommentOperation
- func (op *CreateIssueCommentOperation) Done() bool
- func (op *CreateIssueCommentOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *CreateIssueCommentOperation) Name() string
- func (op *CreateIssueCommentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.IssueComment, error)
- func (op *CreateIssueCommentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.IssueComment, error)
- type CreateIssueOperation
- func (op *CreateIssueOperation) Done() bool
- func (op *CreateIssueOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *CreateIssueOperation) Name() string
- func (op *CreateIssueOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, error)
- func (op *CreateIssueOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, error)
- type CreatePullRequestCommentOperation
- func (op *CreatePullRequestCommentOperation) Done() bool
- func (op *CreatePullRequestCommentOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *CreatePullRequestCommentOperation) Name() string
- func (op *CreatePullRequestCommentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequestComment, error)
- func (op *CreatePullRequestCommentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequestComment, error)
- type CreatePullRequestOperation
- func (op *CreatePullRequestOperation) Done() bool
- func (op *CreatePullRequestOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *CreatePullRequestOperation) Name() string
- func (op *CreatePullRequestOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, error)
- func (op *CreatePullRequestOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, error)
- type CreateRepositoryOperation
- func (op *CreateRepositoryOperation) Done() bool
- func (op *CreateRepositoryOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *CreateRepositoryOperation) Name() string
- func (op *CreateRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
- func (op *CreateRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
- type DeleteBranchRuleOperation
- func (op *DeleteBranchRuleOperation) Done() bool
- func (op *DeleteBranchRuleOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *DeleteBranchRuleOperation) Name() string
- func (op *DeleteBranchRuleOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteBranchRuleOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteHookOperation
- func (op *DeleteHookOperation) Done() bool
- func (op *DeleteHookOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *DeleteHookOperation) Name() string
- func (op *DeleteHookOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteHookOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteInstanceOperation
- func (op *DeleteInstanceOperation) Done() bool
- func (op *DeleteInstanceOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *DeleteInstanceOperation) Name() string
- func (op *DeleteInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteIssueCommentOperation
- func (op *DeleteIssueCommentOperation) Done() bool
- func (op *DeleteIssueCommentOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *DeleteIssueCommentOperation) Name() string
- func (op *DeleteIssueCommentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteIssueCommentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteIssueOperation
- func (op *DeleteIssueOperation) Done() bool
- func (op *DeleteIssueOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *DeleteIssueOperation) Name() string
- func (op *DeleteIssueOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteIssueOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeletePullRequestCommentOperation
- func (op *DeletePullRequestCommentOperation) Done() bool
- func (op *DeletePullRequestCommentOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *DeletePullRequestCommentOperation) Name() string
- func (op *DeletePullRequestCommentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeletePullRequestCommentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteRepositoryOperation
- func (op *DeleteRepositoryOperation) Done() bool
- func (op *DeleteRepositoryOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *DeleteRepositoryOperation) Name() string
- func (op *DeleteRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type FileDiffIterator
- type HookIterator
- type InstanceIterator
- type IssueCommentIterator
- type IssueIterator
- type LocationIterator
- type MergePullRequestOperation
- func (op *MergePullRequestOperation) Done() bool
- func (op *MergePullRequestOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *MergePullRequestOperation) Name() string
- func (op *MergePullRequestOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, error)
- func (op *MergePullRequestOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, error)
- type OpenIssueOperation
- func (op *OpenIssueOperation) Done() bool
- func (op *OpenIssueOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *OpenIssueOperation) Name() string
- func (op *OpenIssueOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, error)
- func (op *OpenIssueOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, error)
- type OpenPullRequestOperation
- func (op *OpenPullRequestOperation) Done() bool
- func (op *OpenPullRequestOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *OpenPullRequestOperation) Name() string
- func (op *OpenPullRequestOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, error)
- func (op *OpenPullRequestOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, error)
- type OperationIterator
- type PullRequestCommentIterator
- type PullRequestIterator
- type RepositoryIterator
- type ResolvePullRequestCommentsOperation
- func (op *ResolvePullRequestCommentsOperation) Done() bool
- func (op *ResolvePullRequestCommentsOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *ResolvePullRequestCommentsOperation) Name() string
- func (op *ResolvePullRequestCommentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.ResolvePullRequestCommentsResponse, error)
- func (op *ResolvePullRequestCommentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.ResolvePullRequestCommentsResponse, error)
- type TreeEntryIterator
- type UnresolvePullRequestCommentsOperation
- func (op *UnresolvePullRequestCommentsOperation) Done() bool
- func (op *UnresolvePullRequestCommentsOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *UnresolvePullRequestCommentsOperation) Name() string
- func (op *UnresolvePullRequestCommentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.UnresolvePullRequestCommentsResponse, error)
- func (op *UnresolvePullRequestCommentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.UnresolvePullRequestCommentsResponse, error)
- type UpdateBranchRuleOperation
- func (op *UpdateBranchRuleOperation) Done() bool
- func (op *UpdateBranchRuleOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *UpdateBranchRuleOperation) Name() string
- func (op *UpdateBranchRuleOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
- func (op *UpdateBranchRuleOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
- type UpdateHookOperation
- func (op *UpdateHookOperation) Done() bool
- func (op *UpdateHookOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *UpdateHookOperation) Name() string
- func (op *UpdateHookOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Hook, error)
- func (op *UpdateHookOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Hook, error)
- type UpdateIssueCommentOperation
- func (op *UpdateIssueCommentOperation) Done() bool
- func (op *UpdateIssueCommentOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *UpdateIssueCommentOperation) Name() string
- func (op *UpdateIssueCommentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.IssueComment, error)
- func (op *UpdateIssueCommentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.IssueComment, error)
- type UpdateIssueOperation
- func (op *UpdateIssueOperation) Done() bool
- func (op *UpdateIssueOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *UpdateIssueOperation) Name() string
- func (op *UpdateIssueOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, error)
- func (op *UpdateIssueOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, error)
- type UpdatePullRequestCommentOperation
- func (op *UpdatePullRequestCommentOperation) Done() bool
- func (op *UpdatePullRequestCommentOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *UpdatePullRequestCommentOperation) Name() string
- func (op *UpdatePullRequestCommentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequestComment, error)
- func (op *UpdatePullRequestCommentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequestComment, error)
- type UpdatePullRequestOperation
- func (op *UpdatePullRequestOperation) Done() bool
- func (op *UpdatePullRequestOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *UpdatePullRequestOperation) Name() string
- func (op *UpdatePullRequestOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, error)
- func (op *UpdatePullRequestOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, error)
- type UpdateRepositoryOperation
- func (op *UpdateRepositoryOperation) Done() bool
- func (op *UpdateRepositoryOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *UpdateRepositoryOperation) Name() string
- func (op *UpdateRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
- func (op *UpdateRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
Examples ¶
- Client.BatchCreatePullRequestComments
- Client.CancelOperation
- Client.CloseIssue
- Client.ClosePullRequest
- Client.CreateBranchRule
- Client.CreateHook
- Client.CreateInstance
- Client.CreateIssue
- Client.CreateIssueComment
- Client.CreatePullRequest
- Client.CreatePullRequestComment
- Client.CreateRepository
- Client.DeleteBranchRule
- Client.DeleteHook
- Client.DeleteInstance
- Client.DeleteIssue
- Client.DeleteIssueComment
- Client.DeleteOperation
- Client.DeletePullRequestComment
- Client.DeleteRepository
- Client.FetchBlob
- Client.FetchTree
- Client.FetchTree (All)
- Client.GetBranchRule
- Client.GetHook
- Client.GetIamPolicy
- Client.GetIamPolicyRepo
- Client.GetInstance
- Client.GetIssue
- Client.GetIssueComment
- Client.GetLocation
- Client.GetOperation
- Client.GetPullRequest
- Client.GetPullRequestComment
- Client.GetRepository
- Client.ListBranchRules
- Client.ListBranchRules (All)
- Client.ListHooks
- Client.ListHooks (All)
- Client.ListInstances
- Client.ListInstances (All)
- Client.ListIssueComments
- Client.ListIssueComments (All)
- Client.ListIssues
- Client.ListIssues (All)
- Client.ListLocations
- Client.ListLocations (All)
- Client.ListOperations
- Client.ListOperations (All)
- Client.ListPullRequestComments
- Client.ListPullRequestComments (All)
- Client.ListPullRequestFileDiffs
- Client.ListPullRequestFileDiffs (All)
- Client.ListPullRequests
- Client.ListPullRequests (All)
- Client.ListRepositories
- Client.ListRepositories (All)
- Client.MergePullRequest
- Client.OpenIssue
- Client.OpenPullRequest
- Client.ResolvePullRequestComments
- Client.SetIamPolicy
- Client.SetIamPolicyRepo
- Client.TestIamPermissions
- Client.TestIamPermissionsRepo
- Client.UnresolvePullRequestComments
- Client.UpdateBranchRule
- Client.UpdateHook
- Client.UpdateIssue
- Client.UpdateIssueComment
- Client.UpdatePullRequest
- Client.UpdatePullRequestComment
- Client.UpdateRepository
- NewClient
- 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 BatchCreatePullRequestCommentsOperation ¶ added in v1.4.0
type BatchCreatePullRequestCommentsOperation struct {
// contains filtered or unexported fields
}
BatchCreatePullRequestCommentsOperation manages a long-running operation from BatchCreatePullRequestComments.
func (*BatchCreatePullRequestCommentsOperation) Done ¶ added in v1.4.0
func (op *BatchCreatePullRequestCommentsOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*BatchCreatePullRequestCommentsOperation) Metadata ¶ added in v1.4.0
func (op *BatchCreatePullRequestCommentsOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*BatchCreatePullRequestCommentsOperation) Name ¶ added in v1.4.0
func (op *BatchCreatePullRequestCommentsOperation) 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 (*BatchCreatePullRequestCommentsOperation) Poll ¶ added in v1.4.0
func (op *BatchCreatePullRequestCommentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BatchCreatePullRequestCommentsResponse, 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 (*BatchCreatePullRequestCommentsOperation) Wait ¶ added in v1.4.0
func (op *BatchCreatePullRequestCommentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BatchCreatePullRequestCommentsResponse, 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 BranchRuleIterator ¶ added in v1.3.0
type BranchRuleIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*securesourcemanagerpb.BranchRule, nextPageToken string, err error)
// contains filtered or unexported fields
}
BranchRuleIterator manages a stream of *securesourcemanagerpb.BranchRule.
func (*BranchRuleIterator) All ¶ added in v1.3.0
func (it *BranchRuleIterator) All() iter.Seq2[*securesourcemanagerpb.BranchRule, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*BranchRuleIterator) Next ¶ added in v1.3.0
func (it *BranchRuleIterator) Next() (*securesourcemanagerpb.BranchRule, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*BranchRuleIterator) PageInfo ¶ added in v1.3.0
func (it *BranchRuleIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CallOptions ¶
type CallOptions struct {
ListInstances []gax.CallOption
GetInstance []gax.CallOption
CreateInstance []gax.CallOption
DeleteInstance []gax.CallOption
ListRepositories []gax.CallOption
GetRepository []gax.CallOption
CreateRepository []gax.CallOption
UpdateRepository []gax.CallOption
DeleteRepository []gax.CallOption
ListHooks []gax.CallOption
GetHook []gax.CallOption
CreateHook []gax.CallOption
UpdateHook []gax.CallOption
DeleteHook []gax.CallOption
GetIamPolicyRepo []gax.CallOption
SetIamPolicyRepo []gax.CallOption
TestIamPermissionsRepo []gax.CallOption
CreateBranchRule []gax.CallOption
ListBranchRules []gax.CallOption
GetBranchRule []gax.CallOption
UpdateBranchRule []gax.CallOption
DeleteBranchRule []gax.CallOption
CreatePullRequest []gax.CallOption
GetPullRequest []gax.CallOption
ListPullRequests []gax.CallOption
UpdatePullRequest []gax.CallOption
MergePullRequest []gax.CallOption
OpenPullRequest []gax.CallOption
ClosePullRequest []gax.CallOption
ListPullRequestFileDiffs []gax.CallOption
FetchTree []gax.CallOption
FetchBlob []gax.CallOption
CreateIssue []gax.CallOption
GetIssue []gax.CallOption
ListIssues []gax.CallOption
UpdateIssue []gax.CallOption
DeleteIssue []gax.CallOption
OpenIssue []gax.CallOption
CloseIssue []gax.CallOption
GetPullRequestComment []gax.CallOption
ListPullRequestComments []gax.CallOption
CreatePullRequestComment []gax.CallOption
UpdatePullRequestComment []gax.CallOption
DeletePullRequestComment []gax.CallOption
BatchCreatePullRequestComments []gax.CallOption
ResolvePullRequestComments []gax.CallOption
UnresolvePullRequestComments []gax.CallOption
CreateIssueComment []gax.CallOption
GetIssueComment []gax.CallOption
ListIssueComments []gax.CallOption
UpdateIssueComment []gax.CallOption
DeleteIssueComment []gax.CallOption
GetLocation []gax.CallOption
ListLocations []gax.CallOption
GetIamPolicy []gax.CallOption
SetIamPolicy []gax.CallOption
TestIamPermissions []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
CallOptions contains the retry settings for each method of Client.
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 Secure Source Manager API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Secure Source Manager API ¶
Access Secure Source Manager instances, resources, and repositories.
func NewClient ¶
NewClient creates a new secure source manager client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Secure Source Manager API ¶
Access Secure Source Manager instances, resources, and repositories.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewRESTClient ¶
NewRESTClient creates a new secure source manager rest client.
Secure Source Manager API ¶
Access Secure Source Manager instances, resources, and repositories.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*Client) BatchCreatePullRequestComments ¶ added in v1.4.0
func (c *Client) BatchCreatePullRequestComments(ctx context.Context, req *securesourcemanagerpb.BatchCreatePullRequestCommentsRequest, opts ...gax.CallOption) (*BatchCreatePullRequestCommentsOperation, error)
BatchCreatePullRequestComments batch creates pull request comments. This function is used to create multiple PullRequestComments for code review. There needs to be exactly one PullRequestComment of type Review, and at most 100 PullRequestComments of type Code per request. The Postition of the code comments must be unique within the request.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.BatchCreatePullRequestCommentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#BatchCreatePullRequestCommentsRequest.
}
op, err := c.BatchCreatePullRequestComments(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) BatchCreatePullRequestCommentsOperation ¶ added in v1.4.0
func (c *Client) BatchCreatePullRequestCommentsOperation(name string) *BatchCreatePullRequestCommentsOperation
BatchCreatePullRequestCommentsOperation returns a new BatchCreatePullRequestCommentsOperation from a given name. The name must be that of a previously created BatchCreatePullRequestCommentsOperation, possibly from a different process.
func (*Client) CancelOperation ¶
func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) Close ¶
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) CloseIssue ¶ added in v1.4.0
func (c *Client) CloseIssue(ctx context.Context, req *securesourcemanagerpb.CloseIssueRequest, opts ...gax.CallOption) (*CloseIssueOperation, error)
CloseIssue closes an issue.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.CloseIssueRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CloseIssueRequest.
}
op, err := c.CloseIssue(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) CloseIssueOperation ¶ added in v1.4.0
func (c *Client) CloseIssueOperation(name string) *CloseIssueOperation
CloseIssueOperation returns a new CloseIssueOperation from a given name. The name must be that of a previously created CloseIssueOperation, possibly from a different process.
func (*Client) ClosePullRequest ¶ added in v1.4.0
func (c *Client) ClosePullRequest(ctx context.Context, req *securesourcemanagerpb.ClosePullRequestRequest, opts ...gax.CallOption) (*ClosePullRequestOperation, error)
ClosePullRequest closes a pull request without merging.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ClosePullRequestRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ClosePullRequestRequest.
}
op, err := c.ClosePullRequest(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) ClosePullRequestOperation ¶ added in v1.4.0
func (c *Client) ClosePullRequestOperation(name string) *ClosePullRequestOperation
ClosePullRequestOperation returns a new ClosePullRequestOperation from a given name. The name must be that of a previously created ClosePullRequestOperation, possibly from a different process.
func (*Client) Connection
deprecated
func (c *Client) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*Client) CreateBranchRule ¶ added in v1.3.0
func (c *Client) CreateBranchRule(ctx context.Context, req *securesourcemanagerpb.CreateBranchRuleRequest, opts ...gax.CallOption) (*CreateBranchRuleOperation, error)
CreateBranchRule createBranchRule creates a branch rule in a given repository.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.CreateBranchRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreateBranchRuleRequest.
}
op, err := c.CreateBranchRule(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateBranchRuleOperation ¶ added in v1.3.0
func (c *Client) CreateBranchRuleOperation(name string) *CreateBranchRuleOperation
CreateBranchRuleOperation returns a new CreateBranchRuleOperation from a given name. The name must be that of a previously created CreateBranchRuleOperation, possibly from a different process.
func (*Client) CreateHook ¶ added in v1.4.0
func (c *Client) CreateHook(ctx context.Context, req *securesourcemanagerpb.CreateHookRequest, opts ...gax.CallOption) (*CreateHookOperation, error)
CreateHook creates a new hook in a given repository.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.CreateHookRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreateHookRequest.
}
op, err := c.CreateHook(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) CreateHookOperation ¶ added in v1.4.0
func (c *Client) CreateHookOperation(name string) *CreateHookOperation
CreateHookOperation returns a new CreateHookOperation from a given name. The name must be that of a previously created CreateHookOperation, possibly from a different process.
func (*Client) CreateInstance ¶
func (c *Client) CreateInstance(ctx context.Context, req *securesourcemanagerpb.CreateInstanceRequest, opts ...gax.CallOption) (*CreateInstanceOperation, error)
CreateInstance creates a new instance in a given project and location.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.CreateInstanceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreateInstanceRequest.
}
op, err := c.CreateInstance(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateInstanceOperation ¶
func (c *Client) CreateInstanceOperation(name string) *CreateInstanceOperation
CreateInstanceOperation returns a new CreateInstanceOperation from a given name. The name must be that of a previously created CreateInstanceOperation, possibly from a different process.
func (*Client) CreateIssue ¶ added in v1.4.0
func (c *Client) CreateIssue(ctx context.Context, req *securesourcemanagerpb.CreateIssueRequest, opts ...gax.CallOption) (*CreateIssueOperation, error)
CreateIssue creates an issue.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.CreateIssueRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreateIssueRequest.
}
op, err := c.CreateIssue(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) CreateIssueComment ¶ added in v1.4.0
func (c *Client) CreateIssueComment(ctx context.Context, req *securesourcemanagerpb.CreateIssueCommentRequest, opts ...gax.CallOption) (*CreateIssueCommentOperation, error)
CreateIssueComment creates an issue comment.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.CreateIssueCommentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreateIssueCommentRequest.
}
op, err := c.CreateIssueComment(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) CreateIssueCommentOperation ¶ added in v1.4.0
func (c *Client) CreateIssueCommentOperation(name string) *CreateIssueCommentOperation
CreateIssueCommentOperation returns a new CreateIssueCommentOperation from a given name. The name must be that of a previously created CreateIssueCommentOperation, possibly from a different process.
func (*Client) CreateIssueOperation ¶ added in v1.4.0
func (c *Client) CreateIssueOperation(name string) *CreateIssueOperation
CreateIssueOperation returns a new CreateIssueOperation from a given name. The name must be that of a previously created CreateIssueOperation, possibly from a different process.
func (*Client) CreatePullRequest ¶ added in v1.4.0
func (c *Client) CreatePullRequest(ctx context.Context, req *securesourcemanagerpb.CreatePullRequestRequest, opts ...gax.CallOption) (*CreatePullRequestOperation, error)
CreatePullRequest creates a pull request.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.CreatePullRequestRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreatePullRequestRequest.
}
op, err := c.CreatePullRequest(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) CreatePullRequestComment ¶ added in v1.4.0
func (c *Client) CreatePullRequestComment(ctx context.Context, req *securesourcemanagerpb.CreatePullRequestCommentRequest, opts ...gax.CallOption) (*CreatePullRequestCommentOperation, error)
CreatePullRequestComment creates a pull request comment. This function is used to create a single PullRequestComment of type Comment, or a single PullRequestComment of type Code that’s replying to another PullRequestComment of type Code. Use BatchCreatePullRequestComments to create multiple PullRequestComments for code reviews.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.CreatePullRequestCommentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreatePullRequestCommentRequest.
}
op, err := c.CreatePullRequestComment(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) CreatePullRequestCommentOperation ¶ added in v1.4.0
func (c *Client) CreatePullRequestCommentOperation(name string) *CreatePullRequestCommentOperation
CreatePullRequestCommentOperation returns a new CreatePullRequestCommentOperation from a given name. The name must be that of a previously created CreatePullRequestCommentOperation, possibly from a different process.
func (*Client) CreatePullRequestOperation ¶ added in v1.4.0
func (c *Client) CreatePullRequestOperation(name string) *CreatePullRequestOperation
CreatePullRequestOperation returns a new CreatePullRequestOperation from a given name. The name must be that of a previously created CreatePullRequestOperation, possibly from a different process.
func (*Client) CreateRepository ¶
func (c *Client) CreateRepository(ctx context.Context, req *securesourcemanagerpb.CreateRepositoryRequest, opts ...gax.CallOption) (*CreateRepositoryOperation, error)
CreateRepository creates a new repository in a given project and location.
The Repository.Instance field is required in the request body for requests using the securesourcemanager.googleapis.com (at http://securesourcemanager.googleapis.com) endpoint.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.CreateRepositoryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreateRepositoryRequest.
}
op, err := c.CreateRepository(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateRepositoryOperation ¶
func (c *Client) CreateRepositoryOperation(name string) *CreateRepositoryOperation
CreateRepositoryOperation returns a new CreateRepositoryOperation from a given name. The name must be that of a previously created CreateRepositoryOperation, possibly from a different process.
func (*Client) DeleteBranchRule ¶ added in v1.3.0
func (c *Client) DeleteBranchRule(ctx context.Context, req *securesourcemanagerpb.DeleteBranchRuleRequest, opts ...gax.CallOption) (*DeleteBranchRuleOperation, error)
DeleteBranchRule deleteBranchRule deletes a branch rule.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.DeleteBranchRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#DeleteBranchRuleRequest.
}
op, err := c.DeleteBranchRule(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteBranchRuleOperation ¶ added in v1.3.0
func (c *Client) DeleteBranchRuleOperation(name string) *DeleteBranchRuleOperation
DeleteBranchRuleOperation returns a new DeleteBranchRuleOperation from a given name. The name must be that of a previously created DeleteBranchRuleOperation, possibly from a different process.
func (*Client) DeleteHook ¶ added in v1.4.0
func (c *Client) DeleteHook(ctx context.Context, req *securesourcemanagerpb.DeleteHookRequest, opts ...gax.CallOption) (*DeleteHookOperation, error)
DeleteHook deletes a Hook.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.DeleteHookRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#DeleteHookRequest.
}
op, err := c.DeleteHook(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteHookOperation ¶ added in v1.4.0
func (c *Client) DeleteHookOperation(name string) *DeleteHookOperation
DeleteHookOperation returns a new DeleteHookOperation from a given name. The name must be that of a previously created DeleteHookOperation, possibly from a different process.
func (*Client) DeleteInstance ¶
func (c *Client) DeleteInstance(ctx context.Context, req *securesourcemanagerpb.DeleteInstanceRequest, opts ...gax.CallOption) (*DeleteInstanceOperation, error)
DeleteInstance deletes a single instance.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.DeleteInstanceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#DeleteInstanceRequest.
}
op, err := c.DeleteInstance(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteInstanceOperation ¶
func (c *Client) DeleteInstanceOperation(name string) *DeleteInstanceOperation
DeleteInstanceOperation returns a new DeleteInstanceOperation from a given name. The name must be that of a previously created DeleteInstanceOperation, possibly from a different process.
func (*Client) DeleteIssue ¶ added in v1.4.0
func (c *Client) DeleteIssue(ctx context.Context, req *securesourcemanagerpb.DeleteIssueRequest, opts ...gax.CallOption) (*DeleteIssueOperation, error)
DeleteIssue deletes an issue.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.DeleteIssueRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#DeleteIssueRequest.
}
op, err := c.DeleteIssue(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteIssueComment ¶ added in v1.4.0
func (c *Client) DeleteIssueComment(ctx context.Context, req *securesourcemanagerpb.DeleteIssueCommentRequest, opts ...gax.CallOption) (*DeleteIssueCommentOperation, error)
DeleteIssueComment deletes an issue comment.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.DeleteIssueCommentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#DeleteIssueCommentRequest.
}
op, err := c.DeleteIssueComment(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteIssueCommentOperation ¶ added in v1.4.0
func (c *Client) DeleteIssueCommentOperation(name string) *DeleteIssueCommentOperation
DeleteIssueCommentOperation returns a new DeleteIssueCommentOperation from a given name. The name must be that of a previously created DeleteIssueCommentOperation, possibly from a different process.
func (*Client) DeleteIssueOperation ¶ added in v1.4.0
func (c *Client) DeleteIssueOperation(name string) *DeleteIssueOperation
DeleteIssueOperation returns a new DeleteIssueOperation from a given name. The name must be that of a previously created DeleteIssueOperation, possibly from a different process.
func (*Client) DeleteOperation ¶
func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.DeleteOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
}
err = c.DeleteOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeletePullRequestComment ¶ added in v1.4.0
func (c *Client) DeletePullRequestComment(ctx context.Context, req *securesourcemanagerpb.DeletePullRequestCommentRequest, opts ...gax.CallOption) (*DeletePullRequestCommentOperation, error)
DeletePullRequestComment deletes a pull request comment.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.DeletePullRequestCommentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#DeletePullRequestCommentRequest.
}
op, err := c.DeletePullRequestComment(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeletePullRequestCommentOperation ¶ added in v1.4.0
func (c *Client) DeletePullRequestCommentOperation(name string) *DeletePullRequestCommentOperation
DeletePullRequestCommentOperation returns a new DeletePullRequestCommentOperation from a given name. The name must be that of a previously created DeletePullRequestCommentOperation, possibly from a different process.
func (*Client) DeleteRepository ¶
func (c *Client) DeleteRepository(ctx context.Context, req *securesourcemanagerpb.DeleteRepositoryRequest, opts ...gax.CallOption) (*DeleteRepositoryOperation, error)
DeleteRepository deletes a Repository.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.DeleteRepositoryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#DeleteRepositoryRequest.
}
op, err := c.DeleteRepository(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteRepositoryOperation ¶
func (c *Client) DeleteRepositoryOperation(name string) *DeleteRepositoryOperation
DeleteRepositoryOperation returns a new DeleteRepositoryOperation from a given name. The name must be that of a previously created DeleteRepositoryOperation, possibly from a different process.
func (*Client) FetchBlob ¶ added in v1.4.0
func (c *Client) FetchBlob(ctx context.Context, req *securesourcemanagerpb.FetchBlobRequest, opts ...gax.CallOption) (*securesourcemanagerpb.FetchBlobResponse, error)
FetchBlob fetches a blob from a repository.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.FetchBlobRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#FetchBlobRequest.
}
resp, err := c.FetchBlob(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) FetchTree ¶ added in v1.4.0
func (c *Client) FetchTree(ctx context.Context, req *securesourcemanagerpb.FetchTreeRequest, opts ...gax.CallOption) *TreeEntryIterator
FetchTree fetches a tree from a repository.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.FetchTreeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#FetchTreeRequest.
}
it := c.FetchTree(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*securesourcemanagerpb.FetchTreeResponse)
}
}
Example (All) ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.FetchTreeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#FetchTreeRequest.
}
for resp, err := range c.FetchTree(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) GetBranchRule ¶ added in v1.3.0
func (c *Client) GetBranchRule(ctx context.Context, req *securesourcemanagerpb.GetBranchRuleRequest, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
GetBranchRule getBranchRule gets a branch rule.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.GetBranchRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#GetBranchRuleRequest.
}
resp, err := c.GetBranchRule(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetHook ¶ added in v1.4.0
func (c *Client) GetHook(ctx context.Context, req *securesourcemanagerpb.GetHookRequest, opts ...gax.CallOption) (*securesourcemanagerpb.Hook, error)
GetHook gets metadata of a hook.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.GetHookRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#GetHookRequest.
}
resp, err := c.GetHook(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetIamPolicy ¶
func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Example ¶
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.GetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.
}
resp, err := c.GetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetIamPolicyRepo ¶
func (c *Client) GetIamPolicyRepo(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicyRepo get IAM policy for a repository.
Example ¶
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.GetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.
}
resp, err := c.GetIamPolicyRepo(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetInstance ¶
func (c *Client) GetInstance(ctx context.Context, req *securesourcemanagerpb.GetInstanceRequest, opts ...gax.CallOption) (*securesourcemanagerpb.Instance, error)
GetInstance gets details of a single instance.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.GetInstanceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#GetInstanceRequest.
}
resp, err := c.GetInstance(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetIssue ¶ added in v1.4.0
func (c *Client) GetIssue(ctx context.Context, req *securesourcemanagerpb.GetIssueRequest, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, error)
GetIssue gets an issue.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.GetIssueRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#GetIssueRequest.
}
resp, err := c.GetIssue(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetIssueComment ¶ added in v1.4.0
func (c *Client) GetIssueComment(ctx context.Context, req *securesourcemanagerpb.GetIssueCommentRequest, opts ...gax.CallOption) (*securesourcemanagerpb.IssueComment, error)
GetIssueComment gets an issue comment.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.GetIssueCommentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#GetIssueCommentRequest.
}
resp, err := c.GetIssueComment(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetLocation ¶
func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.GetLocationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
}
resp, err := c.GetLocation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetOperation ¶
func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetPullRequest ¶ added in v1.4.0
func (c *Client) GetPullRequest(ctx context.Context, req *securesourcemanagerpb.GetPullRequestRequest, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, error)
GetPullRequest gets a pull request.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.GetPullRequestRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#GetPullRequestRequest.
}
resp, err := c.GetPullRequest(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetPullRequestComment ¶ added in v1.4.0
func (c *Client) GetPullRequestComment(ctx context.Context, req *securesourcemanagerpb.GetPullRequestCommentRequest, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequestComment, error)
GetPullRequestComment gets a pull request comment.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.GetPullRequestCommentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#GetPullRequestCommentRequest.
}
resp, err := c.GetPullRequestComment(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetRepository ¶
func (c *Client) GetRepository(ctx context.Context, req *securesourcemanagerpb.GetRepositoryRequest, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
GetRepository gets metadata of a repository.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.GetRepositoryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#GetRepositoryRequest.
}
resp, err := c.GetRepository(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ListBranchRules ¶ added in v1.3.0
func (c *Client) ListBranchRules(ctx context.Context, req *securesourcemanagerpb.ListBranchRulesRequest, opts ...gax.CallOption) *BranchRuleIterator
ListBranchRules listBranchRules lists branch rules in a given repository.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListBranchRulesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListBranchRulesRequest.
}
it := c.ListBranchRules(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*securesourcemanagerpb.ListBranchRulesResponse)
}
}
Example (All) ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListBranchRulesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListBranchRulesRequest.
}
for resp, err := range c.ListBranchRules(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListHooks ¶ added in v1.4.0
func (c *Client) ListHooks(ctx context.Context, req *securesourcemanagerpb.ListHooksRequest, opts ...gax.CallOption) *HookIterator
ListHooks lists hooks in a given repository.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListHooksRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListHooksRequest.
}
it := c.ListHooks(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*securesourcemanagerpb.ListHooksResponse)
}
}
Example (All) ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListHooksRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListHooksRequest.
}
for resp, err := range c.ListHooks(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) ListInstances ¶
func (c *Client) ListInstances(ctx context.Context, req *securesourcemanagerpb.ListInstancesRequest, opts ...gax.CallOption) *InstanceIterator
ListInstances lists Instances in a given project and location.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListInstancesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListInstancesRequest.
}
it := c.ListInstances(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*securesourcemanagerpb.ListInstancesResponse)
}
}
Example (All) ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListInstancesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListInstancesRequest.
}
for resp, err := range c.ListInstances(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListIssueComments ¶ added in v1.4.0
func (c *Client) ListIssueComments(ctx context.Context, req *securesourcemanagerpb.ListIssueCommentsRequest, opts ...gax.CallOption) *IssueCommentIterator
ListIssueComments lists comments in an issue.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListIssueCommentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListIssueCommentsRequest.
}
it := c.ListIssueComments(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*securesourcemanagerpb.ListIssueCommentsResponse)
}
}
Example (All) ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListIssueCommentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListIssueCommentsRequest.
}
for resp, err := range c.ListIssueComments(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) ListIssues ¶ added in v1.4.0
func (c *Client) ListIssues(ctx context.Context, req *securesourcemanagerpb.ListIssuesRequest, opts ...gax.CallOption) *IssueIterator
ListIssues lists issues in a repository.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListIssuesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListIssuesRequest.
}
it := c.ListIssues(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*securesourcemanagerpb.ListIssuesResponse)
}
}
Example (All) ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListIssuesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListIssuesRequest.
}
for resp, err := range c.ListIssues(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"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
"google.golang.org/api/iterator"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
it := c.ListLocations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*locationpb.ListLocationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
for resp, err := range c.ListLocations(ctx, req).All() {
if err != nil {
// TODO: Handle error 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"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
for resp, err := range c.ListOperations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListPullRequestComments ¶ added in v1.4.0
func (c *Client) ListPullRequestComments(ctx context.Context, req *securesourcemanagerpb.ListPullRequestCommentsRequest, opts ...gax.CallOption) *PullRequestCommentIterator
ListPullRequestComments lists pull request comments.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListPullRequestCommentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListPullRequestCommentsRequest.
}
it := c.ListPullRequestComments(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*securesourcemanagerpb.ListPullRequestCommentsResponse)
}
}
Example (All) ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListPullRequestCommentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListPullRequestCommentsRequest.
}
for resp, err := range c.ListPullRequestComments(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) ListPullRequestFileDiffs ¶ added in v1.4.0
func (c *Client) ListPullRequestFileDiffs(ctx context.Context, req *securesourcemanagerpb.ListPullRequestFileDiffsRequest, opts ...gax.CallOption) *FileDiffIterator
ListPullRequestFileDiffs lists a pull request’s file diffs.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListPullRequestFileDiffsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListPullRequestFileDiffsRequest.
}
it := c.ListPullRequestFileDiffs(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*securesourcemanagerpb.ListPullRequestFileDiffsResponse)
}
}
Example (All) ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListPullRequestFileDiffsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListPullRequestFileDiffsRequest.
}
for resp, err := range c.ListPullRequestFileDiffs(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) ListPullRequests ¶ added in v1.4.0
func (c *Client) ListPullRequests(ctx context.Context, req *securesourcemanagerpb.ListPullRequestsRequest, opts ...gax.CallOption) *PullRequestIterator
ListPullRequests lists pull requests in a repository.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListPullRequestsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListPullRequestsRequest.
}
it := c.ListPullRequests(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*securesourcemanagerpb.ListPullRequestsResponse)
}
}
Example (All) ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListPullRequestsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListPullRequestsRequest.
}
for resp, err := range c.ListPullRequests(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) ListRepositories ¶
func (c *Client) ListRepositories(ctx context.Context, req *securesourcemanagerpb.ListRepositoriesRequest, opts ...gax.CallOption) *RepositoryIterator
ListRepositories lists Repositories in a given project and location.
The instance field is required in the query parameter for requests using the securesourcemanager.googleapis.com (at http://securesourcemanager.googleapis.com) endpoint.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListRepositoriesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListRepositoriesRequest.
}
it := c.ListRepositories(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*securesourcemanagerpb.ListRepositoriesResponse)
}
}
Example (All) ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ListRepositoriesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListRepositoriesRequest.
}
for resp, err := range c.ListRepositories(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) MergePullRequest ¶ added in v1.4.0
func (c *Client) MergePullRequest(ctx context.Context, req *securesourcemanagerpb.MergePullRequestRequest, opts ...gax.CallOption) (*MergePullRequestOperation, error)
MergePullRequest merges a pull request.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.MergePullRequestRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#MergePullRequestRequest.
}
op, err := c.MergePullRequest(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) MergePullRequestOperation ¶ added in v1.4.0
func (c *Client) MergePullRequestOperation(name string) *MergePullRequestOperation
MergePullRequestOperation returns a new MergePullRequestOperation from a given name. The name must be that of a previously created MergePullRequestOperation, possibly from a different process.
func (*Client) OpenIssue ¶ added in v1.4.0
func (c *Client) OpenIssue(ctx context.Context, req *securesourcemanagerpb.OpenIssueRequest, opts ...gax.CallOption) (*OpenIssueOperation, error)
OpenIssue opens an issue.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.OpenIssueRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#OpenIssueRequest.
}
op, err := c.OpenIssue(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) OpenIssueOperation ¶ added in v1.4.0
func (c *Client) OpenIssueOperation(name string) *OpenIssueOperation
OpenIssueOperation returns a new OpenIssueOperation from a given name. The name must be that of a previously created OpenIssueOperation, possibly from a different process.
func (*Client) OpenPullRequest ¶ added in v1.4.0
func (c *Client) OpenPullRequest(ctx context.Context, req *securesourcemanagerpb.OpenPullRequestRequest, opts ...gax.CallOption) (*OpenPullRequestOperation, error)
OpenPullRequest opens a pull request.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.OpenPullRequestRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#OpenPullRequestRequest.
}
op, err := c.OpenPullRequest(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) OpenPullRequestOperation ¶ added in v1.4.0
func (c *Client) OpenPullRequestOperation(name string) *OpenPullRequestOperation
OpenPullRequestOperation returns a new OpenPullRequestOperation from a given name. The name must be that of a previously created OpenPullRequestOperation, possibly from a different process.
func (*Client) ResolvePullRequestComments ¶ added in v1.4.0
func (c *Client) ResolvePullRequestComments(ctx context.Context, req *securesourcemanagerpb.ResolvePullRequestCommentsRequest, opts ...gax.CallOption) (*ResolvePullRequestCommentsOperation, error)
ResolvePullRequestComments resolves pull request comments. A list of PullRequestComment names must be provided. The PullRequestComment names must be in the same conversation thread. If auto_fill is set, all comments in the conversation thread will be resolved.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.ResolvePullRequestCommentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ResolvePullRequestCommentsRequest.
}
op, err := c.ResolvePullRequestComments(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) ResolvePullRequestCommentsOperation ¶ added in v1.4.0
func (c *Client) ResolvePullRequestCommentsOperation(name string) *ResolvePullRequestCommentsOperation
ResolvePullRequestCommentsOperation returns a new ResolvePullRequestCommentsOperation from a given name. The name must be that of a previously created ResolvePullRequestCommentsOperation, possibly from a different process.
func (*Client) SetIamPolicy ¶
func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
Example ¶
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.SetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.
}
resp, err := c.SetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) SetIamPolicyRepo ¶
func (c *Client) SetIamPolicyRepo(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicyRepo set IAM policy on a repository.
Example ¶
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.SetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.
}
resp, err := c.SetIamPolicyRepo(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) TestIamPermissions ¶
func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
Example ¶
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.TestIamPermissionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.
}
resp, err := c.TestIamPermissions(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) TestIamPermissionsRepo ¶
func (c *Client) TestIamPermissionsRepo(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissionsRepo test IAM permissions on a repository. IAM permission checks are not required on this method.
Example ¶
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.TestIamPermissionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.
}
resp, err := c.TestIamPermissionsRepo(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UnresolvePullRequestComments ¶ added in v1.4.0
func (c *Client) UnresolvePullRequestComments(ctx context.Context, req *securesourcemanagerpb.UnresolvePullRequestCommentsRequest, opts ...gax.CallOption) (*UnresolvePullRequestCommentsOperation, error)
UnresolvePullRequestComments unresolves pull request comments. A list of PullRequestComment names must be provided. The PullRequestComment names must be in the same conversation thread. If auto_fill is set, all comments in the conversation thread will be unresolved.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.UnresolvePullRequestCommentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#UnresolvePullRequestCommentsRequest.
}
op, err := c.UnresolvePullRequestComments(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) UnresolvePullRequestCommentsOperation ¶ added in v1.4.0
func (c *Client) UnresolvePullRequestCommentsOperation(name string) *UnresolvePullRequestCommentsOperation
UnresolvePullRequestCommentsOperation returns a new UnresolvePullRequestCommentsOperation from a given name. The name must be that of a previously created UnresolvePullRequestCommentsOperation, possibly from a different process.
func (*Client) UpdateBranchRule ¶ added in v1.3.0
func (c *Client) UpdateBranchRule(ctx context.Context, req *securesourcemanagerpb.UpdateBranchRuleRequest, opts ...gax.CallOption) (*UpdateBranchRuleOperation, error)
UpdateBranchRule updateBranchRule updates a branch rule.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.UpdateBranchRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#UpdateBranchRuleRequest.
}
op, err := c.UpdateBranchRule(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateBranchRuleOperation ¶ added in v1.3.0
func (c *Client) UpdateBranchRuleOperation(name string) *UpdateBranchRuleOperation
UpdateBranchRuleOperation returns a new UpdateBranchRuleOperation from a given name. The name must be that of a previously created UpdateBranchRuleOperation, possibly from a different process.
func (*Client) UpdateHook ¶ added in v1.4.0
func (c *Client) UpdateHook(ctx context.Context, req *securesourcemanagerpb.UpdateHookRequest, opts ...gax.CallOption) (*UpdateHookOperation, error)
UpdateHook updates the metadata of a hook.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.UpdateHookRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#UpdateHookRequest.
}
op, err := c.UpdateHook(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) UpdateHookOperation ¶ added in v1.4.0
func (c *Client) UpdateHookOperation(name string) *UpdateHookOperation
UpdateHookOperation returns a new UpdateHookOperation from a given name. The name must be that of a previously created UpdateHookOperation, possibly from a different process.
func (*Client) UpdateIssue ¶ added in v1.4.0
func (c *Client) UpdateIssue(ctx context.Context, req *securesourcemanagerpb.UpdateIssueRequest, opts ...gax.CallOption) (*UpdateIssueOperation, error)
UpdateIssue updates a issue.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.UpdateIssueRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#UpdateIssueRequest.
}
op, err := c.UpdateIssue(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) UpdateIssueComment ¶ added in v1.4.0
func (c *Client) UpdateIssueComment(ctx context.Context, req *securesourcemanagerpb.UpdateIssueCommentRequest, opts ...gax.CallOption) (*UpdateIssueCommentOperation, error)
UpdateIssueComment updates an issue comment.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.UpdateIssueCommentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#UpdateIssueCommentRequest.
}
op, err := c.UpdateIssueComment(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) UpdateIssueCommentOperation ¶ added in v1.4.0
func (c *Client) UpdateIssueCommentOperation(name string) *UpdateIssueCommentOperation
UpdateIssueCommentOperation returns a new UpdateIssueCommentOperation from a given name. The name must be that of a previously created UpdateIssueCommentOperation, possibly from a different process.
func (*Client) UpdateIssueOperation ¶ added in v1.4.0
func (c *Client) UpdateIssueOperation(name string) *UpdateIssueOperation
UpdateIssueOperation returns a new UpdateIssueOperation from a given name. The name must be that of a previously created UpdateIssueOperation, possibly from a different process.
func (*Client) UpdatePullRequest ¶ added in v1.4.0
func (c *Client) UpdatePullRequest(ctx context.Context, req *securesourcemanagerpb.UpdatePullRequestRequest, opts ...gax.CallOption) (*UpdatePullRequestOperation, error)
UpdatePullRequest updates a pull request.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.UpdatePullRequestRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#UpdatePullRequestRequest.
}
op, err := c.UpdatePullRequest(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) UpdatePullRequestComment ¶ added in v1.4.0
func (c *Client) UpdatePullRequestComment(ctx context.Context, req *securesourcemanagerpb.UpdatePullRequestCommentRequest, opts ...gax.CallOption) (*UpdatePullRequestCommentOperation, error)
UpdatePullRequestComment updates a pull request comment.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.UpdatePullRequestCommentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#UpdatePullRequestCommentRequest.
}
op, err := c.UpdatePullRequestComment(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) UpdatePullRequestCommentOperation ¶ added in v1.4.0
func (c *Client) UpdatePullRequestCommentOperation(name string) *UpdatePullRequestCommentOperation
UpdatePullRequestCommentOperation returns a new UpdatePullRequestCommentOperation from a given name. The name must be that of a previously created UpdatePullRequestCommentOperation, possibly from a different process.
func (*Client) UpdatePullRequestOperation ¶ added in v1.4.0
func (c *Client) UpdatePullRequestOperation(name string) *UpdatePullRequestOperation
UpdatePullRequestOperation returns a new UpdatePullRequestOperation from a given name. The name must be that of a previously created UpdatePullRequestOperation, possibly from a different process.
func (*Client) UpdateRepository ¶ added in v1.4.0
func (c *Client) UpdateRepository(ctx context.Context, req *securesourcemanagerpb.UpdateRepositoryRequest, opts ...gax.CallOption) (*UpdateRepositoryOperation, error)
UpdateRepository updates the metadata of a repository.
Example ¶
package main
import (
"context"
securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1"
securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := securesourcemanager.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &securesourcemanagerpb.UpdateRepositoryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#UpdateRepositoryRequest.
}
op, err := c.UpdateRepository(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) UpdateRepositoryOperation ¶ added in v1.4.0
func (c *Client) UpdateRepositoryOperation(name string) *UpdateRepositoryOperation
UpdateRepositoryOperation returns a new UpdateRepositoryOperation from a given name. The name must be that of a previously created UpdateRepositoryOperation, possibly from a different process.
type CloseIssueOperation ¶ added in v1.4.0
type CloseIssueOperation struct {
// contains filtered or unexported fields
}
CloseIssueOperation manages a long-running operation from CloseIssue.
func (*CloseIssueOperation) Done ¶ added in v1.4.0
func (op *CloseIssueOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CloseIssueOperation) Metadata ¶ added in v1.4.0
func (op *CloseIssueOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CloseIssueOperation) Name ¶ added in v1.4.0
func (op *CloseIssueOperation) 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 (*CloseIssueOperation) Poll ¶ added in v1.4.0
func (op *CloseIssueOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, 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 (*CloseIssueOperation) Wait ¶ added in v1.4.0
func (op *CloseIssueOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, 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 ClosePullRequestOperation ¶ added in v1.4.0
type ClosePullRequestOperation struct {
// contains filtered or unexported fields
}
ClosePullRequestOperation manages a long-running operation from ClosePullRequest.
func (*ClosePullRequestOperation) Done ¶ added in v1.4.0
func (op *ClosePullRequestOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ClosePullRequestOperation) Metadata ¶ added in v1.4.0
func (op *ClosePullRequestOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*ClosePullRequestOperation) Name ¶ added in v1.4.0
func (op *ClosePullRequestOperation) 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 (*ClosePullRequestOperation) Poll ¶ added in v1.4.0
func (op *ClosePullRequestOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, 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 (*ClosePullRequestOperation) Wait ¶ added in v1.4.0
func (op *ClosePullRequestOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, 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 CreateBranchRuleOperation ¶ added in v1.3.0
type CreateBranchRuleOperation struct {
// contains filtered or unexported fields
}
CreateBranchRuleOperation manages a long-running operation from CreateBranchRule.
func (*CreateBranchRuleOperation) Done ¶ added in v1.3.0
func (op *CreateBranchRuleOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateBranchRuleOperation) Metadata ¶ added in v1.3.0
func (op *CreateBranchRuleOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateBranchRuleOperation) Name ¶ added in v1.3.0
func (op *CreateBranchRuleOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateBranchRuleOperation) Poll ¶ added in v1.3.0
func (op *CreateBranchRuleOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateBranchRuleOperation) Wait ¶ added in v1.3.0
func (op *CreateBranchRuleOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateHookOperation ¶ added in v1.4.0
type CreateHookOperation struct {
// contains filtered or unexported fields
}
CreateHookOperation manages a long-running operation from CreateHook.
func (*CreateHookOperation) Done ¶ added in v1.4.0
func (op *CreateHookOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateHookOperation) Metadata ¶ added in v1.4.0
func (op *CreateHookOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateHookOperation) Name ¶ added in v1.4.0
func (op *CreateHookOperation) 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 (*CreateHookOperation) Poll ¶ added in v1.4.0
func (op *CreateHookOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Hook, 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 (*CreateHookOperation) Wait ¶ added in v1.4.0
func (op *CreateHookOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Hook, 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 CreateInstanceOperation ¶
type CreateInstanceOperation struct {
// contains filtered or unexported fields
}
CreateInstanceOperation manages a long-running operation from CreateInstance.
func (*CreateInstanceOperation) Done ¶
func (op *CreateInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateInstanceOperation) Metadata ¶
func (op *CreateInstanceOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateInstanceOperation) Name ¶
func (op *CreateInstanceOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateInstanceOperation) Poll ¶
func (op *CreateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Instance, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateInstanceOperation) Wait ¶
func (op *CreateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Instance, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateIssueCommentOperation ¶ added in v1.4.0
type CreateIssueCommentOperation struct {
// contains filtered or unexported fields
}
CreateIssueCommentOperation manages a long-running operation from CreateIssueComment.
func (*CreateIssueCommentOperation) Done ¶ added in v1.4.0
func (op *CreateIssueCommentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateIssueCommentOperation) Metadata ¶ added in v1.4.0
func (op *CreateIssueCommentOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateIssueCommentOperation) Name ¶ added in v1.4.0
func (op *CreateIssueCommentOperation) 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 (*CreateIssueCommentOperation) Poll ¶ added in v1.4.0
func (op *CreateIssueCommentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.IssueComment, 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 (*CreateIssueCommentOperation) Wait ¶ added in v1.4.0
func (op *CreateIssueCommentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.IssueComment, 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 CreateIssueOperation ¶ added in v1.4.0
type CreateIssueOperation struct {
// contains filtered or unexported fields
}
CreateIssueOperation manages a long-running operation from CreateIssue.
func (*CreateIssueOperation) Done ¶ added in v1.4.0
func (op *CreateIssueOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateIssueOperation) Metadata ¶ added in v1.4.0
func (op *CreateIssueOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateIssueOperation) Name ¶ added in v1.4.0
func (op *CreateIssueOperation) 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 (*CreateIssueOperation) Poll ¶ added in v1.4.0
func (op *CreateIssueOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, 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 (*CreateIssueOperation) Wait ¶ added in v1.4.0
func (op *CreateIssueOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, 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 CreatePullRequestCommentOperation ¶ added in v1.4.0
type CreatePullRequestCommentOperation struct {
// contains filtered or unexported fields
}
CreatePullRequestCommentOperation manages a long-running operation from CreatePullRequestComment.
func (*CreatePullRequestCommentOperation) Done ¶ added in v1.4.0
func (op *CreatePullRequestCommentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreatePullRequestCommentOperation) Metadata ¶ added in v1.4.0
func (op *CreatePullRequestCommentOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreatePullRequestCommentOperation) Name ¶ added in v1.4.0
func (op *CreatePullRequestCommentOperation) 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 (*CreatePullRequestCommentOperation) Poll ¶ added in v1.4.0
func (op *CreatePullRequestCommentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequestComment, 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 (*CreatePullRequestCommentOperation) Wait ¶ added in v1.4.0
func (op *CreatePullRequestCommentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequestComment, 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 CreatePullRequestOperation ¶ added in v1.4.0
type CreatePullRequestOperation struct {
// contains filtered or unexported fields
}
CreatePullRequestOperation manages a long-running operation from CreatePullRequest.
func (*CreatePullRequestOperation) Done ¶ added in v1.4.0
func (op *CreatePullRequestOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreatePullRequestOperation) Metadata ¶ added in v1.4.0
func (op *CreatePullRequestOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreatePullRequestOperation) Name ¶ added in v1.4.0
func (op *CreatePullRequestOperation) 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 (*CreatePullRequestOperation) Poll ¶ added in v1.4.0
func (op *CreatePullRequestOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, 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 (*CreatePullRequestOperation) Wait ¶ added in v1.4.0
func (op *CreatePullRequestOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, 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 CreateRepositoryOperation ¶
type CreateRepositoryOperation struct {
// contains filtered or unexported fields
}
CreateRepositoryOperation manages a long-running operation from CreateRepository.
func (*CreateRepositoryOperation) Done ¶
func (op *CreateRepositoryOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateRepositoryOperation) Metadata ¶
func (op *CreateRepositoryOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateRepositoryOperation) Name ¶
func (op *CreateRepositoryOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateRepositoryOperation) Poll ¶
func (op *CreateRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateRepositoryOperation) Wait ¶
func (op *CreateRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteBranchRuleOperation ¶ added in v1.3.0
type DeleteBranchRuleOperation struct {
// contains filtered or unexported fields
}
DeleteBranchRuleOperation manages a long-running operation from DeleteBranchRule.
func (*DeleteBranchRuleOperation) Done ¶ added in v1.3.0
func (op *DeleteBranchRuleOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteBranchRuleOperation) Metadata ¶ added in v1.3.0
func (op *DeleteBranchRuleOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteBranchRuleOperation) Name ¶ added in v1.3.0
func (op *DeleteBranchRuleOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteBranchRuleOperation) Poll ¶ added in v1.3.0
func (op *DeleteBranchRuleOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteBranchRuleOperation) Wait ¶ added in v1.3.0
func (op *DeleteBranchRuleOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteHookOperation ¶ added in v1.4.0
type DeleteHookOperation struct {
// contains filtered or unexported fields
}
DeleteHookOperation manages a long-running operation from DeleteHook.
func (*DeleteHookOperation) Done ¶ added in v1.4.0
func (op *DeleteHookOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteHookOperation) Metadata ¶ added in v1.4.0
func (op *DeleteHookOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteHookOperation) Name ¶ added in v1.4.0
func (op *DeleteHookOperation) 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 (*DeleteHookOperation) Poll ¶ added in v1.4.0
func (op *DeleteHookOperation) 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 (*DeleteHookOperation) Wait ¶ added in v1.4.0
func (op *DeleteHookOperation) 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 DeleteInstanceOperation ¶
type DeleteInstanceOperation struct {
// contains filtered or unexported fields
}
DeleteInstanceOperation manages a long-running operation from DeleteInstance.
func (*DeleteInstanceOperation) Done ¶
func (op *DeleteInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteInstanceOperation) Metadata ¶
func (op *DeleteInstanceOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteInstanceOperation) Name ¶
func (op *DeleteInstanceOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteInstanceOperation) Poll ¶
func (op *DeleteInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteInstanceOperation) Wait ¶
func (op *DeleteInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteIssueCommentOperation ¶ added in v1.4.0
type DeleteIssueCommentOperation struct {
// contains filtered or unexported fields
}
DeleteIssueCommentOperation manages a long-running operation from DeleteIssueComment.
func (*DeleteIssueCommentOperation) Done ¶ added in v1.4.0
func (op *DeleteIssueCommentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteIssueCommentOperation) Metadata ¶ added in v1.4.0
func (op *DeleteIssueCommentOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteIssueCommentOperation) Name ¶ added in v1.4.0
func (op *DeleteIssueCommentOperation) 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 (*DeleteIssueCommentOperation) Poll ¶ added in v1.4.0
func (op *DeleteIssueCommentOperation) 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 (*DeleteIssueCommentOperation) Wait ¶ added in v1.4.0
func (op *DeleteIssueCommentOperation) 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 DeleteIssueOperation ¶ added in v1.4.0
type DeleteIssueOperation struct {
// contains filtered or unexported fields
}
DeleteIssueOperation manages a long-running operation from DeleteIssue.
func (*DeleteIssueOperation) Done ¶ added in v1.4.0
func (op *DeleteIssueOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteIssueOperation) Metadata ¶ added in v1.4.0
func (op *DeleteIssueOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteIssueOperation) Name ¶ added in v1.4.0
func (op *DeleteIssueOperation) 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 (*DeleteIssueOperation) Poll ¶ added in v1.4.0
func (op *DeleteIssueOperation) 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 (*DeleteIssueOperation) Wait ¶ added in v1.4.0
func (op *DeleteIssueOperation) 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 DeletePullRequestCommentOperation ¶ added in v1.4.0
type DeletePullRequestCommentOperation struct {
// contains filtered or unexported fields
}
DeletePullRequestCommentOperation manages a long-running operation from DeletePullRequestComment.
func (*DeletePullRequestCommentOperation) Done ¶ added in v1.4.0
func (op *DeletePullRequestCommentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeletePullRequestCommentOperation) Metadata ¶ added in v1.4.0
func (op *DeletePullRequestCommentOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeletePullRequestCommentOperation) Name ¶ added in v1.4.0
func (op *DeletePullRequestCommentOperation) 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 (*DeletePullRequestCommentOperation) Poll ¶ added in v1.4.0
func (op *DeletePullRequestCommentOperation) 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 (*DeletePullRequestCommentOperation) Wait ¶ added in v1.4.0
func (op *DeletePullRequestCommentOperation) 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 DeleteRepositoryOperation ¶
type DeleteRepositoryOperation struct {
// contains filtered or unexported fields
}
DeleteRepositoryOperation manages a long-running operation from DeleteRepository.
func (*DeleteRepositoryOperation) Done ¶
func (op *DeleteRepositoryOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteRepositoryOperation) Metadata ¶
func (op *DeleteRepositoryOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteRepositoryOperation) Name ¶
func (op *DeleteRepositoryOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteRepositoryOperation) Poll ¶
func (op *DeleteRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteRepositoryOperation) Wait ¶
func (op *DeleteRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type FileDiffIterator ¶ added in v1.4.0
type FileDiffIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*securesourcemanagerpb.FileDiff, nextPageToken string, err error)
// contains filtered or unexported fields
}
FileDiffIterator manages a stream of *securesourcemanagerpb.FileDiff.
func (*FileDiffIterator) All ¶ added in v1.4.0
func (it *FileDiffIterator) All() iter.Seq2[*securesourcemanagerpb.FileDiff, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*FileDiffIterator) Next ¶ added in v1.4.0
func (it *FileDiffIterator) Next() (*securesourcemanagerpb.FileDiff, 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 (*FileDiffIterator) PageInfo ¶ added in v1.4.0
func (it *FileDiffIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type HookIterator ¶ added in v1.4.0
type HookIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*securesourcemanagerpb.Hook, nextPageToken string, err error)
// contains filtered or unexported fields
}
HookIterator manages a stream of *securesourcemanagerpb.Hook.
func (*HookIterator) All ¶ added in v1.4.0
func (it *HookIterator) All() iter.Seq2[*securesourcemanagerpb.Hook, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*HookIterator) Next ¶ added in v1.4.0
func (it *HookIterator) Next() (*securesourcemanagerpb.Hook, 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 (*HookIterator) PageInfo ¶ added in v1.4.0
func (it *HookIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type InstanceIterator ¶
type InstanceIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*securesourcemanagerpb.Instance, nextPageToken string, err error)
// contains filtered or unexported fields
}
InstanceIterator manages a stream of *securesourcemanagerpb.Instance.
func (*InstanceIterator) All ¶ added in v1.2.1
func (it *InstanceIterator) All() iter.Seq2[*securesourcemanagerpb.Instance, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*InstanceIterator) Next ¶
func (it *InstanceIterator) Next() (*securesourcemanagerpb.Instance, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*InstanceIterator) PageInfo ¶
func (it *InstanceIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type IssueCommentIterator ¶ added in v1.4.0
type IssueCommentIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*securesourcemanagerpb.IssueComment, nextPageToken string, err error)
// contains filtered or unexported fields
}
IssueCommentIterator manages a stream of *securesourcemanagerpb.IssueComment.
func (*IssueCommentIterator) All ¶ added in v1.4.0
func (it *IssueCommentIterator) All() iter.Seq2[*securesourcemanagerpb.IssueComment, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*IssueCommentIterator) Next ¶ added in v1.4.0
func (it *IssueCommentIterator) Next() (*securesourcemanagerpb.IssueComment, 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 (*IssueCommentIterator) PageInfo ¶ added in v1.4.0
func (it *IssueCommentIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type IssueIterator ¶ added in v1.4.0
type IssueIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*securesourcemanagerpb.Issue, nextPageToken string, err error)
// contains filtered or unexported fields
}
IssueIterator manages a stream of *securesourcemanagerpb.Issue.
func (*IssueIterator) All ¶ added in v1.4.0
func (it *IssueIterator) All() iter.Seq2[*securesourcemanagerpb.Issue, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*IssueIterator) Next ¶ added in v1.4.0
func (it *IssueIterator) Next() (*securesourcemanagerpb.Issue, 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 (*IssueIterator) PageInfo ¶ added in v1.4.0
func (it *IssueIterator) 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 v1.2.1
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 MergePullRequestOperation ¶ added in v1.4.0
type MergePullRequestOperation struct {
// contains filtered or unexported fields
}
MergePullRequestOperation manages a long-running operation from MergePullRequest.
func (*MergePullRequestOperation) Done ¶ added in v1.4.0
func (op *MergePullRequestOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*MergePullRequestOperation) Metadata ¶ added in v1.4.0
func (op *MergePullRequestOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*MergePullRequestOperation) Name ¶ added in v1.4.0
func (op *MergePullRequestOperation) 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 (*MergePullRequestOperation) Poll ¶ added in v1.4.0
func (op *MergePullRequestOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, 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 (*MergePullRequestOperation) Wait ¶ added in v1.4.0
func (op *MergePullRequestOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, 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 OpenIssueOperation ¶ added in v1.4.0
type OpenIssueOperation struct {
// contains filtered or unexported fields
}
OpenIssueOperation manages a long-running operation from OpenIssue.
func (*OpenIssueOperation) Done ¶ added in v1.4.0
func (op *OpenIssueOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*OpenIssueOperation) Metadata ¶ added in v1.4.0
func (op *OpenIssueOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*OpenIssueOperation) Name ¶ added in v1.4.0
func (op *OpenIssueOperation) 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 (*OpenIssueOperation) Poll ¶ added in v1.4.0
func (op *OpenIssueOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, 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 (*OpenIssueOperation) Wait ¶ added in v1.4.0
func (op *OpenIssueOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, 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 OpenPullRequestOperation ¶ added in v1.4.0
type OpenPullRequestOperation struct {
// contains filtered or unexported fields
}
OpenPullRequestOperation manages a long-running operation from OpenPullRequest.
func (*OpenPullRequestOperation) Done ¶ added in v1.4.0
func (op *OpenPullRequestOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*OpenPullRequestOperation) Metadata ¶ added in v1.4.0
func (op *OpenPullRequestOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*OpenPullRequestOperation) Name ¶ added in v1.4.0
func (op *OpenPullRequestOperation) 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 (*OpenPullRequestOperation) Poll ¶ added in v1.4.0
func (op *OpenPullRequestOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, 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 (*OpenPullRequestOperation) Wait ¶ added in v1.4.0
func (op *OpenPullRequestOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, 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 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 v1.2.1
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 PullRequestCommentIterator ¶ added in v1.4.0
type PullRequestCommentIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*securesourcemanagerpb.PullRequestComment, nextPageToken string, err error)
// contains filtered or unexported fields
}
PullRequestCommentIterator manages a stream of *securesourcemanagerpb.PullRequestComment.
func (*PullRequestCommentIterator) All ¶ added in v1.4.0
func (it *PullRequestCommentIterator) All() iter.Seq2[*securesourcemanagerpb.PullRequestComment, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*PullRequestCommentIterator) Next ¶ added in v1.4.0
func (it *PullRequestCommentIterator) Next() (*securesourcemanagerpb.PullRequestComment, 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 (*PullRequestCommentIterator) PageInfo ¶ added in v1.4.0
func (it *PullRequestCommentIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type PullRequestIterator ¶ added in v1.4.0
type PullRequestIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*securesourcemanagerpb.PullRequest, nextPageToken string, err error)
// contains filtered or unexported fields
}
PullRequestIterator manages a stream of *securesourcemanagerpb.PullRequest.
func (*PullRequestIterator) All ¶ added in v1.4.0
func (it *PullRequestIterator) All() iter.Seq2[*securesourcemanagerpb.PullRequest, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*PullRequestIterator) Next ¶ added in v1.4.0
func (it *PullRequestIterator) Next() (*securesourcemanagerpb.PullRequest, 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 (*PullRequestIterator) PageInfo ¶ added in v1.4.0
func (it *PullRequestIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type RepositoryIterator ¶
type RepositoryIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*securesourcemanagerpb.Repository, nextPageToken string, err error)
// contains filtered or unexported fields
}
RepositoryIterator manages a stream of *securesourcemanagerpb.Repository.
func (*RepositoryIterator) All ¶ added in v1.2.1
func (it *RepositoryIterator) All() iter.Seq2[*securesourcemanagerpb.Repository, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*RepositoryIterator) Next ¶
func (it *RepositoryIterator) Next() (*securesourcemanagerpb.Repository, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*RepositoryIterator) PageInfo ¶
func (it *RepositoryIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ResolvePullRequestCommentsOperation ¶ added in v1.4.0
type ResolvePullRequestCommentsOperation struct {
// contains filtered or unexported fields
}
ResolvePullRequestCommentsOperation manages a long-running operation from ResolvePullRequestComments.
func (*ResolvePullRequestCommentsOperation) Done ¶ added in v1.4.0
func (op *ResolvePullRequestCommentsOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ResolvePullRequestCommentsOperation) Metadata ¶ added in v1.4.0
func (op *ResolvePullRequestCommentsOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*ResolvePullRequestCommentsOperation) Name ¶ added in v1.4.0
func (op *ResolvePullRequestCommentsOperation) 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 (*ResolvePullRequestCommentsOperation) Poll ¶ added in v1.4.0
func (op *ResolvePullRequestCommentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.ResolvePullRequestCommentsResponse, 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 (*ResolvePullRequestCommentsOperation) Wait ¶ added in v1.4.0
func (op *ResolvePullRequestCommentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.ResolvePullRequestCommentsResponse, 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 TreeEntryIterator ¶ added in v1.4.0
type TreeEntryIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*securesourcemanagerpb.TreeEntry, nextPageToken string, err error)
// contains filtered or unexported fields
}
TreeEntryIterator manages a stream of *securesourcemanagerpb.TreeEntry.
func (*TreeEntryIterator) All ¶ added in v1.4.0
func (it *TreeEntryIterator) All() iter.Seq2[*securesourcemanagerpb.TreeEntry, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*TreeEntryIterator) Next ¶ added in v1.4.0
func (it *TreeEntryIterator) Next() (*securesourcemanagerpb.TreeEntry, 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 (*TreeEntryIterator) PageInfo ¶ added in v1.4.0
func (it *TreeEntryIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type UnresolvePullRequestCommentsOperation ¶ added in v1.4.0
type UnresolvePullRequestCommentsOperation struct {
// contains filtered or unexported fields
}
UnresolvePullRequestCommentsOperation manages a long-running operation from UnresolvePullRequestComments.
func (*UnresolvePullRequestCommentsOperation) Done ¶ added in v1.4.0
func (op *UnresolvePullRequestCommentsOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UnresolvePullRequestCommentsOperation) Metadata ¶ added in v1.4.0
func (op *UnresolvePullRequestCommentsOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UnresolvePullRequestCommentsOperation) Name ¶ added in v1.4.0
func (op *UnresolvePullRequestCommentsOperation) 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 (*UnresolvePullRequestCommentsOperation) Poll ¶ added in v1.4.0
func (op *UnresolvePullRequestCommentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.UnresolvePullRequestCommentsResponse, 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 (*UnresolvePullRequestCommentsOperation) Wait ¶ added in v1.4.0
func (op *UnresolvePullRequestCommentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.UnresolvePullRequestCommentsResponse, 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 UpdateBranchRuleOperation ¶ added in v1.3.0
type UpdateBranchRuleOperation struct {
// contains filtered or unexported fields
}
UpdateBranchRuleOperation manages a long-running operation from UpdateBranchRule.
func (*UpdateBranchRuleOperation) Done ¶ added in v1.3.0
func (op *UpdateBranchRuleOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateBranchRuleOperation) Metadata ¶ added in v1.3.0
func (op *UpdateBranchRuleOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateBranchRuleOperation) Name ¶ added in v1.3.0
func (op *UpdateBranchRuleOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateBranchRuleOperation) Poll ¶ added in v1.3.0
func (op *UpdateBranchRuleOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateBranchRuleOperation) Wait ¶ added in v1.3.0
func (op *UpdateBranchRuleOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.BranchRule, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateHookOperation ¶ added in v1.4.0
type UpdateHookOperation struct {
// contains filtered or unexported fields
}
UpdateHookOperation manages a long-running operation from UpdateHook.
func (*UpdateHookOperation) Done ¶ added in v1.4.0
func (op *UpdateHookOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateHookOperation) Metadata ¶ added in v1.4.0
func (op *UpdateHookOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateHookOperation) Name ¶ added in v1.4.0
func (op *UpdateHookOperation) 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 (*UpdateHookOperation) Poll ¶ added in v1.4.0
func (op *UpdateHookOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Hook, 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 (*UpdateHookOperation) Wait ¶ added in v1.4.0
func (op *UpdateHookOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Hook, 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 UpdateIssueCommentOperation ¶ added in v1.4.0
type UpdateIssueCommentOperation struct {
// contains filtered or unexported fields
}
UpdateIssueCommentOperation manages a long-running operation from UpdateIssueComment.
func (*UpdateIssueCommentOperation) Done ¶ added in v1.4.0
func (op *UpdateIssueCommentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateIssueCommentOperation) Metadata ¶ added in v1.4.0
func (op *UpdateIssueCommentOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateIssueCommentOperation) Name ¶ added in v1.4.0
func (op *UpdateIssueCommentOperation) 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 (*UpdateIssueCommentOperation) Poll ¶ added in v1.4.0
func (op *UpdateIssueCommentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.IssueComment, 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 (*UpdateIssueCommentOperation) Wait ¶ added in v1.4.0
func (op *UpdateIssueCommentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.IssueComment, 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 UpdateIssueOperation ¶ added in v1.4.0
type UpdateIssueOperation struct {
// contains filtered or unexported fields
}
UpdateIssueOperation manages a long-running operation from UpdateIssue.
func (*UpdateIssueOperation) Done ¶ added in v1.4.0
func (op *UpdateIssueOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateIssueOperation) Metadata ¶ added in v1.4.0
func (op *UpdateIssueOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateIssueOperation) Name ¶ added in v1.4.0
func (op *UpdateIssueOperation) 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 (*UpdateIssueOperation) Poll ¶ added in v1.4.0
func (op *UpdateIssueOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, 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 (*UpdateIssueOperation) Wait ¶ added in v1.4.0
func (op *UpdateIssueOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Issue, 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 UpdatePullRequestCommentOperation ¶ added in v1.4.0
type UpdatePullRequestCommentOperation struct {
// contains filtered or unexported fields
}
UpdatePullRequestCommentOperation manages a long-running operation from UpdatePullRequestComment.
func (*UpdatePullRequestCommentOperation) Done ¶ added in v1.4.0
func (op *UpdatePullRequestCommentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdatePullRequestCommentOperation) Metadata ¶ added in v1.4.0
func (op *UpdatePullRequestCommentOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdatePullRequestCommentOperation) Name ¶ added in v1.4.0
func (op *UpdatePullRequestCommentOperation) 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 (*UpdatePullRequestCommentOperation) Poll ¶ added in v1.4.0
func (op *UpdatePullRequestCommentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequestComment, 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 (*UpdatePullRequestCommentOperation) Wait ¶ added in v1.4.0
func (op *UpdatePullRequestCommentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequestComment, 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 UpdatePullRequestOperation ¶ added in v1.4.0
type UpdatePullRequestOperation struct {
// contains filtered or unexported fields
}
UpdatePullRequestOperation manages a long-running operation from UpdatePullRequest.
func (*UpdatePullRequestOperation) Done ¶ added in v1.4.0
func (op *UpdatePullRequestOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdatePullRequestOperation) Metadata ¶ added in v1.4.0
func (op *UpdatePullRequestOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdatePullRequestOperation) Name ¶ added in v1.4.0
func (op *UpdatePullRequestOperation) 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 (*UpdatePullRequestOperation) Poll ¶ added in v1.4.0
func (op *UpdatePullRequestOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, 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 (*UpdatePullRequestOperation) Wait ¶ added in v1.4.0
func (op *UpdatePullRequestOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.PullRequest, 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 UpdateRepositoryOperation ¶ added in v1.4.0
type UpdateRepositoryOperation struct {
// contains filtered or unexported fields
}
UpdateRepositoryOperation manages a long-running operation from UpdateRepository.
func (*UpdateRepositoryOperation) Done ¶ added in v1.4.0
func (op *UpdateRepositoryOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateRepositoryOperation) Metadata ¶ added in v1.4.0
func (op *UpdateRepositoryOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateRepositoryOperation) Name ¶ added in v1.4.0
func (op *UpdateRepositoryOperation) 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 (*UpdateRepositoryOperation) Poll ¶ added in v1.4.0
func (op *UpdateRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateRepositoryOperation) Wait ¶ added in v1.4.0
func (op *UpdateRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.