gerrit

package
v0.0.0-...-d996d1d Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseGerritClientFactory

func UseGerritClientFactory(ctx context.Context, factory GerritClientFactory) context.Context

UseGerritClientFactory returns a context that causes new Client instances to use the given factory when getting gerrit clients.

Types

type ChangeInfo

type ChangeInfo struct {
	// TargetRef is the ref that the change targets.
	TargetRef string
	// GitilesRevision is the revision in the corresponding gitiles repository containing the
	// commits in the patchset.
	GitilesRevision string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context) *Client

func (*Client) GetChangeInfo

func (c *Client) GetChangeInfo(ctx context.Context, host, project string, change int64, patchset int32) (*ChangeInfo, error)

type GerritClient

type GerritClient interface {
	GetChange(ctx context.Context, in *gerritpb.GetChangeRequest, opts ...grpc.CallOption) (*gerritpb.ChangeInfo, error)
}

GerritClient provides a subset of the generated gerrit RPC client.

type GerritClientFactory

type GerritClientFactory func(ctx context.Context, host string) (GerritClient, error)

GerritClientFactory creates clients for accessing each necessary gerrit instance.

Jump to

Keyboard shortcuts

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