gerrit

package
v0.0.0-...-01cd1ea Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package gerrit contains logic for interacting with Gerrit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseFakeClient

func UseFakeClient(ctx context.Context, clsByHost map[string][]*gerritpb.ChangeInfo) context.Context

UseFakeClient installs a fake gerrit client into the context, with the given gerrit change data.

Types

type Client

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

Client is the client to communicate with Gerrit. It wraps a gerritpb.GerritClient.

func NewClient

func NewClient(ctx context.Context, host, project string) (*Client, error)

NewClient creates a client to communicate with Gerrit, acting as the given LUCI Project.

func (*Client) GetChange

GetChange gets a gerrit change by its ID.

type FakeClient

type FakeClient struct {
	Changelists []*gerritpb.ChangeInfo
}

FakeClient is a fake implementation of gerritpb.GerritClient for testing.

func (*FakeClient) AbandonChange

func (*FakeClient) AddReviewer

func (*FakeClient) AddToAttentionSet

func (f *FakeClient) AddToAttentionSet(ctx context.Context, in *gerritpb.AttentionSetRequest, opts ...grpc.CallOption) (*gerritpb.AccountInfo, error)

func (*FakeClient) ChangeEditFileContent

func (f *FakeClient) ChangeEditFileContent(ctx context.Context, in *gerritpb.ChangeEditFileContentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)

func (*FakeClient) ChangeEditPublish

func (f *FakeClient) ChangeEditPublish(ctx context.Context, in *gerritpb.ChangeEditPublishRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)

func (*FakeClient) CreateChange

func (*FakeClient) DeleteEditFileContent

func (f *FakeClient) DeleteEditFileContent(ctx context.Context, in *gerritpb.DeleteEditFileContentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)

func (*FakeClient) DeleteReviewer

func (f *FakeClient) DeleteReviewer(ctx context.Context, in *gerritpb.DeleteReviewerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)

func (*FakeClient) GetChange

func (*FakeClient) GetMergeable

func (*FakeClient) GetMetaDiff

func (*FakeClient) GetPureRevert

func (*FakeClient) GetRefInfo

func (f *FakeClient) GetRefInfo(ctx context.Context, in *gerritpb.RefInfoRequest, opts ...grpc.CallOption) (*gerritpb.RefInfo, error)

func (*FakeClient) ListChanges

func (*FakeClient) ListFileOwners

func (*FakeClient) ListFiles

func (*FakeClient) ListProjects

func (*FakeClient) RevertChange

func (*FakeClient) SetReview

func (*FakeClient) SubmitChange

func (*FakeClient) SubmitRevision

Jump to

Keyboard shortcuts

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