Documentation ¶
Overview ¶
Package sourceindexpb contains the definition for LUCI Source Index's RPC interfaces.
Index ¶
- Variables
- func FileDescriptorSet() *descriptorpb.FileDescriptorSet
- func RegisterSourceIndexServer(s prpc.Registrar, srv SourceIndexServer)
- type DecoratedSourceIndex
- type QueryCommitHashRequest
- func (*QueryCommitHashRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryCommitHashRequest) GetHost() string
- func (x *QueryCommitHashRequest) GetPositionNumber() int64
- func (x *QueryCommitHashRequest) GetPositionRef() string
- func (x *QueryCommitHashRequest) GetRepository() string
- func (*QueryCommitHashRequest) ProtoMessage()
- func (x *QueryCommitHashRequest) ProtoReflect() protoreflect.Message
- func (x *QueryCommitHashRequest) Reset()
- func (x *QueryCommitHashRequest) String() string
- type QueryCommitHashResponse
- func (*QueryCommitHashResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryCommitHashResponse) GetHash() string
- func (*QueryCommitHashResponse) ProtoMessage()
- func (x *QueryCommitHashResponse) ProtoReflect() protoreflect.Message
- func (x *QueryCommitHashResponse) Reset()
- func (x *QueryCommitHashResponse) String() string
- type SourceIndexClient
- type SourceIndexServer
- type UnimplementedSourceIndexServer
Constants ¶
This section is empty.
Variables ¶
var File_go_chromium_org_luci_source_index_proto_v1_source_index_proto protoreflect.FileDescriptor
Functions ¶
func FileDescriptorSet ¶
func FileDescriptorSet() *descriptorpb.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 RegisterSourceIndexServer ¶
func RegisterSourceIndexServer(s prpc.Registrar, srv SourceIndexServer)
Types ¶
type DecoratedSourceIndex ¶
type DecoratedSourceIndex struct { // Service is the service to decorate. Service SourceIndexServer // Prelude is called for each method before forwarding the call to Service. // If Prelude returns an error, then the call is skipped and the error is // processed via the Postlude (if one is defined), or it is returned directly. Prelude func(ctx context.Context, methodName string, req proto.Message) (context.Context, error) // Postlude is called for each method after Service has processed the call, or // after the Prelude has returned an error. This takes the Service's // response proto (which may be nil) and/or any error. The decorated // service will return the response (possibly mutated) and error that Postlude // returns. Postlude func(ctx context.Context, methodName string, rsp proto.Message, err error) error }
func (*DecoratedSourceIndex) QueryCommitHash ¶
func (s *DecoratedSourceIndex) QueryCommitHash(ctx context.Context, req *QueryCommitHashRequest) (rsp *QueryCommitHashResponse, err error)
type QueryCommitHashRequest ¶
type QueryCommitHashRequest struct { // Required. The gitiles host. Must be a subdomain of `.googlesource.com` // (e.g. chromium.googlesource.com). Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // Required. The Git project to query the commit in (e.g. chromium/src). Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"` // Required. The name of position defined in value of git-footer git-svn-id // or Cr-Commit-Position (e.g. refs/heads/master, // svn://svn.chromium.org/chrome/trunk/src) PositionRef string `protobuf:"bytes,3,opt,name=position_ref,json=positionRef,proto3" json:"position_ref,omitempty"` // Required. The sequential identifier of the commit in the given branch // (position_ref). PositionNumber int64 `protobuf:"varint,4,opt,name=position_number,json=positionNumber,proto3" json:"position_number,omitempty"` // contains filtered or unexported fields }
func (*QueryCommitHashRequest) Descriptor
deprecated
func (*QueryCommitHashRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryCommitHashRequest.ProtoReflect.Descriptor instead.
func (*QueryCommitHashRequest) GetHost ¶
func (x *QueryCommitHashRequest) GetHost() string
func (*QueryCommitHashRequest) GetPositionNumber ¶
func (x *QueryCommitHashRequest) GetPositionNumber() int64
func (*QueryCommitHashRequest) GetPositionRef ¶
func (x *QueryCommitHashRequest) GetPositionRef() string
func (*QueryCommitHashRequest) GetRepository ¶
func (x *QueryCommitHashRequest) GetRepository() string
func (*QueryCommitHashRequest) ProtoMessage ¶
func (*QueryCommitHashRequest) ProtoMessage()
func (*QueryCommitHashRequest) ProtoReflect ¶
func (x *QueryCommitHashRequest) ProtoReflect() protoreflect.Message
func (*QueryCommitHashRequest) Reset ¶
func (x *QueryCommitHashRequest) Reset()
func (*QueryCommitHashRequest) String ¶
func (x *QueryCommitHashRequest) String() string
type QueryCommitHashResponse ¶
type QueryCommitHashResponse struct { // The full git commit hash of the matched commit. Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
func (*QueryCommitHashResponse) Descriptor
deprecated
func (*QueryCommitHashResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryCommitHashResponse.ProtoReflect.Descriptor instead.
func (*QueryCommitHashResponse) GetHash ¶
func (x *QueryCommitHashResponse) GetHash() string
func (*QueryCommitHashResponse) ProtoMessage ¶
func (*QueryCommitHashResponse) ProtoMessage()
func (*QueryCommitHashResponse) ProtoReflect ¶
func (x *QueryCommitHashResponse) ProtoReflect() protoreflect.Message
func (*QueryCommitHashResponse) Reset ¶
func (x *QueryCommitHashResponse) Reset()
func (*QueryCommitHashResponse) String ¶
func (x *QueryCommitHashResponse) String() string
type SourceIndexClient ¶
type SourceIndexClient interface { // QueryCommitHash returns commit that matches desired position of commit, // based on QueryCommitHashRequest parameters. Commit position is based on // git-footer git-svn-id or Cr-Commit-Position. // // Returns `NOT_FOUND` if the commit is not indexed by source-index. // When there are multiple matches (i.e. the same commit position occurs on // different commits somehow), the first match (determined arbitrarily) will // be returned. QueryCommitHash(ctx context.Context, in *QueryCommitHashRequest, opts ...grpc.CallOption) (*QueryCommitHashResponse, error) }
SourceIndexClient is the client API for SourceIndex service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSourceIndexClient ¶
func NewSourceIndexClient(cc grpc.ClientConnInterface) SourceIndexClient
func NewSourceIndexPRPCClient ¶
func NewSourceIndexPRPCClient(client *prpc.Client) SourceIndexClient
type SourceIndexServer ¶
type SourceIndexServer interface { // QueryCommitHash returns commit that matches desired position of commit, // based on QueryCommitHashRequest parameters. Commit position is based on // git-footer git-svn-id or Cr-Commit-Position. // // Returns `NOT_FOUND` if the commit is not indexed by source-index. // When there are multiple matches (i.e. the same commit position occurs on // different commits somehow), the first match (determined arbitrarily) will // be returned. QueryCommitHash(context.Context, *QueryCommitHashRequest) (*QueryCommitHashResponse, error) }
SourceIndexServer is the server API for SourceIndex service.
type UnimplementedSourceIndexServer ¶
type UnimplementedSourceIndexServer struct { }
UnimplementedSourceIndexServer can be embedded to have forward compatible implementations.
func (*UnimplementedSourceIndexServer) QueryCommitHash ¶
func (*UnimplementedSourceIndexServer) QueryCommitHash(context.Context, *QueryCommitHashRequest) (*QueryCommitHashResponse, error)