luci: go.chromium.org/luci/common/proto/gerrit Index | Files

package gerrit

import "go.chromium.org/luci/common/proto/gerrit"

Package gerrit contains Gerrit service definition.

Package gerrit is a generated GoMock package.

Index

Package Files

const.go generate.go gerrit.mock.pb.go gerrit.pb.go pb.discovery.go validation.go

Constants

const (
    // AllRefs instructs the client to fetch all refs.
    AllRefs = "refs"
    // Branches instructs the client to fetch all branches.
    Branches = "refs/heads"
    // Tags instructs the client to fetch all tags.
    Tags = "refs/tags"
)

These constants are possible values for RefsRequest.RefsPath field. Not an exhaustive list.

Variables

var ChangeInfo_Status_name = map[int32]string{
    0:  "STATUS_INVALID",
    1:  "NEW",
    2:  "MERGED",
    3:  "ABANDONED",
}
var ChangeInfo_Status_value = map[string]int32{
    "STATUS_INVALID": 0,
    "NEW":            1,
    "MERGED":         2,
    "ABANDONED":      3,
}
var QueryOption_name = map[int32]string{
    0:       "OPTION_UNSPECIFIED",
    1:       "LABELS",
    2:       "DETAILED_LABELS",
    4:       "CURRENT_REVISION",
    8:       "ALL_REVISIONS",
    16:      "CURRENT_COMMIT",
    32:      "ALL_COMMITS",
    64:      "CURRENT_FILES",
    128:     "ALL_FILES",
    256:     "DETAILED_ACCOUNTS",
    512:     "REVIEWER_UPDATES",
    1024:    "MESSAGES",
    2048:    "CURRENT_ACTIONS",
    4096:    "CHANGE_ACTIONS",
    8192:    "REVIEWED",
    16384:   "SKIP_MERGEABLE",
    32768:   "SUBMITTABLE",
    65536:   "WEB_LINKS",
    131072:  "CHECK",
    262144:  "COMMIT_FOOTERS",
    524288:  "PUSH_CERTIFICATES",
    1048576: "TRACKING_IDS",
    2097152: "DOWNLOAD_COMMANDS",
}
var QueryOption_value = map[string]int32{
    "OPTION_UNSPECIFIED": 0,
    "LABELS":             1,
    "DETAILED_LABELS":    2,
    "CURRENT_REVISION":   4,
    "ALL_REVISIONS":      8,
    "CURRENT_COMMIT":     16,
    "ALL_COMMITS":        32,
    "CURRENT_FILES":      64,
    "ALL_FILES":          128,
    "DETAILED_ACCOUNTS":  256,
    "REVIEWER_UPDATES":   512,
    "MESSAGES":           1024,
    "CURRENT_ACTIONS":    2048,
    "CHANGE_ACTIONS":     4096,
    "REVIEWED":           8192,
    "SKIP_MERGEABLE":     16384,
    "SUBMITTABLE":        32768,
    "WEB_LINKS":          65536,
    "CHECK":              131072,
    "COMMIT_FOOTERS":     262144,
    "PUSH_CERTIFICATES":  524288,
    "TRACKING_IDS":       1048576,
    "DOWNLOAD_COMMANDS":  2097152,
}

func FileDescriptorSet Uses

func FileDescriptorSet() *descriptor.FileDescriptorSet

FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.

Will not return nil.

Do NOT modify the returned descriptor.

func RegisterGerritServer Uses

func RegisterGerritServer(s prpc.Registrar, srv GerritServer)

type AbandonChangeRequest Uses

