mirror of
https://github.com/harness/drone.git
synced 2025-05-05 19:53:13 +08:00

* pull/push impl done * Basic auth for harness * gitrpc as top level package * New ctor for package * gitrpcserver instead of server2
376 lines
10 KiB
Go
376 lines
10 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.28.1
|
|
// protoc v3.21.7
|
|
// source: shared.proto
|
|
|
|
package rpc
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
)
|
|
|
|
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)
|
|
)
|
|
|
|
type SortOrder int32
|
|
|
|
const (
|
|
SortOrder_Default SortOrder = 0
|
|
SortOrder_Asc SortOrder = 1
|
|
SortOrder_Desc SortOrder = 2
|
|
)
|
|
|
|
// Enum value maps for SortOrder.
|
|
var (
|
|
SortOrder_name = map[int32]string{
|
|
0: "Default",
|
|
1: "Asc",
|
|
2: "Desc",
|
|
}
|
|
SortOrder_value = map[string]int32{
|
|
"Default": 0,
|
|
"Asc": 1,
|
|
"Desc": 2,
|
|
}
|
|
)
|
|
|
|
func (x SortOrder) Enum() *SortOrder {
|
|
p := new(SortOrder)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x SortOrder) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (SortOrder) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_shared_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (SortOrder) Type() protoreflect.EnumType {
|
|
return &file_shared_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x SortOrder) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use SortOrder.Descriptor instead.
|
|
func (SortOrder) EnumDescriptor() ([]byte, []int) {
|
|
return file_shared_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
type FileUpload struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
// Types that are assignable to Data:
|
|
// *FileUpload_Header
|
|
// *FileUpload_Chunk
|
|
Data isFileUpload_Data `protobuf_oneof:"data"`
|
|
}
|
|
|
|
func (x *FileUpload) Reset() {
|
|
*x = FileUpload{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_shared_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *FileUpload) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*FileUpload) ProtoMessage() {}
|
|
|
|
func (x *FileUpload) ProtoReflect() protoreflect.Message {
|
|
mi := &file_shared_proto_msgTypes[0]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use FileUpload.ProtoReflect.Descriptor instead.
|
|
func (*FileUpload) Descriptor() ([]byte, []int) {
|
|
return file_shared_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (m *FileUpload) GetData() isFileUpload_Data {
|
|
if m != nil {
|
|
return m.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *FileUpload) GetHeader() *FileUploadHeader {
|
|
if x, ok := x.GetData().(*FileUpload_Header); ok {
|
|
return x.Header
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *FileUpload) GetChunk() *Chunk {
|
|
if x, ok := x.GetData().(*FileUpload_Chunk); ok {
|
|
return x.Chunk
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type isFileUpload_Data interface {
|
|
isFileUpload_Data()
|
|
}
|
|
|
|
type FileUpload_Header struct {
|
|
Header *FileUploadHeader `protobuf:"bytes,1,opt,name=header,proto3,oneof"`
|
|
}
|
|
|
|
type FileUpload_Chunk struct {
|
|
Chunk *Chunk `protobuf:"bytes,2,opt,name=chunk,proto3,oneof"`
|
|
}
|
|
|
|
func (*FileUpload_Header) isFileUpload_Data() {}
|
|
|
|
func (*FileUpload_Chunk) isFileUpload_Data() {}
|
|
|
|
type FileUploadHeader struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
|
|
}
|
|
|
|
func (x *FileUploadHeader) Reset() {
|
|
*x = FileUploadHeader{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_shared_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *FileUploadHeader) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*FileUploadHeader) ProtoMessage() {}
|
|
|
|
func (x *FileUploadHeader) ProtoReflect() protoreflect.Message {
|
|
mi := &file_shared_proto_msgTypes[1]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use FileUploadHeader.ProtoReflect.Descriptor instead.
|
|
func (*FileUploadHeader) Descriptor() ([]byte, []int) {
|
|
return file_shared_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *FileUploadHeader) GetPath() string {
|
|
if x != nil {
|
|
return x.Path
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type Chunk struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Eof bool `protobuf:"varint,1,opt,name=eof,proto3" json:"eof,omitempty"`
|
|
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
|
}
|
|
|
|
func (x *Chunk) Reset() {
|
|
*x = Chunk{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_shared_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Chunk) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Chunk) ProtoMessage() {}
|
|
|
|
func (x *Chunk) ProtoReflect() protoreflect.Message {
|
|
mi := &file_shared_proto_msgTypes[2]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Chunk.ProtoReflect.Descriptor instead.
|
|
func (*Chunk) Descriptor() ([]byte, []int) {
|
|
return file_shared_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *Chunk) GetEof() bool {
|
|
if x != nil {
|
|
return x.Eof
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *Chunk) GetData() []byte {
|
|
if x != nil {
|
|
return x.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_shared_proto protoreflect.FileDescriptor
|
|
|
|
var file_shared_proto_rawDesc = []byte{
|
|
0x0a, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03,
|
|
0x72, 0x70, 0x63, 0x22, 0x69, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61,
|
|
0x64, 0x12, 0x2f, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
0x0b, 0x32, 0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x55, 0x70, 0x6c, 0x6f,
|
|
0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64,
|
|
0x65, 0x72, 0x12, 0x22, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28,
|
|
0x0b, 0x32, 0x0a, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x48, 0x00, 0x52,
|
|
0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x26,
|
|
0x0a, 0x10, 0x46, 0x69, 0x6c, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64,
|
|
0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
|
0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2d, 0x0a, 0x05, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12,
|
|
0x10, 0x0a, 0x03, 0x65, 0x6f, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x65, 0x6f,
|
|
0x66, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
|
0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x2b, 0x0a, 0x09, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64,
|
|
0x65, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x00, 0x12,
|
|
0x07, 0x0a, 0x03, 0x41, 0x73, 0x63, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x65, 0x73, 0x63,
|
|
0x10, 0x02, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
|
0x2f, 0x68, 0x61, 0x72, 0x6e, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73,
|
|
0x2f, 0x67, 0x69, 0x74, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
|
0x74, 0x6f, 0x33,
|
|
}
|
|
|
|
var (
|
|
file_shared_proto_rawDescOnce sync.Once
|
|
file_shared_proto_rawDescData = file_shared_proto_rawDesc
|
|
)
|
|
|
|
func file_shared_proto_rawDescGZIP() []byte {
|
|
file_shared_proto_rawDescOnce.Do(func() {
|
|
file_shared_proto_rawDescData = protoimpl.X.CompressGZIP(file_shared_proto_rawDescData)
|
|
})
|
|
return file_shared_proto_rawDescData
|
|
}
|
|
|
|
var file_shared_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
|
var file_shared_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
var file_shared_proto_goTypes = []interface{}{
|
|
(SortOrder)(0), // 0: rpc.SortOrder
|
|
(*FileUpload)(nil), // 1: rpc.FileUpload
|
|
(*FileUploadHeader)(nil), // 2: rpc.FileUploadHeader
|
|
(*Chunk)(nil), // 3: rpc.Chunk
|
|
}
|
|
var file_shared_proto_depIdxs = []int32{
|
|
2, // 0: rpc.FileUpload.header:type_name -> rpc.FileUploadHeader
|
|
3, // 1: rpc.FileUpload.chunk:type_name -> rpc.Chunk
|
|
2, // [2:2] is the sub-list for method output_type
|
|
2, // [2:2] is the sub-list for method input_type
|
|
2, // [2:2] is the sub-list for extension type_name
|
|
2, // [2:2] is the sub-list for extension extendee
|
|
0, // [0:2] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_shared_proto_init() }
|
|
func file_shared_proto_init() {
|
|
if File_shared_proto != nil {
|
|
return
|
|
}
|
|
if !protoimpl.UnsafeEnabled {
|
|
file_shared_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*FileUpload); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_shared_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*FileUploadHeader); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_shared_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Chunk); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
}
|
|
file_shared_proto_msgTypes[0].OneofWrappers = []interface{}{
|
|
(*FileUpload_Header)(nil),
|
|
(*FileUpload_Chunk)(nil),
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: file_shared_proto_rawDesc,
|
|
NumEnums: 1,
|
|
NumMessages: 3,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_shared_proto_goTypes,
|
|
DependencyIndexes: file_shared_proto_depIdxs,
|
|
EnumInfos: file_shared_proto_enumTypes,
|
|
MessageInfos: file_shared_proto_msgTypes,
|
|
}.Build()
|
|
File_shared_proto = out.File
|
|
file_shared_proto_rawDesc = nil
|
|
file_shared_proto_goTypes = nil
|
|
file_shared_proto_depIdxs = nil
|
|
}
|