issuetracker

package
v0.0.0-...-650f6e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

README

Issuetracker generated client protos.

How are these protos imported:

Please see go/luci-analysis-buganizer-protos for information on how those files are generated.

Documentation

Overview

Package issuetracker is an auto-generated package for the Private Issue Tracker API.

The Private Issue Tracker API is a service that provides Issue Tracker data to internal clients.

NOTE: This package is in beta. It is not stable, and may be subject to changes.

General documentation

For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:

Example usage

To get started with this package, create a client.

ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := issuetracker.NewClient(ctx)
if err != nil {
	// TODO: Handle error.
}
defer c.Close()

The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.

Using the Client

The following is an example of making an API call with the newly created client.

ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := issuetracker.NewClient(ctx)
if err != nil {
	// TODO: Handle error.
}
defer c.Close()

req := &issuetrackerpb.BatchGetIssuesRequest{
	// TODO: Fill request struct fields.
	// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#BatchGetIssuesRequest.
}
resp, err := c.BatchGetIssues(ctx, req)
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

Examples

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 CallOptions

type CallOptions struct {
	GetComponent            []gax.CallOption
	ListIssues              []gax.CallOption
	BatchGetIssues          []gax.CallOption
	GetIssue                []gax.CallOption
	CreateIssue             []gax.CallOption
	ModifyIssue             []gax.CallOption
	CreateIssueRelationship []gax.CallOption
	ListIssueRelationships  []gax.CallOption
	ListIssueUpdates        []gax.CallOption
	CreateIssueComment      []gax.CallOption
	ListIssueComments       []gax.CallOption
	UpdateIssueComment      []gax.CallOption
	ListAttachments         []gax.CallOption
	CreateHotlistEntry      []gax.CallOption
	DeleteHotlistEntry      []gax.CallOption
	GetAutomationAccess     []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
	// contains filtered or unexported fields
}

Client is a client for interacting with Private Issue Tracker API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Manages issue and bug data, organized by a hierarchy of components.

func NewClient

func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

NewClient creates a new issue tracker client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

Manages issue and bug data, organized by a hierarchy of components.

Example
package main

import (
	"context"

	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}
Output:

func NewRESTClient

func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

NewRESTClient creates a new issue tracker rest client.

Manages issue and bug data, organized by a hierarchy of components.

Example
package main

import (
	"context"

	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}
Output:

func (*Client) BatchGetIssues

BatchGetIssues gets multiple issues with their current state by their ID. Non-existing issues, or issues that the caller does not have access to, are silently ignored. Note: The maximum number of issues that can be retrieved in one call is limited to 100.

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.BatchGetIssuesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#BatchGetIssuesRequest.
	}
	resp, err := c.BatchGetIssues(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) Close

func (c *Client) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*Client) Connection deprecated

func (c *Client) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*Client) CreateHotlistEntry

CreateHotlistEntry adds an issue to a hotlist by creating a HotlistEntry. Returns the created HotlistEntry. Requires hotlist APPEND and issue VIEW permission

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.CreateHotlistEntryRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#CreateHotlistEntryRequest.
	}
	resp, err := c.CreateHotlistEntry(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) CreateIssue

CreateIssue creates a new issue within a component, and returns the new object.

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.CreateIssueRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#CreateIssueRequest.
	}
	resp, err := c.CreateIssue(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) CreateIssueComment

CreateIssueComment creates a new issue comment in an issue

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.CreateIssueCommentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#CreateIssueCommentRequest.
	}
	resp, err := c.CreateIssueComment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) CreateIssueRelationship

CreateIssueRelationship creates a new issue relationship. Requires issue EDIT on the source issue and issue VIEW on the target issue. For relationship_type = CHILD, requires issue EDIT on the source issue and issue VIEW on the target issue.

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.CreateIssueRelationshipRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#CreateIssueRelationshipRequest.
	}
	resp, err := c.CreateIssueRelationship(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) DeleteHotlistEntry

func (c *Client) DeleteHotlistEntry(ctx context.Context, req *issuetrackerpb.DeleteHotlistEntryRequest, opts ...gax.CallOption) error