type AbandonChangeRequest struct {
    // The change number.
    Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
    // The project of this change. For example, "chromium/src".
    //
    // Optional, but recommended for better routing and faster RPC execution.
    Project              string   `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"`
    Message              string   `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Information for abandoning a change.

Fields are a subset of arguments from: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#abandon-change https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#abandon-input

func (*AbandonChangeRequest) Descriptor Uses

func (*AbandonChangeRequest) Descriptor() ([]byte, []int)

func (*AbandonChangeRequest) GetMessage Uses

func (m *AbandonChangeRequest) GetMessage() string

func (*AbandonChangeRequest) GetNumber Uses

func (m *AbandonChangeRequest) GetNumber() int64

func (*AbandonChangeRequest) GetProject Uses

func (m *AbandonChangeRequest) GetProject() string

func (*AbandonChangeRequest) ProtoMessage Uses

func (*AbandonChangeRequest) ProtoMessage()

func (*AbandonChangeRequest) Reset Uses

func (m *AbandonChangeRequest) Reset()

func (*AbandonChangeRequest) String Uses

func (m *AbandonChangeRequest) String() string

func (*AbandonChangeRequest) XXX_DiscardUnknown Uses

func (m *AbandonChangeRequest) XXX_DiscardUnknown()

func (*AbandonChangeRequest) XXX_Marshal Uses

func (m *AbandonChangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AbandonChangeRequest) XXX_Merge Uses

func (m *AbandonChangeRequest) XXX_Merge(src proto.Message)

func (*AbandonChangeRequest) XXX_Size Uses

func (m *AbandonChangeRequest) XXX_Size() int

func (*AbandonChangeRequest) XXX_Unmarshal Uses

func (m *AbandonChangeRequest) XXX_Unmarshal(b []byte) error

type AccountInfo Uses

type AccountInfo struct {
    // The full name of the user.
    // Only set if detailed account information is requested.
    // See option DETAILED_ACCOUNTS for change queries
    // and option DETAILS for account queries.
    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // The email address the user prefers to be contacted through.
    // Only set if detailed account information is requested.
    // See option DETAILED_ACCOUNTS for change queries
    // and options DETAILS and ALL_EMAILS for account queries.
    Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
    // A list of the secondary email addresses of the user.
    // Only set for account queries when the ALL_EMAILS option or the suggest
    // parameter is set. Secondary emails are only included if the calling user
    // has the Modify Account, and hence is allowed to see secondary emails of
    // other users.
    SecondaryEmails []string `protobuf:"bytes,3,rep,name=secondary_emails,json=secondaryEmails,proto3" json:"secondary_emails,omitempty"`
    // The username of the user.
    // Only set if detailed account information is requested.
    // See option DETAILED_ACCOUNTS for change queries
    // and option DETAILS for account queries.
    Username             string   `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Information about an account. Source of truth: https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#account-info

func (*AccountInfo) Descriptor Uses

func (*AccountInfo) Descriptor() ([]byte, []int)

func (*AccountInfo) GetEmail Uses

func (m *AccountInfo) GetEmail() string

func (*AccountInfo) GetName Uses

func (m *AccountInfo) GetName() string

func (*AccountInfo) GetSecondaryEmails Uses

func (m *AccountInfo) GetSecondaryEmails() []string

func (*AccountInfo) GetUsername Uses

func (m *AccountInfo) GetUsername() string

func (*AccountInfo) ProtoMessage Uses

func (*AccountInfo) ProtoMessage()

func (*AccountInfo) Reset Uses

func (m *AccountInfo) Reset()

func (*AccountInfo) String Uses

func (m *AccountInfo) String() string

func (*AccountInfo) XXX_DiscardUnknown Uses

func (m *AccountInfo) XXX_DiscardUnknown()

func (*AccountInfo) XXX_Marshal Uses

func (m *AccountInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountInfo) XXX_Merge Uses

func (m *AccountInfo) XXX_Merge(src proto.Message)

func (*AccountInfo) XXX_Size Uses

func (m *AccountInfo) XXX_Size() int

func (*AccountInfo) XXX_Unmarshal Uses

func (m *AccountInfo) XXX_Unmarshal(b []byte) error

type ChangeEditFileContentRequest Uses

type ChangeEditFileContentRequest struct {
    // The change number.
    Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
    // The project of this change. For example, "chromium/src".
    //
    // Optional, but recommended for better routing and faster RPC execution.
    Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"`
    // Path to the file to edit inside the project.
    FilePath string `protobuf:"bytes,3,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
    // New content of the file. Overwrites existing contents entirely.
    Content              []byte   `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Information for changing contents of single file in a change edit.

Fields encode the path arguments of https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#put-edit-file

func (*ChangeEditFileContentRequest) Descriptor Uses

func (*ChangeEditFileContentRequest) Descriptor() ([]byte, []int)

func (*ChangeEditFileContentRequest) GetContent Uses

func (m *ChangeEditFileContentRequest) GetContent() []byte

func (*ChangeEditFileContentRequest) GetFilePath Uses

func (m *ChangeEditFileContentRequest) GetFilePath() string

func (*ChangeEditFileContentRequest) GetNumber Uses

func (m *ChangeEditFileContentRequest) GetNumber() int64

func (*ChangeEditFileContentRequest) GetProject Uses

func (m *ChangeEditFileContentRequest) GetProject() string

func (*ChangeEditFileContentRequest) ProtoMessage Uses

func (*ChangeEditFileContentRequest) ProtoMessage()

func (*ChangeEditFileContentRequest) Reset Uses

func (m *ChangeEditFileContentRequest) Reset()

func (*ChangeEditFileContentRequest) String Uses

func (m *ChangeEditFileContentRequest) String() string

func (*ChangeEditFileContentRequest) XXX_DiscardUnknown Uses

func (m *ChangeEditFileContentRequest) XXX_DiscardUnknown()

func (*ChangeEditFileContentRequest) XXX_Marshal Uses

func (m *ChangeEditFileContentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChangeEditFileContentRequest) XXX_Merge Uses

func (m *ChangeEditFileContentRequest) XXX_Merge(src proto.Message)

func (*ChangeEditFileContentRequest) XXX_Size Uses

func (m *ChangeEditFileContentRequest) XXX_Size() int

func (*ChangeEditFileContentRequest) XXX_Unmarshal Uses

func (m *ChangeEditFileContentRequest) XXX_Unmarshal(b []byte) error

type ChangeEditPublishRequest Uses

type ChangeEditPublishRequest struct {
    // The change number.
    Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
    // The project of this change. For example, "chromium/src".
    //
    // Optional, but recommended for better routing and faster RPC execution.
    Project              string   `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Information for publishing a change edit.

This is a placeholder to support the arguments from: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#publish-edit https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#publish-change-edit-input

func (*ChangeEditPublishRequest) Descriptor Uses

func (*ChangeEditPublishRequest) Descriptor() ([]byte, []int)

func (*ChangeEditPublishRequest) GetNumber Uses

func (m *ChangeEditPublishRequest) GetNumber() int64

func (*ChangeEditPublishRequest) GetProject Uses

func (m *ChangeEditPublishRequest) GetProject() string

func (*ChangeEditPublishRequest) ProtoMessage Uses

func (*ChangeEditPublishRequest) ProtoMessage()

func (*ChangeEditPublishRequest) Reset Uses

func (m *ChangeEditPublishRequest) Reset()

func (*ChangeEditPublishRequest) String Uses

func (m *ChangeEditPublishRequest) String() string

func (*ChangeEditPublishRequest) XXX_DiscardUnknown Uses

func (m *ChangeEditPublishRequest) XXX_DiscardUnknown()

func (*ChangeEditPublishRequest) XXX_Marshal Uses

func (m *ChangeEditPublishRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChangeEditPublishRequest) XXX_Merge Uses

func (m *ChangeEditPublishRequest) XXX_Merge(src proto.Message)

func (*ChangeEditPublishRequest) XXX_Size Uses

func (m *ChangeEditPublishRequest) XXX_Size() int

func (*ChangeEditPublishRequest) XXX_Unmarshal Uses

func (m *ChangeEditPublishRequest) XXX_Unmarshal(b []byte) error

type ChangeInfo Uses

type ChangeInfo struct {
    // The change number.
    Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
    // The owner of the change.
    Owner *AccountInfo `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
    // The project of this change. For example, "chromium/src".
    Project string `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"`
    // Ref that this change targets, e.g.: refs/heads/master
    //
    // Note that the gerrit API may return short branch name (master instead of
    // refs/heads/master) but we convert it to a ref for consistency across the
    // API.
    Ref    string            `protobuf:"bytes,4,opt,name=ref,proto3" json:"ref,omitempty"`
    Status ChangeInfo_Status `protobuf:"varint,5,opt,name=status,proto3,enum=gerrit.ChangeInfo_Status" json:"status,omitempty"`
    // Current revision of the change.
    //
    // See:
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#revision-id
    CurrentRevision      string   `protobuf:"bytes,6,opt,name=current_revision,json=currentRevision,proto3" json:"current_revision,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Information about a change. Source of truth: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#change-info

func (*ChangeInfo) Descriptor Uses

func (*ChangeInfo) Descriptor() ([]byte, []int)

func (*ChangeInfo) GetCurrentRevision Uses

func (m *ChangeInfo) GetCurrentRevision() string

func (*ChangeInfo) GetNumber Uses

func (m *ChangeInfo) GetNumber() int64

func (*ChangeInfo) GetOwner Uses

func (m *ChangeInfo) GetOwner() *AccountInfo

func (*ChangeInfo) GetProject Uses

func (m *ChangeInfo) GetProject() string

func (*ChangeInfo) GetRef Uses

func (m *ChangeInfo) GetRef() string

func (*ChangeInfo) GetStatus Uses

func (m *ChangeInfo) GetStatus() ChangeInfo_Status

func (*ChangeInfo) ProtoMessage Uses

func (*ChangeInfo) ProtoMessage()

func (*ChangeInfo) Reset Uses

func (m *ChangeInfo) Reset()

func (*ChangeInfo) String Uses

func (m *ChangeInfo) String() string

func (*ChangeInfo) XXX_DiscardUnknown Uses

func (m *ChangeInfo) XXX_DiscardUnknown()

func (*ChangeInfo) XXX_Marshal Uses

func (m *ChangeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChangeInfo) XXX_Merge Uses

func (m *ChangeInfo) XXX_Merge(src proto.Message)

func (*ChangeInfo) XXX_Size Uses

func (m *ChangeInfo) XXX_Size() int

func (*ChangeInfo) XXX_Unmarshal Uses

func (m *ChangeInfo) XXX_Unmarshal(b []byte) error

type ChangeInfo_Status Uses

type ChangeInfo_Status int32
const (
    ChangeInfo_STATUS_INVALID ChangeInfo_Status = 0
    ChangeInfo_NEW            ChangeInfo_Status = 1
    ChangeInfo_MERGED         ChangeInfo_Status = 2
    ChangeInfo_ABANDONED      ChangeInfo_Status = 3
)

func (ChangeInfo_Status) EnumDescriptor Uses

func (ChangeInfo_Status) EnumDescriptor() ([]byte, []int)

func (ChangeInfo_Status) String Uses

func (x ChangeInfo_Status) String() string

type CreateChangeRequest Uses

type CreateChangeRequest struct {
    Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
    // Ref to base the new change at. e.g. refs/heads/master
    Ref                  string   `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"`
    Subject              string   `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Information for creating a new change.

Fields are a subset of: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#change-input

func (*CreateChangeRequest) Descriptor Uses

func (*CreateChangeRequest) Descriptor() ([]byte, []int)

func (*CreateChangeRequest) GetProject Uses

func (m *CreateChangeRequest) GetProject() string

func (*CreateChangeRequest) GetRef Uses

func (m *CreateChangeRequest) GetRef() string

func (*CreateChangeRequest) GetSubject Uses

func (m *CreateChangeRequest) GetSubject() string

func (*CreateChangeRequest) ProtoMessage Uses

func (*CreateChangeRequest) ProtoMessage()

func (*CreateChangeRequest) Reset Uses

func (m *CreateChangeRequest) Reset()

func (*CreateChangeRequest) String Uses

func (m *CreateChangeRequest) String() string

func (*CreateChangeRequest) XXX_DiscardUnknown Uses

func (m *CreateChangeRequest) XXX_DiscardUnknown()

func (*CreateChangeRequest) XXX_Marshal Uses

func (m *CreateChangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateChangeRequest) XXX_Merge Uses

func (m *CreateChangeRequest) XXX_Merge(src proto.Message)

func (*CreateChangeRequest) XXX_Size Uses

func (m *CreateChangeRequest) XXX_Size() int

func (*CreateChangeRequest) XXX_Unmarshal Uses

func (m *CreateChangeRequest) XXX_Unmarshal(b []byte) error

type GerritClient Uses

type GerritClient interface {
    // Loads a change by id.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-change
    GetChange(ctx context.Context, in *GetChangeRequest, opts ...grpc.CallOption) (*ChangeInfo, error)
    // Create a new empty change.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#create-change
    CreateChange(ctx context.Context, in *CreateChangeRequest, opts ...grpc.CallOption) (*ChangeInfo, error)
    // Edit a single file within an existing change edit.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#put-edit-file
    ChangeEditFileContent(ctx context.Context, in *ChangeEditFileContentRequest, opts ...grpc.CallOption) (*empty.Empty, error)
    // Publish all changes in a a change edit.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#publish-edit
    ChangeEditPublish(ctx context.Context, in *ChangeEditPublishRequest, opts ...grpc.CallOption) (*empty.Empty, error)
    // Set various review bits on a change.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#set-review
    SetReview(ctx context.Context, in *SetReviewRequest, opts ...grpc.CallOption) (*ReviewResult, error)
    // Submit a change.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#submit-change
    SubmitChange(ctx context.Context, in *SubmitChangeRequest, opts ...grpc.CallOption) (*ChangeInfo, error)
    // Abandon a change.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#abandon-change
    AbandonChange(ctx context.Context, in *AbandonChangeRequest, opts ...grpc.CallOption) (*ChangeInfo, error)
}

GerritClient is the client API for Gerrit service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGerritClient Uses

func NewGerritClient(cc *grpc.ClientConn) GerritClient

func NewGerritPRPCClient Uses

func NewGerritPRPCClient(client *prpc.Client) GerritClient

type GerritServer Uses

type GerritServer interface {
    // Loads a change by id.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-change
    GetChange(context.Context, *GetChangeRequest) (*ChangeInfo, error)
    // Create a new empty change.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#create-change
    CreateChange(context.Context, *CreateChangeRequest) (*ChangeInfo, error)
    // Edit a single file within an existing change edit.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#put-edit-file
    ChangeEditFileContent(context.Context, *ChangeEditFileContentRequest) (*empty.Empty, error)
    // Publish all changes in a a change edit.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#publish-edit
    ChangeEditPublish(context.Context, *ChangeEditPublishRequest) (*empty.Empty, error)
    // Set various review bits on a change.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#set-review
    SetReview(context.Context, *SetReviewRequest) (*ReviewResult, error)
    // Submit a change.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#submit-change
    SubmitChange(context.Context, *SubmitChangeRequest) (*ChangeInfo, error)
    // Abandon a change.
    //
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#abandon-change
    AbandonChange(context.Context, *AbandonChangeRequest) (*ChangeInfo, error)
}

GerritServer is the server API for Gerrit service.

type GetChangeRequest Uses

type GetChangeRequest struct {
    // Change number.
    Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
    // What to include in the response.
    Options              []QueryOption `protobuf:"varint,2,rep,packed,name=options,proto3,enum=gerrit.QueryOption" json:"options,omitempty"`
    XXX_NoUnkeyedLiteral struct{}      `json:"-"`
    XXX_unrecognized     []byte        `json:"-"`
    XXX_sizecache        int32         `json:"-"`
}

Request to get information for a single change.

Encodes path arguments and query options described at https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-change

func (*GetChangeRequest) Descriptor Uses

func (*GetChangeRequest) Descriptor() ([]byte, []int)

func (*GetChangeRequest) GetNumber Uses

func (m *GetChangeRequest) GetNumber() int64

func (*GetChangeRequest) GetOptions Uses

func (m *GetChangeRequest) GetOptions() []QueryOption

func (*GetChangeRequest) ProtoMessage Uses

func (*GetChangeRequest) ProtoMessage()

func (*GetChangeRequest) Reset Uses

func (m *GetChangeRequest) Reset()

func (*GetChangeRequest) String Uses

func (m *GetChangeRequest) String() string

func (*GetChangeRequest) Validate Uses

func (r *GetChangeRequest) Validate() error

Validate returns an error if r is invalid.

func (*GetChangeRequest) XXX_DiscardUnknown Uses

func (m *GetChangeRequest) XXX_DiscardUnknown()

func (*GetChangeRequest) XXX_Marshal Uses

func (m *GetChangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetChangeRequest) XXX_Merge Uses

func (m *GetChangeRequest) XXX_Merge(src proto.Message)

func (*GetChangeRequest) XXX_Size Uses

func (m *GetChangeRequest) XXX_Size() int

func (*GetChangeRequest) XXX_Unmarshal Uses

func (m *GetChangeRequest) XXX_Unmarshal(b []byte) error

type MockGerritClient Uses

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

MockGerritClient is a mock of GerritClient interface

func NewMockGerritClient Uses

func NewMockGerritClient(ctrl *gomock.Controller) *MockGerritClient

NewMockGerritClient creates a new mock instance

func (*MockGerritClient) AbandonChange Uses

func (m *MockGerritClient) AbandonChange(ctx context.Context, in *AbandonChangeRequest, opts ...grpc.CallOption) (*ChangeInfo, error)

AbandonChange mocks base method

func (*MockGerritClient) ChangeEditFileContent Uses

func (m *MockGerritClient) ChangeEditFileContent(ctx context.Context, in *ChangeEditFileContentRequest, opts ...grpc.CallOption) (*empty.Empty, error)

ChangeEditFileContent mocks base method

func (*MockGerritClient) ChangeEditPublish Uses

func (m *MockGerritClient) ChangeEditPublish(ctx context.Context, in *ChangeEditPublishRequest, opts ...grpc.CallOption) (*empty.Empty, error)

ChangeEditPublish mocks base method

func (*MockGerritClient) CreateChange Uses

func (m *MockGerritClient) CreateChange(ctx context.Context, in *CreateChangeRequest, opts ...grpc.CallOption) (*ChangeInfo, error)

CreateChange mocks base method

func (*MockGerritClient) EXPECT Uses

func (m *MockGerritClient) EXPECT() *MockGerritClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockGerritClient) GetChange Uses

func (m *MockGerritClient) GetChange(ctx context.Context, in *GetChangeRequest, opts ...grpc.CallOption) (*ChangeInfo, error)

GetChange mocks base method

func (*MockGerritClient) SetReview Uses

func (m *MockGerritClient) SetReview(ctx context.Context, in *SetReviewRequest, opts ...grpc.CallOption) (*ReviewResult, error)

SetReview mocks base method

func (*MockGerritClient) SubmitChange Uses

func (m *MockGerritClient) SubmitChange(ctx context.Context, in *SubmitChangeRequest, opts ...grpc.CallOption) (*ChangeInfo, error)

SubmitChange mocks base method

type MockGerritClientMockRecorder Uses

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

MockGerritClientMockRecorder is the mock recorder for MockGerritClient

func (*MockGerritClientMockRecorder) AbandonChange Uses

func (mr *MockGerritClientMockRecorder) AbandonChange(ctx, in interface{}, opts ...interface{}) *gomock.Call

AbandonChange indicates an expected call of AbandonChange

func (*MockGerritClientMockRecorder) ChangeEditFileContent Uses

func (mr *MockGerritClientMockRecorder) ChangeEditFileContent(ctx, in interface{}, opts ...interface{}) *gomock.Call

ChangeEditFileContent indicates an expected call of ChangeEditFileContent

func (*MockGerritClientMockRecorder) ChangeEditPublish Uses

func (mr *MockGerritClientMockRecorder) ChangeEditPublish(ctx, in interface{}, opts ...interface{}) *gomock.Call

ChangeEditPublish indicates an expected call of ChangeEditPublish

func (*MockGerritClientMockRecorder) CreateChange Uses

func (mr *MockGerritClientMockRecorder) CreateChange(ctx, in interface{}, opts ...interface{}) *gomock.Call

CreateChange indicates an expected call of CreateChange

func (*MockGerritClientMockRecorder) GetChange Uses

func (mr *MockGerritClientMockRecorder) GetChange(ctx, in interface{}, opts ...interface{}) *gomock.Call

GetChange indicates an expected call of GetChange

func (*MockGerritClientMockRecorder) SetReview Uses

func (mr *MockGerritClientMockRecorder) SetReview(ctx, in interface{}, opts ...interface{}) *gomock.Call

SetReview indicates an expected call of SetReview

func (*MockGerritClientMockRecorder) SubmitChange Uses

func (mr *MockGerritClientMockRecorder) SubmitChange(ctx, in interface{}, opts ...interface{}) *gomock.Call

SubmitChange indicates an expected call of SubmitChange

type MockGerritServer Uses

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

MockGerritServer is a mock of GerritServer interface

func NewMockGerritServer Uses

func NewMockGerritServer(ctrl *gomock.Controller) *MockGerritServer

NewMockGerritServer creates a new mock instance

func (*MockGerritServer) AbandonChange Uses

func (m *MockGerritServer) AbandonChange(arg0 context.Context, arg1 *AbandonChangeRequest) (*ChangeInfo, error)

AbandonChange mocks base method

func (*MockGerritServer) ChangeEditFileContent Uses

func (m *MockGerritServer) ChangeEditFileContent(arg0 context.Context, arg1 *ChangeEditFileContentRequest) (*empty.Empty, error)

ChangeEditFileContent mocks base method

func (*MockGerritServer) ChangeEditPublish Uses

func (m *MockGerritServer) ChangeEditPublish(arg0 context.Context, arg1 *ChangeEditPublishRequest) (*empty.Empty, error)

ChangeEditPublish mocks base method

func (*MockGerritServer) CreateChange Uses

func (m *MockGerritServer) CreateChange(arg0 context.Context, arg1 *CreateChangeRequest) (*ChangeInfo, error)

CreateChange mocks base method

func (*MockGerritServer) EXPECT Uses

func (m *MockGerritServer) EXPECT() *MockGerritServerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockGerritServer) GetChange Uses

func (m *MockGerritServer) GetChange(arg0 context.Context, arg1 *GetChangeRequest) (*ChangeInfo, error)

GetChange mocks base method

func (*MockGerritServer) SetReview Uses

func (m *MockGerritServer) SetReview(arg0 context.Context, arg1 *SetReviewRequest) (*ReviewResult, error)

SetReview mocks base method

func (*MockGerritServer) SubmitChange Uses

func (m *MockGerritServer) SubmitChange(arg0 context.Context, arg1 *SubmitChangeRequest) (*ChangeInfo, error)

SubmitChange mocks base method

type MockGerritServerMockRecorder Uses

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

MockGerritServerMockRecorder is the mock recorder for MockGerritServer

func (*MockGerritServerMockRecorder) AbandonChange Uses

func (mr *MockGerritServerMockRecorder) AbandonChange(arg0, arg1 interface{}) *gomock.Call

AbandonChange indicates an expected call of AbandonChange

func (*MockGerritServerMockRecorder) ChangeEditFileContent Uses

func (mr *MockGerritServerMockRecorder) ChangeEditFileContent(arg0, arg1 interface{}) *gomock.Call

ChangeEditFileContent indicates an expected call of ChangeEditFileContent

func (*MockGerritServerMockRecorder) ChangeEditPublish Uses

func (mr *MockGerritServerMockRecorder) ChangeEditPublish(arg0, arg1 interface{}) *gomock.Call

ChangeEditPublish indicates an expected call of ChangeEditPublish

func (*MockGerritServerMockRecorder) CreateChange Uses

func (mr *MockGerritServerMockRecorder) CreateChange(arg0, arg1 interface{}) *gomock.Call

CreateChange indicates an expected call of CreateChange

func (*MockGerritServerMockRecorder) GetChange Uses

func (mr *MockGerritServerMockRecorder) GetChange(arg0, arg1 interface{}) *gomock.Call

GetChange indicates an expected call of GetChange

func (*MockGerritServerMockRecorder) SetReview Uses

func (mr *MockGerritServerMockRecorder) SetReview(arg0, arg1 interface{}) *gomock.Call

SetReview indicates an expected call of SetReview

func (*MockGerritServerMockRecorder) SubmitChange Uses

func (mr *MockGerritServerMockRecorder) SubmitChange(arg0, arg1 interface{}) *gomock.Call

SubmitChange indicates an expected call of SubmitChange

type QueryOption Uses

type QueryOption int32

Specifies what extra information to include in the response.

Source of truth: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#query-options

const (
    QueryOption_OPTION_UNSPECIFIED QueryOption = 0
    // A summary of each label required for submit, and approvers that have
    // granted (or rejected) with that label.
    QueryOption_LABELS QueryOption = 1
    // Detailed label information, including numeric values of all existing
    // approvals, recognized label values, values permitted to be set by the
    // current user, all reviewers by state, and reviewers that may be removed by
    // the current user.
    QueryOption_DETAILED_LABELS QueryOption = 2
    // Describe the current revision (patch set) of the change, including the
    // commit SHA-1 and URLs to fetch from.
    QueryOption_CURRENT_REVISION QueryOption = 4
    // Describe all revisions, not just current.
    QueryOption_ALL_REVISIONS QueryOption = 8
    // Parse and output all header fields from the commit object, including
    // message. Only valid when the CURRENT_REVISION or ALL_REVISIONS option is
    // selected.
    QueryOption_CURRENT_COMMIT QueryOption = 16
    // Parse and output all header fields from the output revisions. If only
    // CURRENT_REVISION was requested then only the current revision’s commit data
    // will be output.
    QueryOption_ALL_COMMITS QueryOption = 32
    // List files modified by the commit and magic files, including basic line
    // counts inserted/deleted per file. Only valid when the CURRENT_REVISION or
    // ALL_REVISIONS option is selected.
    QueryOption_CURRENT_FILES QueryOption = 64
    // List files modified by the commit and magic files, including basic line
    // counts inserted/deleted per file. If only the CURRENT_REVISION was
    // requested then only that commit’s modified files will be output.
    QueryOption_ALL_FILES QueryOption = 128
    // Include _account_id, email and username fields when referencing accounts.
    QueryOption_DETAILED_ACCOUNTS QueryOption = 256
    // Include updates to reviewers set as ReviewerUpdateInfo entities.
    QueryOption_REVIEWER_UPDATES QueryOption = 512
    // Include messages associated with the change.
    QueryOption_MESSAGES QueryOption = 1024
    // Include information on available actions for the change and its current
    // revision. Ignored if the caller is not authenticated.
    QueryOption_CURRENT_ACTIONS QueryOption = 2048
    // Include information on available change actions for the change. Ignored if
    // the caller is not authenticated.
    QueryOption_CHANGE_ACTIONS QueryOption = 4096
    // Include the reviewed field if all of the following are true:
    // - the change is open
    // - the caller is authenticated
    // - the caller has commented on the change more recently than the last update
    //   from the change owner, i.e. this change would show up in the results of
    //   reviewedby:self.
    QueryOption_REVIEWED QueryOption = 8192
    // Skip the mergeable field in ChangeInfo. For fast moving projects, this
    // field must be recomputed often, which is slow for projects with big trees.
    QueryOption_SKIP_MERGEABLE QueryOption = 16384
    // Include the submittable field in ChangeInfo, which can be used to tell if
    // the change is reviewed and ready for submit.
    QueryOption_SUBMITTABLE QueryOption = 32768
    // Include the web_links field in CommitInfo, therefore only valid in
    // combination with CURRENT_COMMIT or ALL_COMMITS.
    QueryOption_WEB_LINKS QueryOption = 65536
    // Include potential problems with the change.
    QueryOption_CHECK QueryOption = 131072
    // Include the full commit message with Gerrit-specific commit footers in the
    // RevisionInfo.
    QueryOption_COMMIT_FOOTERS QueryOption = 262144
    // Include push certificate information in the RevisionInfo. Ignored if signed
    // push is not enabled on the server.
    QueryOption_PUSH_CERTIFICATES QueryOption = 524288
    // Include references to external tracking systems as TrackingIdInfo.
    QueryOption_TRACKING_IDS QueryOption = 1048576
    // Include the commands field in the FetchInfo for revisions. Only valid when
    // the CURRENT_REVISION or ALL_REVISIONS option is selected.
    QueryOption_DOWNLOAD_COMMANDS QueryOption = 2097152
)

func (QueryOption) EnumDescriptor Uses

func (QueryOption) EnumDescriptor() ([]byte, []int)

func (QueryOption) String Uses

func (x QueryOption) String() string

type ReviewResult Uses

type ReviewResult struct {
    // Map of labels to values after the review was posted. Null if any reviewer
    // additions were rejected.
    Labels               map[string]int32 `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
    XXX_NoUnkeyedLiteral struct{}         `json:"-"`
    XXX_unrecognized     []byte           `json:"-"`
    XXX_sizecache        int32            `json:"-"`
}

Information returned by a SetReview RPC.

Fields are a subset of: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#review-result

func (*ReviewResult) Descriptor Uses

func (*ReviewResult) Descriptor() ([]byte, []int)

func (*ReviewResult) GetLabels Uses

func (m *ReviewResult) GetLabels() map[string]int32

func (*ReviewResult) ProtoMessage Uses

func (*ReviewResult) ProtoMessage()

func (*ReviewResult) Reset Uses

func (m *ReviewResult) Reset()

func (*ReviewResult) String Uses

func (m *ReviewResult) String() string

func (*ReviewResult) XXX_DiscardUnknown Uses

func (m *ReviewResult) XXX_DiscardUnknown()

func (*ReviewResult) XXX_Marshal Uses

func (m *ReviewResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReviewResult) XXX_Merge Uses

func (m *ReviewResult) XXX_Merge(src proto.Message)

func (*ReviewResult) XXX_Size Uses

func (m *ReviewResult) XXX_Size() int

func (*ReviewResult) XXX_Unmarshal Uses

func (m *ReviewResult) XXX_Unmarshal(b []byte) error

type SetReviewRequest Uses

type SetReviewRequest struct {
    // The change number.
    Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
    // The project of this change. For example, "chromium/src".
    //
    // Optional, but recommended for better routing and faster RPC execution.
    Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"`
    // Unique ID for the revision to query.
    // See
    // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#revision-id
    RevisionId string `protobuf:"bytes,3,opt,name=revision_id,json=revisionId,proto3" json:"revision_id,omitempty"`
    // Message to be added to the change along with this review.
    Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
    // labels to add, e.g.:
    //   {
    //     "Code-Review": -1,
    //     "Verified": 1,
    //   }
    Labels               map[string]int32 `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
    XXX_NoUnkeyedLiteral struct{}         `json:"-"`
    XXX_unrecognized     []byte           `json:"-"`
    XXX_sizecache        int32            `json:"-"`
}

Information to set various review bits on a change

Fields are a subset of arguments from: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#set-review https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#review-input

func (*SetReviewRequest) Descriptor Uses

func (*SetReviewRequest) Descriptor() ([]byte, []int)

func (*SetReviewRequest) GetLabels Uses

func (m *SetReviewRequest) GetLabels() map[string]int32

func (*SetReviewRequest) GetMessage Uses

func (m *SetReviewRequest) GetMessage() string

func (*SetReviewRequest) GetNumber Uses

func (m *SetReviewRequest) GetNumber() int64

func (*SetReviewRequest) GetProject Uses

func (m *SetReviewRequest) GetProject() string

func (*SetReviewRequest) GetRevisionId Uses

func (m *SetReviewRequest) GetRevisionId() string

func (*SetReviewRequest) ProtoMessage Uses

func (*SetReviewRequest) ProtoMessage()

func (*SetReviewRequest) Reset Uses

func (m *SetReviewRequest) Reset()

func (*SetReviewRequest) String Uses

func (m *SetReviewRequest) String() string

func (*SetReviewRequest) XXX_DiscardUnknown Uses

func (m *SetReviewRequest) XXX_DiscardUnknown()

func (*SetReviewRequest) XXX_Marshal Uses

func (m *SetReviewRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetReviewRequest) XXX_Merge Uses

func (m *SetReviewRequest) XXX_Merge(src proto.Message)

func (*SetReviewRequest) XXX_Size Uses

func (m *SetReviewRequest) XXX_Size() int

func (*SetReviewRequest) XXX_Unmarshal Uses

func (m *SetReviewRequest) XXX_Unmarshal(b []byte) error

type SubmitChangeRequest Uses

type SubmitChangeRequest struct {
    // The change number.
    Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
    // The project of this change. For example, "chromium/src".
    //
    // Optional, but recommended for better routing and faster RPC execution.
    Project              string   `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Information to submit a change.

This is a placeholder to support the arguments from: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#submit-change https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#submit-input

func (*SubmitChangeRequest) Descriptor Uses

func (*SubmitChangeRequest) Descriptor() ([]byte, []int)

func (*SubmitChangeRequest) GetNumber Uses

func (m *SubmitChangeRequest) GetNumber() int64

func (*SubmitChangeRequest) GetProject Uses

func (m *SubmitChangeRequest) GetProject() string

func (*SubmitChangeRequest) ProtoMessage Uses

func (*SubmitChangeRequest) ProtoMessage()

func (*SubmitChangeRequest) Reset Uses

func (m *SubmitChangeRequest) Reset()

func (*SubmitChangeRequest) String Uses

func (m *SubmitChangeRequest) String() string

func (*SubmitChangeRequest) XXX_DiscardUnknown Uses

func (m *SubmitChangeRequest) XXX_DiscardUnknown()

func (*SubmitChangeRequest) XXX_Marshal Uses

func (m *SubmitChangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SubmitChangeRequest) XXX_Merge Uses

func (m *SubmitChangeRequest) XXX_Merge(src proto.Message)

func (*SubmitChangeRequest) XXX_Size Uses

func (m *SubmitChangeRequest) XXX_Size() int

func (*SubmitChangeRequest) XXX_Unmarshal Uses

func (m *SubmitChangeRequest) XXX_Unmarshal(b []byte) error

Package gerrit imports 12 packages (graph) and is imported by 4 packages. Updated 2018-12-19. Refresh now. Tools for package owners.