Skip to content

Git designed for AI agents.

13.0 KB
Raw Blame
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.12
// 	protoc        v6.30.2
// source: derived.proto

package gitalypb

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// BlameRequest is a request for the Blame RPC.
type BlameRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// repository is the repository to read from.
	Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
	// revision is the commit-ish to blame at.
	Revision []byte `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
	// path is the file path relative to the repository root.
	Path          []byte `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *BlameRequest) Reset() {
	*x = BlameRequest{}
	mi := &file_derived_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *BlameRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*BlameRequest) ProtoMessage() {}

func (x *BlameRequest) ProtoReflect() protoreflect.Message {
	mi := &file_derived_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use BlameRequest.ProtoReflect.Descriptor instead.
func (*BlameRequest) Descriptor() ([]byte, []int) {
	return file_derived_proto_rawDescGZIP(), []int{0}
}

func (x *BlameRequest) GetRepository() *Repository {
	if x != nil {
		return x.Repository
	}
	return nil
}

func (x *BlameRequest) GetRevision() []byte {
	if x != nil {
		return x.Revision
	}
	return nil
}

func (x *BlameRequest) GetPath() []byte {
	if x != nil {
		return x.Path
	}
	return nil
}

// BlameResponse carries a batch of attributed lines.
type BlameResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// commit_id is the resolved revision. Only set on the first message.
	CommitId string `protobuf:"bytes,1,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"`
	// lines is a batch of lines in ascending line_number order.
	Lines         []*BlameResponse_Line `protobuf:"bytes,2,rep,name=lines,proto3" json:"lines,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *BlameResponse) Reset() {
	*x = BlameResponse{}
	mi := &file_derived_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *BlameResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*BlameResponse) ProtoMessage() {}

func (x *BlameResponse) ProtoReflect() protoreflect.Message {
	mi := &file_derived_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use BlameResponse.ProtoReflect.Descriptor instead.
func (*BlameResponse) Descriptor() ([]byte, []int) {
	return file_derived_proto_rawDescGZIP(), []int{1}
}

func (x *BlameResponse) GetCommitId() string {
	if x != nil {
		return x.CommitId
	}
	return ""
}

func (x *BlameResponse) GetLines() []*BlameResponse_Line {
	if x != nil {
		return x.Lines
	}
	return nil
}

// PathHistoryRequest is a request for the PathHistory RPC.
type PathHistoryRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// repository is the repository to read from.
	Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
	// revision is the commit-ish to start at.
	Revision []byte `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
	// path is the file or directory path relative to the repository root.
	Path []byte `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	// limit bounds the number of commits; 0 means 100.
	Limit         uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *PathHistoryRequest) Reset() {
	*x = PathHistoryRequest{}
	mi := &file_derived_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *PathHistoryRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*PathHistoryRequest) ProtoMessage() {}

func (x *PathHistoryRequest) ProtoReflect() protoreflect.Message {
	mi := &file_derived_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use PathHistoryRequest.ProtoReflect.Descriptor instead.
func (*PathHistoryRequest) Descriptor() ([]byte, []int) {
	return file_derived_proto_rawDescGZIP(), []int{2}
}

func (x *PathHistoryRequest) GetRepository() *Repository {
	if x != nil {
		return x.Repository
	}
	return nil
}

func (x *PathHistoryRequest) GetRevision() []byte {
	if x != nil {
		return x.Revision
	}
	return nil
}

func (x *PathHistoryRequest) GetPath() []byte {
	if x != nil {
		return x.Path
	}
	return nil
}

func (x *PathHistoryRequest) GetLimit() uint32 {
	if x != nil {
		return x.Limit
	}
	return 0
}

// PathHistoryResponse carries a batch of commits.
type PathHistoryResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// commits is a batch of commits, newest first.
	Commits       []*GitCommit `protobuf:"bytes,1,rep,name=commits,proto3" json:"commits,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *PathHistoryResponse) Reset() {
	*x = PathHistoryResponse{}
	mi := &file_derived_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *PathHistoryResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*PathHistoryResponse) ProtoMessage() {}