DeleteHotlistEntry removes an issue from a hotlist by deleting hotlistEntry. Removing an issue from a hotlist it does not belong to will do nothing and return. Requires hotlist APPEND and issue VIEW permission

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.DeleteHotlistEntryRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#DeleteHotlistEntryRequest.
	}
	err = c.DeleteHotlistEntry(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (*Client) GetAutomationAccess

GetAutomationAccess checks that automation has permission on a resource. Does not require any permission on the resource

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.GetAutomationAccessRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#GetAutomationAccessRequest.
	}
	resp, err := c.GetAutomationAccess(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) GetComponent

GetComponent gets a component, including its parent hierarchy info.

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.GetComponentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#GetComponentRequest.
	}
	resp, err := c.GetComponent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) GetIssue

GetIssue gets an issue with its current state.

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.GetIssueRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#GetIssueRequest.
	}
	resp, err := c.GetIssue(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) ListAttachments

ListAttachments list attachments that belong to an issue. Only returns attachment metadata.

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.ListAttachmentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#ListAttachmentsRequest.
	}
	resp, err := c.ListAttachments(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) ListIssueComments

ListIssueComments fetches a list of IssueComment objects.

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
	"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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.ListIssueCommentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#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
	}
}
Output:

func (*Client) ListIssueRelationships

ListIssueRelationships lists issue relationships under an issue of a type. Requires issue VIEW on the source issue. All target issues are included regardless of the caller’s issue view access. target_issue_id is always set. target_issue is set only if the caller has issue VIEW access to the target issue.

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.ListIssueRelationshipsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#ListIssueRelationshipsRequest.
	}
	resp, err := c.ListIssueRelationships(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) ListIssueUpdates

ListIssueUpdates fetch a collection of IssueUpdate objects representing the change history of an issue, ordered by IssueUpdate.version.

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
	"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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.ListIssueUpdatesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#ListIssueUpdatesRequest.
	}
	it := c.ListIssueUpdates(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*Client) ListIssues

ListIssues searches issues in the search cache (which may be stale), then returns the current state of the matched issues (which may no longer match ListIssuesRequest.query and may no longer be in the order indicated by ListIssuesRequest.order_by).

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
	"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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.ListIssuesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#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
	}
}
Output:

func (*Client) ModifyIssue

ModifyIssue updates an issue based on add and remove IssueState. Returns the modified issue.

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.ModifyIssueRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#ModifyIssueRequest.
	}
	resp, err := c.ModifyIssue(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*Client) UpdateIssueComment

UpdateIssueComment updates an issue comment. NB: The comment manipulation methods does not use the attachment field in IssueComment.

Example
package main

import (
	"context"

	issuetrackerpb "go.chromium.org/luci/third_party/google.golang.org/genproto/googleapis/devtools/issuetracker/v1"
	issuetracker "go.chromium.org/luci/third_party/google.golang.org/google/devtools/issuetracker/v1"
)

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 := issuetracker.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &issuetrackerpb.UpdateIssueCommentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/issuetracker/v1#UpdateIssueCommentRequest.
	}
	resp, err := c.UpdateIssueComment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

type IssueCommentIterator

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 []*issuetrackerpb.IssueComment, nextPageToken string, err error)
	// contains filtered or unexported fields
}

IssueCommentIterator manages a stream of *issuetrackerpb.IssueComment.

func (*IssueCommentIterator) Next

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

func (it *IssueCommentIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type IssueIterator

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 []*issuetrackerpb.Issue, nextPageToken string, err error)
	// contains filtered or unexported fields
}

IssueIterator manages a stream of *issuetrackerpb.Issue.

func (*IssueIterator) Next

func (it *IssueIterator) Next() (*issuetrackerpb.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

func (it *IssueIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type IssueUpdateIterator

type IssueUpdateIterator 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 []*issuetrackerpb.IssueUpdate, nextPageToken string, err error)
	// contains filtered or unexported fields
}

IssueUpdateIterator manages a stream of *issuetrackerpb.IssueUpdate.

func (*IssueUpdateIterator) Next

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 (*IssueUpdateIterator) PageInfo

func (it *IssueUpdateIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL