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: cleanup.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)
)

// ApplyBfgObjectMapStreamRequest ...
type ApplyBfgObjectMapStreamRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// repository ...
	// Only available on the first message
	Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
	// object_map is a raw object-map file as generated by BFG: https://rtyley.github.io/bfg-repo-cleaner
	// Each line in the file has two object SHAs, space-separated - the original
	// SHA of the object, and the SHA after BFG has rewritten the object.
	ObjectMap     []byte `protobuf:"bytes,2,opt,name=object_map,json=objectMap,proto3" json:"object_map,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ApplyBfgObjectMapStreamRequest) ProtoMessage() {}

func (x *ApplyBfgObjectMapStreamRequest) ProtoReflect() protoreflect.Message {
	mi := &file_cleanup_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 ApplyBfgObjectMapStreamRequest.ProtoReflect.Descriptor instead.
func (*ApplyBfgObjectMapStreamRequest) Descriptor() ([]byte, []int) {
	return file_cleanup_proto_rawDescGZIP(), []int{0}
}

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

func (x *ApplyBfgObjectMapStreamRequest) GetObjectMap() []byte {
	if x != nil {
		return x.ObjectMap
	}
	return nil
}

// ApplyBfgObjectMapStreamResponse ...
type ApplyBfgObjectMapStreamResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// entries ...
	Entries       []*ApplyBfgObjectMapStreamResponse_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ApplyBfgObjectMapStreamResponse) ProtoMessage() {}

func (x *ApplyBfgObjectMapStreamResponse) ProtoReflect() protoreflect.Message {
	mi := &file_cleanup_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 ApplyBfgObjectMapStreamResponse.ProtoReflect.Descriptor instead.
func (*ApplyBfgObjectMapStreamResponse) Descriptor() ([]byte, []int) {
	return file_cleanup_proto_rawDescGZIP(), []int{1}
}

func (x *ApplyBfgObjectMapStreamResponse) GetEntries() []*ApplyBfgObjectMapStreamResponse_Entry {
	if x != nil {
		return x.Entries
	}
	return nil
}

// RewriteHistoryRequest is a request for the RewriteHistory RPC.
type RewriteHistoryRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// repository is the repository that shall be rewritten.
	// Must be sent on the first request only.
	Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
	// blobs is the list of blob object ids that will be removed from history.
	Blobs []string `protobuf:"bytes,2,rep,name=blobs,proto3" json:"blobs,omitempty"`
	// redactions is the list of literals or patterns that will be replaced
	// with "***REMOVED***". Items cannot contain newline characters.
	// See https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html
	// for a full explanation of what patterns are supported.
	Redactions    [][]byte `protobuf:"bytes,3,rep,name=redactions,proto3" json:"redactions,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RewriteHistoryRequest) ProtoMessage() {}

func (x *RewriteHistoryRequest) ProtoReflect() protoreflect.Message {
	mi := &file_cleanup_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 RewriteHistoryRequest.ProtoReflect.Descriptor instead.
func (*RewriteHistoryRequest) Descriptor() ([]byte, []int) {
	return file_cleanup_proto_rawDescGZIP(), []int{2}
}

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

func (x *RewriteHistoryRequest) GetBlobs() []string {
	if x != nil {
		return x.Blobs
	}
	return nil
}

func (x *RewriteHistoryRequest) GetRedactions() [][]byte {
	if x != nil {
		return x.Redactions
	}
	return nil
}

// RewriteHistoryResponse a response for the RewriteHistory RPC.
type RewriteHistoryResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RewriteHistoryResponse) ProtoMessage() {}