func (x *PathHistoryResponse) ProtoReflect() protoreflect.Message {
	mi := &file_derived_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use PathHistoryResponse.ProtoReflect.Descriptor instead.
func (*PathHistoryResponse) Descriptor() ([]byte, []int) {
	return file_derived_proto_rawDescGZIP(), []int{3}
}

func (x *PathHistoryResponse) GetCommits() []*GitCommit {
	if x != nil {
		return x.Commits
	}
	return nil
}

// Line is one attributed line.
type BlameResponse_Line struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// line_number is 1-based.
	LineNumber int32 `protobuf:"varint,1,opt,name=line_number,json=lineNumber,proto3" json:"line_number,omitempty"`
	// commit_id is the commit that introduced the line in its current form.
	CommitId string `protobuf:"bytes,2,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"`
	// original_line_number is the line's number in commit_id's version.
	OriginalLineNumber int32 `protobuf:"varint,3,opt,name=original_line_number,json=originalLineNumber,proto3" json:"original_line_number,omitempty"`
	// content is the line content without the trailing newline.
	Content       []byte `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *BlameResponse_Line) Reset() {
	*x = BlameResponse_Line{}
	mi := &file_derived_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *BlameResponse_Line) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*BlameResponse_Line) ProtoMessage() {}

func (x *BlameResponse_Line) ProtoReflect() protoreflect.Message {
	mi := &file_derived_proto_msgTypes[4]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use BlameResponse_Line.ProtoReflect.Descriptor instead.
func (*BlameResponse_Line) Descriptor() ([]byte, []int) {
	return file_derived_proto_rawDescGZIP(), []int{1, 0}
}

func (x *BlameResponse_Line) GetLineNumber() int32 {
	if x != nil {
		return x.LineNumber
	}
	return 0
}

func (x *BlameResponse_Line) GetCommitId() string {
	if x != nil {
		return x.CommitId
	}
	return ""
}

func (x *BlameResponse_Line) GetOriginalLineNumber() int32 {
	if x != nil {
		return x.OriginalLineNumber
	}
	return 0
}

func (x *BlameResponse_Line) GetContent() []byte {
	if x != nil {
		return x.Content
	}
	return nil
}

var File_derived_proto protoreflect.FileDescriptor

const file_derived_proto_rawDesc = "" +
	"\n" +
	"\rderived.proto\x12\x06gitaly\x1a\n" +
	"lint.proto\x1a\fshared.proto\"x\n" +
	"\fBlameRequest\x128\n" +
	"\n" +
	"repository\x18\x01 \x01(\v2\x12.gitaly.RepositoryB\x04\x98\xc6,\x01R\n" +
	"repository\x12\x1a\n" +
	"\brevision\x18\x02 \x01(\fR\brevision\x12\x12\n" +
	"\x04path\x18\x03 \x01(\fR\x04path\"\xf1\x01\n" +
	"\rBlameResponse\x12\x1b\n" +
	"\tcommit_id\x18\x01 \x01(\tR\bcommitId\x120\n" +
	"\x05lines\x18\x02 \x03(\v2\x1a.gitaly.BlameResponse.LineR\x05lines\x1a\x90\x01\n" +
	"\x04Line\x12\x1f\n" +
	"\vline_number\x18\x01 \x01(\x05R\n" +
	"lineNumber\x12\x1b\n" +
	"\tcommit_id\x18\x02 \x01(\tR\bcommitId\x120\n" +
	"\x14original_line_number\x18\x03 \x01(\x05R\x12originalLineNumber\x12\x18\n" +
	"\acontent\x18\x04 \x01(\fR\acontent\"\x94\x01\n" +
	"\x12PathHistoryRequest\x128\n" +
	"\n" +
	"repository\x18\x01 \x01(\v2\x12.gitaly.RepositoryB\x04\x98\xc6,\x01R\n" +
	"repository\x12\x1a\n" +
	"\brevision\x18\x02 \x01(\fR\brevision\x12\x12\n" +
	"\x04path\x18\x03 \x01(\fR\x04path\x12\x14\n" +
	"\x05limit\x18\x04 \x01(\rR\x05limit\"B\n" +
	"\x13PathHistoryResponse\x12+\n" +
	"\acommits\x18\x01 \x03(\v2\x11.gitaly.GitCommitR\acommits2\xa6\x01\n" +
	"\x12DerivedDataService\x12>\n" +
	"\x05Blame\x12\x14.gitaly.BlameRequest\x1a\x15.gitaly.BlameResponse\"\x06\xfa\x97(\x02\b\x020\x01\x12P\n" +
	"\vPathHistory\x12\x1a.gitaly.PathHistoryRequest\x1a\x1b.gitaly.PathHistoryResponse\"\x06\xfa\x97(\x02\b\x020\x01B.Z,github.com/feder-cr/git-ai/proto/go/gitalypbb\x06proto3"

var (
	file_derived_proto_rawDescOnce sync.Once
	file_derived_proto_rawDescData []byte
)

func file_derived_proto_rawDescGZIP() []byte {
	file_derived_proto_rawDescOnce.Do(func() {
		file_derived_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_derived_proto_rawDesc), len(file_derived_proto_rawDesc)))
	})
	return file_derived_proto_rawDescData
}

var file_derived_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_derived_proto_goTypes = []any{
	(*BlameRequest)(nil),        // 0: gitaly.BlameRequest
	(*BlameResponse)(nil),       // 1: gitaly.BlameResponse
	(*PathHistoryRequest)(nil),  // 2: gitaly.PathHistoryRequest
	(*PathHistoryResponse)(nil), // 3: gitaly.PathHistoryResponse
	(*BlameResponse_Line)(nil),  // 4: gitaly.BlameResponse.Line
	(*Repository)(nil),          // 5: gitaly.Repository
	(*GitCommit)(nil),           // 6: gitaly.GitCommit
}
var file_derived_proto_depIdxs = []int32{
	5, // 0: gitaly.BlameRequest.repository:type_name -> gitaly.Repository
	4, // 1: gitaly.BlameResponse.lines:type_name -> gitaly.BlameResponse.Line
	5, // 2: gitaly.PathHistoryRequest.repository:type_name -> gitaly.Repository
	6, // 3: gitaly.PathHistoryResponse.commits:type_name -> gitaly.GitCommit
	0, // 4: gitaly.DerivedDataService.Blame:input_type -> gitaly.BlameRequest
	2, // 5: gitaly.DerivedDataService.PathHistory:input_type -> gitaly.PathHistoryRequest
	1, // 6: gitaly.DerivedDataService.Blame:output_type -> gitaly.BlameResponse
	3, // 7: gitaly.DerivedDataService.PathHistory:output_type -> gitaly.PathHistoryResponse
	6, // [6:8] is the sub-list for method output_type
	4, // [4:6] is the sub-list for method input_type
	4, // [4:4] is the sub-list for extension type_name
	4, // [4:4] is the sub-list for extension extendee
	0, // [0:4] is the sub-list for field type_name
}

func init() { file_derived_proto_init() }
func file_derived_proto_init() {
	if File_derived_proto != nil {
		return
	}
	file_lint_proto_init()
	file_shared_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_derived_proto_rawDesc), len(file_derived_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_derived_proto_goTypes,
		DependencyIndexes: file_derived_proto_depIdxs,
		MessageInfos:      file_derived_proto_msgTypes,
	}.Build()
	File_derived_proto = out.File
	file_derived_proto_goTypes = nil
	file_derived_proto_depIdxs = nil
}