github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/synchronization/rsync/engine.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.33.0 4 // protoc v5.26.1 5 // source: synchronization/rsync/engine.proto 6 7 package rsync 8 9 import ( 10 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 12 reflect "reflect" 13 sync "sync" 14 ) 15 16 const ( 17 // Verify that this generated code is sufficiently up-to-date. 18 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 19 // Verify that runtime/protoimpl is sufficiently up-to-date. 20 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 21 ) 22 23 // BlockHash represents a pair of weak and strong hash for a base block. 24 type BlockHash struct { 25 state protoimpl.MessageState 26 sizeCache protoimpl.SizeCache 27 unknownFields protoimpl.UnknownFields 28 29 // Weak is the weak hash for the block. 30 Weak uint32 `protobuf:"varint,1,opt,name=weak,proto3" json:"weak,omitempty"` 31 // Strong is the strong hash for the block. 32 Strong []byte `protobuf:"bytes,2,opt,name=strong,proto3" json:"strong,omitempty"` 33 } 34 35 func (x *BlockHash) Reset() { 36 *x = BlockHash{} 37 if protoimpl.UnsafeEnabled { 38 mi := &file_synchronization_rsync_engine_proto_msgTypes[0] 39 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 40 ms.StoreMessageInfo(mi) 41 } 42 } 43 44 func (x *BlockHash) String() string { 45 return protoimpl.X.MessageStringOf(x) 46 } 47 48 func (*BlockHash) ProtoMessage() {} 49 50 func (x *BlockHash) ProtoReflect() protoreflect.Message { 51 mi := &file_synchronization_rsync_engine_proto_msgTypes[0] 52 if protoimpl.UnsafeEnabled && x != nil { 53 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 54 if ms.LoadMessageInfo() == nil { 55 ms.StoreMessageInfo(mi) 56 } 57 return ms 58 } 59 return mi.MessageOf(x) 60 } 61 62 // Deprecated: Use BlockHash.ProtoReflect.Descriptor instead. 63 func (*BlockHash) Descriptor() ([]byte, []int) { 64 return file_synchronization_rsync_engine_proto_rawDescGZIP(), []int{0} 65 } 66 67 func (x *BlockHash) GetWeak() uint32 { 68 if x != nil { 69 return x.Weak 70 } 71 return 0 72 } 73 74 func (x *BlockHash) GetStrong() []byte { 75 if x != nil { 76 return x.Strong 77 } 78 return nil 79 } 80 81 // Signature represents an rsync base signature. It encodes the block size used 82 // to generate the signature, the size of the last block in the signature (which 83 // may be smaller than a full block), and the hashes for the blocks of the file. 84 type Signature struct { 85 state protoimpl.MessageState 86 sizeCache protoimpl.SizeCache 87 unknownFields protoimpl.UnknownFields 88 89 // BlockSize is the block size used to compute the signature. 90 BlockSize uint64 `protobuf:"varint,1,opt,name=blockSize,proto3" json:"blockSize,omitempty"` 91 // LastBlockSize is the size of the last block in the signature. 92 LastBlockSize uint64 `protobuf:"varint,2,opt,name=lastBlockSize,proto3" json:"lastBlockSize,omitempty"` 93 // Hashes are the hashes of the blocks in the base. 94 Hashes []*BlockHash `protobuf:"bytes,3,rep,name=hashes,proto3" json:"hashes,omitempty"` 95 } 96 97 func (x *Signature) Reset() { 98 *x = Signature{} 99 if protoimpl.UnsafeEnabled { 100 mi := &file_synchronization_rsync_engine_proto_msgTypes[1] 101 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 102 ms.StoreMessageInfo(mi) 103 } 104 } 105 106 func (x *Signature) String() string { 107 return protoimpl.X.MessageStringOf(x) 108 } 109 110 func (*Signature) ProtoMessage() {} 111 112 func (x *Signature) ProtoReflect() protoreflect.Message { 113 mi := &file_synchronization_rsync_engine_proto_msgTypes[1] 114 if protoimpl.UnsafeEnabled && x != nil { 115 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 116 if ms.LoadMessageInfo() == nil { 117 ms.StoreMessageInfo(mi) 118 } 119 return ms 120 } 121 return mi.MessageOf(x) 122 } 123 124 // Deprecated: Use Signature.ProtoReflect.Descriptor instead. 125 func (*Signature) Descriptor() ([]byte, []int) { 126 return file_synchronization_rsync_engine_proto_rawDescGZIP(), []int{1} 127 } 128 129 func (x *Signature) GetBlockSize() uint64 { 130 if x != nil { 131 return x.BlockSize 132 } 133 return 0 134 } 135 136 func (x *Signature) GetLastBlockSize() uint64 { 137 if x != nil { 138 return x.LastBlockSize 139 } 140 return 0 141 } 142 143 func (x *Signature) GetHashes() []*BlockHash { 144 if x != nil { 145 return x.Hashes 146 } 147 return nil 148 } 149 150 // Operation represents an rsync operation, which can be either a data operation 151 // or a block operation. 152 type Operation struct { 153 state protoimpl.MessageState 154 sizeCache protoimpl.SizeCache 155 unknownFields protoimpl.UnknownFields 156 157 // Data contains data for data operations. If its length is 0, then the 158 // operation is assumed to be a non-data operation. Operation transmitters 159 // and receivers may thus treat a length-0 buffer as semantically equivalent 160 // to a nil buffer and utilize that fact to efficiently re-use buffer 161 // capacity (e.g. by truncating the buffer but not releasing it). 162 Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` 163 // Start is the 0-indexed starting block for block operations. 164 Start uint64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` 165 // Count is the number of blocks for block operations. 166 Count uint64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` 167 } 168 169 func (x *Operation) Reset() { 170 *x = Operation{} 171 if protoimpl.UnsafeEnabled { 172 mi := &file_synchronization_rsync_engine_proto_msgTypes[2] 173 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 174 ms.StoreMessageInfo(mi) 175 } 176 } 177 178 func (x *Operation) String() string { 179 return protoimpl.X.MessageStringOf(x) 180 } 181 182 func (*Operation) ProtoMessage() {} 183 184 func (x *Operation) ProtoReflect() protoreflect.Message { 185 mi := &file_synchronization_rsync_engine_proto_msgTypes[2] 186 if protoimpl.UnsafeEnabled && x != nil { 187 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 188 if ms.LoadMessageInfo() == nil { 189 ms.StoreMessageInfo(mi) 190 } 191 return ms 192 } 193 return mi.MessageOf(x) 194 } 195 196 // Deprecated: Use Operation.ProtoReflect.Descriptor instead. 197 func (*Operation) Descriptor() ([]byte, []int) { 198 return file_synchronization_rsync_engine_proto_rawDescGZIP(), []int{2} 199 } 200 201 func (x *Operation) GetData() []byte { 202 if x != nil { 203 return x.Data 204 } 205 return nil 206 } 207 208 func (x *Operation) GetStart() uint64 { 209 if x != nil { 210 return x.Start 211 } 212 return 0 213 } 214 215 func (x *Operation) GetCount() uint64 { 216 if x != nil { 217 return x.Count 218 } 219 return 0 220 } 221 222 var File_synchronization_rsync_engine_proto protoreflect.FileDescriptor 223 224 var file_synchronization_rsync_engine_proto_rawDesc = []byte{ 225 0x0a, 0x22, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 226 0x6e, 0x2f, 0x72, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x70, 227 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x72, 0x73, 0x79, 0x6e, 0x63, 0x22, 0x37, 0x0a, 0x09, 0x42, 228 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 229 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x16, 0x0a, 0x06, 230 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x74, 231 0x72, 0x6f, 0x6e, 0x67, 0x22, 0x79, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 232 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, 233 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 234 0x24, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 235 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 236 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 237 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x42, 0x6c, 238 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x52, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x22, 239 0x4b, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 240 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 241 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 242 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 243 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x39, 0x5a, 0x37, 244 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x74, 0x61, 0x67, 245 0x65, 0x6e, 0x2d, 0x69, 0x6f, 0x2f, 0x6d, 0x75, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x6b, 246 0x67, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 247 0x6e, 0x2f, 0x72, 0x73, 0x79, 0x6e, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 248 } 249 250 var ( 251 file_synchronization_rsync_engine_proto_rawDescOnce sync.Once 252 file_synchronization_rsync_engine_proto_rawDescData = file_synchronization_rsync_engine_proto_rawDesc 253 ) 254 255 func file_synchronization_rsync_engine_proto_rawDescGZIP() []byte { 256 file_synchronization_rsync_engine_proto_rawDescOnce.Do(func() { 257 file_synchronization_rsync_engine_proto_rawDescData = protoimpl.X.CompressGZIP(file_synchronization_rsync_engine_proto_rawDescData) 258 }) 259 return file_synchronization_rsync_engine_proto_rawDescData 260 } 261 262 var file_synchronization_rsync_engine_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 263 var file_synchronization_rsync_engine_proto_goTypes = []interface{}{ 264 (*BlockHash)(nil), // 0: rsync.BlockHash 265 (*Signature)(nil), // 1: rsync.Signature 266 (*Operation)(nil), // 2: rsync.Operation 267 } 268 var file_synchronization_rsync_engine_proto_depIdxs = []int32{ 269 0, // 0: rsync.Signature.hashes:type_name -> rsync.BlockHash 270 1, // [1:1] is the sub-list for method output_type 271 1, // [1:1] is the sub-list for method input_type 272 1, // [1:1] is the sub-list for extension type_name 273 1, // [1:1] is the sub-list for extension extendee 274 0, // [0:1] is the sub-list for field type_name 275 } 276 277 func init() { file_synchronization_rsync_engine_proto_init() } 278 func file_synchronization_rsync_engine_proto_init() { 279 if File_synchronization_rsync_engine_proto != nil { 280 return 281 } 282 if !protoimpl.UnsafeEnabled { 283 file_synchronization_rsync_engine_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 284 switch v := v.(*BlockHash); i { 285 case 0: 286 return &v.state 287 case 1: 288 return &v.sizeCache 289 case 2: 290 return &v.unknownFields 291 default: 292 return nil 293 } 294 } 295 file_synchronization_rsync_engine_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 296 switch v := v.(*Signature); i { 297 case 0: 298 return &v.state 299 case 1: 300 return &v.sizeCache 301 case 2: 302 return &v.unknownFields 303 default: 304 return nil 305 } 306 } 307 file_synchronization_rsync_engine_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 308 switch v := v.(*Operation); i { 309 case 0: 310 return &v.state 311 case 1: 312 return &v.sizeCache 313 case 2: 314 return &v.unknownFields 315 default: 316 return nil 317 } 318 } 319 } 320 type x struct{} 321 out := protoimpl.TypeBuilder{ 322 File: protoimpl.DescBuilder{ 323 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 324 RawDescriptor: file_synchronization_rsync_engine_proto_rawDesc, 325 NumEnums: 0, 326 NumMessages: 3, 327 NumExtensions: 0, 328 NumServices: 0, 329 }, 330 GoTypes: file_synchronization_rsync_engine_proto_goTypes, 331 DependencyIndexes: file_synchronization_rsync_engine_proto_depIdxs, 332 MessageInfos: file_synchronization_rsync_engine_proto_msgTypes, 333 }.Build() 334 File_synchronization_rsync_engine_proto = out.File 335 file_synchronization_rsync_engine_proto_rawDesc = nil 336 file_synchronization_rsync_engine_proto_goTypes = nil 337 file_synchronization_rsync_engine_proto_depIdxs = nil 338 }