func (x *RewriteHistoryResponse) ProtoReflect() protoreflect.Message {
	mi := &file_cleanup_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 RewriteHistoryResponse.ProtoReflect.Descriptor instead.
func (*RewriteHistoryResponse) Descriptor() ([]byte, []int) {
	return file_cleanup_proto_rawDescGZIP(), []int{3}
}

// Entry refers to each parsed entry in the request's object map so the client
// can take action.
type ApplyBfgObjectMapStreamResponse_Entry struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// type ...
	Type ObjectType `protobuf:"varint,1,opt,name=type,proto3,enum=gitaly.ObjectType" json:"type,omitempty"`
	// old_oid ...
	OldOid string `protobuf:"bytes,2,opt,name=old_oid,json=oldOid,proto3" json:"old_oid,omitempty"`
	// new_oid ...
	NewOid        string `protobuf:"bytes,3,opt,name=new_oid,json=newOid,proto3" json:"new_oid,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ApplyBfgObjectMapStreamResponse_Entry) ProtoMessage() {}

func (x *ApplyBfgObjectMapStreamResponse_Entry) ProtoReflect() protoreflect.Message {
	mi := &file_cleanup_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 ApplyBfgObjectMapStreamResponse_Entry.ProtoReflect.Descriptor instead.
func (*ApplyBfgObjectMapStreamResponse_Entry) Descriptor() ([]byte, []int) {
	return file_cleanup_proto_rawDescGZIP(), []int{1, 0}
}

func (x *ApplyBfgObjectMapStreamResponse_Entry) GetType() ObjectType {
	if x != nil {
		return x.Type
	}
	return ObjectType_UNKNOWN
}

func (x *ApplyBfgObjectMapStreamResponse_Entry) GetOldOid() string {
	if x != nil {
		return x.OldOid
	}
	return ""
}

func (x *ApplyBfgObjectMapStreamResponse_Entry) GetNewOid() string {
	if x != nil {
		return x.NewOid
	}
	return ""
}

var File_cleanup_proto protoreflect.FileDescriptor

const file_cleanup_proto_rawDesc = "" +
	"\n" +
	"\rcleanup.proto\x12\x06gitaly\x1a\n" +
	"lint.proto\x1a\fshared.proto\"y\n" +
	"\x1eApplyBfgObjectMapStreamRequest\x128\n" +
	"\n" +
	"repository\x18\x01 \x01(\v2\x12.gitaly.RepositoryB\x04\x98\xc6,\x01R\n" +
	"repository\x12\x1d\n" +
	"\n" +
	"object_map\x18\x02 \x01(\fR\tobjectMap\"\xcd\x01\n" +
	"\x1fApplyBfgObjectMapStreamResponse\x12G\n" +
	"\aentries\x18\x01 \x03(\v2-.gitaly.ApplyBfgObjectMapStreamResponse.EntryR\aentries\x1aa\n" +
	"\x05Entry\x12&\n" +
	"\x04type\x18\x01 \x01(\x0e2\x12.gitaly.ObjectTypeR\x04type\x12\x17\n" +
	"\aold_oid\x18\x02 \x01(\tR\x06oldOid\x12\x17\n" +
	"\anew_oid\x18\x03 \x01(\tR\x06newOid\"\x87\x01\n" +
	"\x15RewriteHistoryRequest\x128\n" +
	"\n" +
	"repository\x18\x01 \x01(\v2\x12.gitaly.RepositoryB\x04\x98\xc6,\x01R\n" +
	"repository\x12\x14\n" +
	"\x05blobs\x18\x02 \x03(\tR\x05blobs\x12\x1e\n" +
	"\n" +
	"redactions\x18\x03 \x03(\fR\n" +
	"redactions\"\x18\n" +
	"\x16RewriteHistoryResponse2\xe3\x01\n" +
	"\x0eCleanupService\x12v\n" +
	"\x17ApplyBfgObjectMapStream\x12&.gitaly.ApplyBfgObjectMapStreamRequest\x1a'.gitaly.ApplyBfgObjectMapStreamResponse\"\x06\xfa\x97(\x02\b\x01(\x010\x01\x12Y\n" +
	"\x0eRewriteHistory\x12\x1d.gitaly.RewriteHistoryRequest\x1a\x1e.gitaly.RewriteHistoryResponse\"\x06\xfa\x97(\x02\b\x01(\x01B.Z,github.com/feder-cr/git-ai/proto/go/gitalypbb\x06proto3"

var (
	file_cleanup_proto_rawDescOnce sync.Once
	file_cleanup_proto_rawDescData []byte
)

func file_cleanup_proto_rawDescGZIP() []byte {
	file_cleanup_proto_rawDescOnce.Do(func() {
		file_cleanup_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_cleanup_proto_rawDesc), len(file_cleanup_proto_rawDesc)))
	})
	return file_cleanup_proto_rawDescData
}

var file_cleanup_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_cleanup_proto_goTypes = []any{
	(*ApplyBfgObjectMapStreamRequest)(nil),        // 0: gitaly.ApplyBfgObjectMapStreamRequest
	(*ApplyBfgObjectMapStreamResponse)(nil),       // 1: gitaly.ApplyBfgObjectMapStreamResponse
	(*RewriteHistoryRequest)(nil),                 // 2: gitaly.RewriteHistoryRequest
	(*RewriteHistoryResponse)(nil),                // 3: gitaly.RewriteHistoryResponse
	(*ApplyBfgObjectMapStreamResponse_Entry)(nil), // 4: gitaly.ApplyBfgObjectMapStreamResponse.Entry
	(*Repository)(nil),                            // 5: gitaly.Repository
	(ObjectType)(0),                               // 6: gitaly.ObjectType
}
var file_cleanup_proto_depIdxs = []int32{
	5, // 0: gitaly.ApplyBfgObjectMapStreamRequest.repository:type_name -> gitaly.Repository
	4, // 1: gitaly.ApplyBfgObjectMapStreamResponse.entries:type_name -> gitaly.ApplyBfgObjectMapStreamResponse.Entry
	5, // 2: gitaly.RewriteHistoryRequest.repository:type_name -> gitaly.Repository
	6, // 3: gitaly.ApplyBfgObjectMapStreamResponse.Entry.type:type_name -> gitaly.ObjectType
	0, // 4: gitaly.CleanupService.ApplyBfgObjectMapStream:input_type -> gitaly.ApplyBfgObjectMapStreamRequest
	2, // 5: gitaly.CleanupService.RewriteHistory:input_type -> gitaly.RewriteHistoryRequest
	1, // 6: gitaly.CleanupService.ApplyBfgObjectMapStream:output_type -> gitaly.ApplyBfgObjectMapStreamResponse
	3, // 7: gitaly.CleanupService.RewriteHistory:output_type -> gitaly.RewriteHistoryResponse
	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_cleanup_proto_init() }
func file_cleanup_proto_init() {
	if File_cleanup_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_cleanup_proto_rawDesc), len(file_cleanup_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_cleanup_proto_goTypes,
		DependencyIndexes: file_cleanup_proto_depIdxs,
		MessageInfos:      file_cleanup_proto_msgTypes,
	}.Build()
	File_cleanup_proto = out.File
	file_cleanup_proto_goTypes = nil
	file_cleanup_proto_depIdxs = nil
}