File
Blob: spec/protocol/kv.pb.go
| 1 | // Code generated by protoc-gen-go. DO NOT EDIT. |
| 2 | // versions: |
| 3 | // protoc-gen-go v1.36.11 |
| 4 | // protoc v7.34.0 |
| 5 | // source: spec/proto/kv.proto |
| 6 | |
| 7 | package protocol |
| 8 | |
| 9 | import ( |
| 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 11 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 12 | durationpb "google.golang.org/protobuf/types/known/durationpb" |
| 13 | reflect "reflect" |
| 14 | sync "sync" |
| 15 | unsafe "unsafe" |
| 16 | ) |
| 17 | |
| 18 | const ( |
| 19 | // Verify that this generated code is sufficiently up-to-date. |
| 20 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 21 | // Verify that runtime/protoimpl is sufficiently up-to-date. |
| 22 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 23 | ) |
| 24 | |
| 25 | type KeyComposite_Type int32 |
| 26 | |
| 27 | const ( |
| 28 | KeyComposite_UNKNOWN KeyComposite_Type = 0 |
| 29 | KeyComposite_SIMPLE KeyComposite_Type = 1 |
| 30 | KeyComposite_PREFIX KeyComposite_Type = 2 |
| 31 | KeyComposite_LEASE KeyComposite_Type = 3 |
| 32 | ) |
| 33 | |
| 34 | // Enum value maps for KeyComposite_Type. |
| 35 | var ( |
| 36 | KeyComposite_Type_name = map[int32]string{ |
| 37 | 0: "UNKNOWN", |
| 38 | 1: "SIMPLE", |
| 39 | 2: "PREFIX", |
| 40 | 3: "LEASE", |
| 41 | } |
| 42 | KeyComposite_Type_value = map[string]int32{ |
| 43 | "UNKNOWN": 0, |
| 44 | "SIMPLE": 1, |
| 45 | "PREFIX": 2, |
| 46 | "LEASE": 3, |
| 47 | } |
| 48 | ) |
| 49 | |
| 50 | func (x KeyComposite_Type) Enum() *KeyComposite_Type { |
| 51 | p := new(KeyComposite_Type) |
| 52 | *p = x |
| 53 | return p |
| 54 | } |
| 55 | |
| 56 | func (x KeyComposite_Type) String() string { |
| 57 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| 58 | } |
| 59 | |
| 60 | func (KeyComposite_Type) Descriptor() protoreflect.EnumDescriptor { |
| 61 | return file_spec_proto_kv_proto_enumTypes[0].Descriptor() |
| 62 | } |
| 63 | |
| 64 | func (KeyComposite_Type) Type() protoreflect.EnumType { |
| 65 | return &file_spec_proto_kv_proto_enumTypes[0] |
| 66 | } |
| 67 | |
| 68 | func (x KeyComposite_Type) Number() protoreflect.EnumNumber { |
| 69 | return protoreflect.EnumNumber(x) |
| 70 | } |
| 71 | |
| 72 | // Deprecated: Use KeyComposite_Type.Descriptor instead. |
| 73 | func (KeyComposite_Type) EnumDescriptor() ([]byte, []int) { |
| 74 | return file_spec_proto_kv_proto_rawDescGZIP(), []int{10, 0} |
| 75 | } |
| 76 | |
| 77 | type SimpleRequest struct { |
| 78 | state protoimpl.MessageState `protogen:"open.v1"` |
| 79 | Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` |
| 80 | Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` |
| 81 | unknownFields protoimpl.UnknownFields |
| 82 | sizeCache protoimpl.SizeCache |
| 83 | } |
| 84 | |
| 85 | func (x *SimpleRequest) Reset() { |
| 86 | *x = SimpleRequest{} |
| 87 | mi := &file_spec_proto_kv_proto_msgTypes[0] |
| 88 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 89 | ms.StoreMessageInfo(mi) |
| 90 | } |
| 91 | |
| 92 | func (x *SimpleRequest) String() string { |
| 93 | return protoimpl.X.MessageStringOf(x) |
| 94 | } |
| 95 | |
| 96 | func (*SimpleRequest) ProtoMessage() {} |
| 97 | |
| 98 | func (x *SimpleRequest) ProtoReflect() protoreflect.Message { |
| 99 | mi := &file_spec_proto_kv_proto_msgTypes[0] |
| 100 | if x != nil { |
| 101 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 102 | if ms.LoadMessageInfo() == nil { |
| 103 | ms.StoreMessageInfo(mi) |
| 104 | } |
| 105 | return ms |
| 106 | } |
| 107 | return mi.MessageOf(x) |
| 108 | } |
| 109 | |
| 110 | // Deprecated: Use SimpleRequest.ProtoReflect.Descriptor instead. |
| 111 | func (*SimpleRequest) Descriptor() ([]byte, []int) { |
| 112 | return file_spec_proto_kv_proto_rawDescGZIP(), []int{0} |
| 113 | } |
| 114 | |
| 115 | func (x *SimpleRequest) GetKey() []byte { |
| 116 | if x != nil { |
| 117 | return x.Key |
| 118 | } |
| 119 | return nil |
| 120 | } |
| 121 | |
| 122 | func (x *SimpleRequest) GetValue() []byte { |
| 123 | if x != nil { |
| 124 | return x.Value |
| 125 | } |
| 126 | return nil |
| 127 | } |
| 128 | |
| 129 | type SimpleResponse struct { |
| 130 | state protoimpl.MessageState `protogen:"open.v1"` |
| 131 | Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` |
| 132 | unknownFields protoimpl.UnknownFields |
| 133 | sizeCache protoimpl.SizeCache |
| 134 | } |
| 135 | |
| 136 | func (x *SimpleResponse) Reset() { |
| 137 | *x = SimpleResponse{} |
| 138 | mi := &file_spec_proto_kv_proto_msgTypes[1] |
| 139 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 140 | ms.StoreMessageInfo(mi) |
| 141 | } |
| 142 | |
| 143 | func (x *SimpleResponse) String() string { |
| 144 | return protoimpl.X.MessageStringOf(x) |
| 145 | } |
| 146 | |
| 147 | func (*SimpleResponse) ProtoMessage() {} |
| 148 | |
| 149 | func (x *SimpleResponse) ProtoReflect() protoreflect.Message { |
| 150 | mi := &file_spec_proto_kv_proto_msgTypes[1] |
| 151 | if x != nil { |
| 152 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 153 | if ms.LoadMessageInfo() == nil { |
| 154 | ms.StoreMessageInfo(mi) |
| 155 | } |
| 156 | return ms |
| 157 | } |
| 158 | return mi.MessageOf(x) |
| 159 | } |
| 160 | |
| 161 | // Deprecated: Use SimpleResponse.ProtoReflect.Descriptor instead. |
| 162 | func (*SimpleResponse) Descriptor() ([]byte, []int) { |
| 163 | return file_spec_proto_kv_proto_rawDescGZIP(), []int{1} |
| 164 | } |
| 165 | |
| 166 | func (x *SimpleResponse) GetValue() []byte { |
| 167 | if x != nil { |
| 168 | return x.Value |
| 169 | } |
| 170 | return nil |
| 171 | } |
| 172 | |
| 173 | type PrefixRequest struct { |
| 174 | state protoimpl.MessageState `protogen:"open.v1"` |
| 175 | Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` |
| 176 | Child []byte `protobuf:"bytes,2,opt,name=child,proto3" json:"child,omitempty"` |
| 177 | unknownFields protoimpl.UnknownFields |
| 178 | sizeCache protoimpl.SizeCache |
| 179 | } |
| 180 | |
| 181 | func (x *PrefixRequest) Reset() { |
| 182 | *x = PrefixRequest{} |
| 183 | mi := &file_spec_proto_kv_proto_msgTypes[2] |
| 184 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 185 | ms.StoreMessageInfo(mi) |
| 186 | } |
| 187 | |
| 188 | func (x *PrefixRequest) String() string { |
| 189 | return protoimpl.X.MessageStringOf(x) |
| 190 | } |
| 191 | |
| 192 | func (*PrefixRequest) ProtoMessage() {} |
| 193 | |
| 194 | func (x *PrefixRequest) ProtoReflect() protoreflect.Message { |
| 195 | mi := &file_spec_proto_kv_proto_msgTypes[2] |
| 196 | if x != nil { |
| 197 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 198 | if ms.LoadMessageInfo() == nil { |
| 199 | ms.StoreMessageInfo(mi) |
| 200 | } |
| 201 | return ms |
| 202 | } |
| 203 | return mi.MessageOf(x) |
| 204 | } |
| 205 | |
| 206 | // Deprecated: Use PrefixRequest.ProtoReflect.Descriptor instead. |
| 207 | func (*PrefixRequest) Descriptor() ([]byte, []int) { |
| 208 | return file_spec_proto_kv_proto_rawDescGZIP(), []int{2} |
| 209 | } |
| 210 | |
| 211 | func (x *PrefixRequest) GetPrefix() []byte { |
| 212 | if x != nil { |
| 213 | return x.Prefix |
| 214 | } |
| 215 | return nil |
| 216 | } |
| 217 | |
| 218 | func (x *PrefixRequest) GetChild() []byte { |
| 219 | if x != nil { |
| 220 | return x.Child |
| 221 | } |
| 222 | return nil |
| 223 | } |
| 224 | |
| 225 | type PrefixResponse struct { |
| 226 | state protoimpl.MessageState `protogen:"open.v1"` |
| 227 | Children [][]byte `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` |
| 228 | Exists bool `protobuf:"varint,2,opt,name=exists,proto3" json:"exists,omitempty"` |
| 229 | unknownFields protoimpl.UnknownFields |
| 230 | sizeCache protoimpl.SizeCache |
| 231 | } |
| 232 | |
| 233 | func (x *PrefixResponse) Reset() { |
| 234 | *x = PrefixResponse{} |
| 235 | mi := &file_spec_proto_kv_proto_msgTypes[3] |
| 236 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 237 | ms.StoreMessageInfo(mi) |
| 238 | } |
| 239 | |
| 240 | func (x *PrefixResponse) String() string { |
| 241 | return protoimpl.X.MessageStringOf(x) |
| 242 | } |
| 243 | |
| 244 | func (*PrefixResponse) ProtoMessage() {} |
| 245 | |
| 246 | func (x *PrefixResponse) ProtoReflect() protoreflect.Message { |
| 247 | mi := &file_spec_proto_kv_proto_msgTypes[3] |
| 248 | if x != nil { |
| 249 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 250 | if ms.LoadMessageInfo() == nil { |
| 251 | ms.StoreMessageInfo(mi) |
| 252 | } |
| 253 | return ms |
| 254 | } |
| 255 | return mi.MessageOf(x) |
| 256 | } |
| 257 | |
| 258 | // Deprecated: Use PrefixResponse.ProtoReflect.Descriptor instead. |
| 259 | func (*PrefixResponse) Descriptor() ([]byte, []int) { |
| 260 | return file_spec_proto_kv_proto_rawDescGZIP(), []int{3} |
| 261 | } |
| 262 | |
| 263 | func (x *PrefixResponse) GetChildren() [][]byte { |
| 264 | if x != nil { |
| 265 | return x.Children |
| 266 | } |
| 267 | return nil |
| 268 | } |
| 269 | |
| 270 | func (x *PrefixResponse) GetExists() bool { |
| 271 | if x != nil { |
| 272 | return x.Exists |
| 273 | } |
| 274 | return false |
| 275 | } |
| 276 | |
| 277 | type LeaseRequest struct { |
| 278 | state protoimpl.MessageState `protogen:"open.v1"` |
| 279 | Lease []byte `protobuf:"bytes,1,opt,name=lease,proto3" json:"lease,omitempty"` |
| 280 | NewToken uint64 `protobuf:"varint,2,opt,name=new_token,json=newToken,proto3" json:"new_token,omitempty"` |
| 281 | PrevToken uint64 `protobuf:"varint,3,opt,name=prev_token,json=prevToken,proto3" json:"prev_token,omitempty"` |
| 282 | Ttl *durationpb.Duration `protobuf:"bytes,5,opt,name=ttl,proto3" json:"ttl,omitempty"` |
| 283 | unknownFields protoimpl.UnknownFields |
| 284 | sizeCache protoimpl.SizeCache |
| 285 | } |
| 286 | |
| 287 | func (x *LeaseRequest) Reset() { |
| 288 | *x = LeaseRequest{} |
| 289 | mi := &file_spec_proto_kv_proto_msgTypes[4] |
| 290 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 291 | ms.StoreMessageInfo(mi) |
| 292 | } |
| 293 | |
| 294 | func (x *LeaseRequest) String() string { |
| 295 | return protoimpl.X.MessageStringOf(x) |
| 296 | } |
| 297 | |
| 298 | func (*LeaseRequest) ProtoMessage() {} |
| 299 | |
| 300 | func (x *LeaseRequest) ProtoReflect() protoreflect.Message { |
| 301 | mi := &file_spec_proto_kv_proto_msgTypes[4] |
| 302 | if x != nil { |
| 303 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 304 | if ms.LoadMessageInfo() == nil { |
| 305 | ms.StoreMessageInfo(mi) |
| 306 | } |
| 307 | return ms |
| 308 | } |
| 309 | return mi.MessageOf(x) |
| 310 | } |
| 311 | |
| 312 | // Deprecated: Use LeaseRequest.ProtoReflect.Descriptor instead. |
| 313 | func (*LeaseRequest) Descriptor() ([]byte, []int) { |
| 314 | return file_spec_proto_kv_proto_rawDescGZIP(), []int{4} |
| 315 | } |
| 316 | |
| 317 | func (x *LeaseRequest) GetLease() []byte { |
| 318 | if x != nil { |
| 319 | return x.Lease |
| 320 | } |
| 321 | return nil |
| 322 | } |
| 323 | |
| 324 | func (x *LeaseRequest) GetNewToken() uint64 { |
| 325 | if x != nil { |
| 326 | return x.NewToken |
| 327 | } |
| 328 | return 0 |
| 329 | } |
| 330 | |
| 331 | func (x *LeaseRequest) GetPrevToken() uint64 { |
| 332 | if x != nil { |
| 333 | return x.PrevToken |
| 334 | } |
| 335 | return 0 |
| 336 | } |
| 337 | |
| 338 | func (x *LeaseRequest) GetTtl() *durationpb.Duration { |
| 339 | if x != nil { |
| 340 | return x.Ttl |
| 341 | } |
| 342 | return nil |
| 343 | } |
| 344 | |
| 345 | type LeaseResponse struct { |
| 346 | state protoimpl.MessageState `protogen:"open.v1"` |
| 347 | Token uint64 `protobuf:"varint,1,opt,name=token,proto3" json:"token,omitempty"` |
| 348 | unknownFields protoimpl.UnknownFields |
| 349 | sizeCache protoimpl.SizeCache |
| 350 | } |
| 351 | |
| 352 | func (x *LeaseResponse) Reset() { |
| 353 | *x = LeaseResponse{} |
| 354 | mi := &file_spec_proto_kv_proto_msgTypes[5] |
| 355 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 356 | ms.StoreMessageInfo(mi) |
| 357 | } |
| 358 | |
| 359 | func (x *LeaseResponse) String() string { |
| 360 | return protoimpl.X.MessageStringOf(x) |
| 361 | } |
| 362 | |
| 363 | func (*LeaseResponse) ProtoMessage() {} |
| 364 | |
| 365 | func (x *LeaseResponse) ProtoReflect() protoreflect.Message { |
| 366 | mi := &file_spec_proto_kv_proto_msgTypes[5] |
| 367 | if x != nil { |
| 368 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 369 | if ms.LoadMessageInfo() == nil { |
| 370 | ms.StoreMessageInfo(mi) |
| 371 | } |
| 372 | return ms |
| 373 | } |
| 374 | return mi.MessageOf(x) |
| 375 | } |
| 376 | |
| 377 | // Deprecated: Use LeaseResponse.ProtoReflect.Descriptor instead. |
| 378 | func (*LeaseResponse) Descriptor() ([]byte, []int) { |
| 379 | return file_spec_proto_kv_proto_rawDescGZIP(), []int{5} |
| 380 | } |
| 381 | |
| 382 | func (x *LeaseResponse) GetToken() uint64 { |
| 383 | if x != nil { |
| 384 | return x.Token |
| 385 | } |
| 386 | return 0 |
| 387 | } |
| 388 | |
| 389 | type KVTransfer struct { |
| 390 | state protoimpl.MessageState `protogen:"open.v1"` |
| 391 | // Presence distinguishes an empty simple value from no simple value, even |
| 392 | // when a prefix or lease shares the key. Keep tag 1 for legacy readers. |
| 393 | SimpleValue []byte `protobuf:"bytes,1,opt,name=simple_value,json=simpleValue,proto3,oneof" json:"simple_value,omitempty"` |
| 394 | PrefixChildren [][]byte `protobuf:"bytes,2,rep,name=prefix_children,json=prefixChildren,proto3" json:"prefix_children,omitempty"` |
| 395 | LeaseToken uint64 `protobuf:"varint,3,opt,name=lease_token,json=leaseToken,proto3" json:"lease_token,omitempty"` |
| 396 | unknownFields protoimpl.UnknownFields |
| 397 | sizeCache protoimpl.SizeCache |
| 398 | } |
| 399 | |
| 400 | func (x *KVTransfer) Reset() { |
| 401 | *x = KVTransfer{} |
| 402 | mi := &file_spec_proto_kv_proto_msgTypes[6] |
| 403 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 404 | ms.StoreMessageInfo(mi) |
| 405 | } |
| 406 | |
| 407 | func (x *KVTransfer) String() string { |
| 408 | return protoimpl.X.MessageStringOf(x) |
| 409 | } |
| 410 | |
| 411 | func (*KVTransfer) ProtoMessage() {} |
| 412 | |
| 413 | func (x *KVTransfer) ProtoReflect() protoreflect.Message { |
| 414 | mi := &file_spec_proto_kv_proto_msgTypes[6] |
| 415 | if x != nil { |
| 416 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 417 | if ms.LoadMessageInfo() == nil { |
| 418 | ms.StoreMessageInfo(mi) |
| 419 | } |
| 420 | return ms |
| 421 | } |
| 422 | return mi.MessageOf(x) |
| 423 | } |
| 424 | |
| 425 | // Deprecated: Use KVTransfer.ProtoReflect.Descriptor instead. |
| 426 | func (*KVTransfer) Descriptor() ([]byte, []int) { |
| 427 | return file_spec_proto_kv_proto_rawDescGZIP(), []int{6} |
| 428 | } |
| 429 | |
| 430 | func (x *KVTransfer) GetSimpleValue() []byte { |
| 431 | if x != nil { |
| 432 | return x.SimpleValue |
| 433 | } |
| 434 | return nil |
| 435 | } |
| 436 | |
| 437 | func (x *KVTransfer) GetPrefixChildren() [][]byte { |
| 438 | if x != nil { |
| 439 | return x.PrefixChildren |
| 440 | } |
| 441 | return nil |
| 442 | } |
| 443 | |
| 444 | func (x *KVTransfer) GetLeaseToken() uint64 { |
| 445 | if x != nil { |
| 446 | return x.LeaseToken |
| 447 | } |
| 448 | return 0 |
| 449 | } |
| 450 | |
| 451 | type ImportRequest struct { |
| 452 | state protoimpl.MessageState `protogen:"open.v1"` |
| 453 | Keys [][]byte `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` |
| 454 | Values []*KVTransfer `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` |
| 455 | unknownFields protoimpl.UnknownFields |
| 456 | sizeCache protoimpl.SizeCache |
| 457 | } |
| 458 | |
| 459 | func (x *ImportRequest) Reset() { |
| 460 | *x = ImportRequest{} |
| 461 | mi := &file_spec_proto_kv_proto_msgTypes[7] |
| 462 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 463 | ms.StoreMessageInfo(mi) |
| 464 | } |
| 465 | |
| 466 | func (x *ImportRequest) String() string { |
| 467 | return protoimpl.X.MessageStringOf(x) |
| 468 | } |
| 469 | |
| 470 | func (*ImportRequest) ProtoMessage() {} |
| 471 | |
| 472 | func (x *ImportRequest) ProtoReflect() protoreflect.Message { |
| 473 | mi := &file_spec_proto_kv_proto_msgTypes[7] |
| 474 | if x != nil { |
| 475 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 476 | if ms.LoadMessageInfo() == nil { |
| 477 | ms.StoreMessageInfo(mi) |
| 478 | } |
| 479 | return ms |
| 480 | } |
| 481 | return mi.MessageOf(x) |
| 482 | } |
| 483 | |
| 484 | // Deprecated: Use ImportRequest.ProtoReflect.Descriptor instead. |
| 485 | func (*ImportRequest) Descriptor() ([]byte, []int) { |
| 486 | return file_spec_proto_kv_proto_rawDescGZIP(), []int{7} |
| 487 | } |
| 488 | |
| 489 | func (x *ImportRequest) GetKeys() [][]byte { |
| 490 | if x != nil { |
| 491 | return x.Keys |
| 492 | } |
| 493 | return nil |
| 494 | } |
| 495 | |
| 496 | func (x *ImportRequest) GetValues() []*KVTransfer { |
| 497 | if x != nil { |
| 498 | return x.Values |
| 499 | } |
| 500 | return nil |
| 501 | } |
| 502 | |
| 503 | type ImportResponse struct { |
| 504 | state protoimpl.MessageState `protogen:"open.v1"` |
| 505 | unknownFields protoimpl.UnknownFields |
| 506 | sizeCache protoimpl.SizeCache |
| 507 | } |
| 508 | |
| 509 | func (x *ImportResponse) Reset() { |
| 510 | *x = ImportResponse{} |
| 511 | mi := &file_spec_proto_kv_proto_msgTypes[8] |
| 512 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 513 | ms.StoreMessageInfo(mi) |
| 514 | } |
| 515 | |
| 516 | func (x *ImportResponse) String() string { |
| 517 | return protoimpl.X.MessageStringOf(x) |
| 518 | } |
| 519 | |
| 520 | func (*ImportResponse) ProtoMessage() {} |
| 521 | |
| 522 | func (x *ImportResponse) ProtoReflect() protoreflect.Message { |
| 523 | mi := &file_spec_proto_kv_proto_msgTypes[8] |
| 524 | if x != nil { |
| 525 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 526 | if ms.LoadMessageInfo() == nil { |
| 527 | ms.StoreMessageInfo(mi) |
| 528 | } |
| 529 | return ms |
| 530 | } |
| 531 | return mi.MessageOf(x) |
| 532 | } |
| 533 | |
| 534 | // Deprecated: Use ImportResponse.ProtoReflect.Descriptor instead. |
| 535 | func (*ImportResponse) Descriptor() ([]byte, []int) { |
| 536 | return file_spec_proto_kv_proto_rawDescGZIP(), []int{8} |
| 537 | } |
| 538 | |
| 539 | type ListKeysRequest struct { |
| 540 | state protoimpl.MessageState `protogen:"open.v1"` |
| 541 | Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` |
| 542 | unknownFields protoimpl.UnknownFields |
| 543 | sizeCache protoimpl.SizeCache |
| 544 | } |
| 545 | |
| 546 | func (x *ListKeysRequest) Reset() { |
| 547 | *x = ListKeysRequest{} |
| 548 | mi := &file_spec_proto_kv_proto_msgTypes[9] |
| 549 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 550 | ms.StoreMessageInfo(mi) |
| 551 | } |
| 552 | |
| 553 | func (x *ListKeysRequest) String() string { |
| 554 | return protoimpl.X.MessageStringOf(x) |
| 555 | } |
| 556 | |
| 557 | func (*ListKeysRequest) ProtoMessage() {} |
| 558 | |
| 559 | func (x *ListKeysRequest) ProtoReflect() protoreflect.Message { |
| 560 | mi := &file_spec_proto_kv_proto_msgTypes[9] |
| 561 | if x != nil { |
| 562 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 563 | if ms.LoadMessageInfo() == nil { |
| 564 | ms.StoreMessageInfo(mi) |
| 565 | } |
| 566 | return ms |
| 567 | } |
| 568 | return mi.MessageOf(x) |
| 569 | } |
| 570 | |
| 571 | // Deprecated: Use ListKeysRequest.ProtoReflect.Descriptor instead. |
| 572 | func (*ListKeysRequest) Descriptor() ([]byte, []int) { |
| 573 | return file_spec_proto_kv_proto_rawDescGZIP(), []int{9} |
| 574 | } |
| 575 | |
| 576 | func (x *ListKeysRequest) GetPrefix() []byte { |
| 577 | if x != nil { |
| 578 | return x.Prefix |
| 579 | } |
| 580 | return nil |
| 581 | } |
| 582 | |
| 583 | type KeyComposite struct { |
| 584 | state protoimpl.MessageState `protogen:"open.v1"` |
| 585 | Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` |
| 586 | Type KeyComposite_Type `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.KeyComposite_Type" json:"type,omitempty"` |
| 587 | unknownFields protoimpl.UnknownFields |
| 588 | sizeCache protoimpl.SizeCache |
| 589 | } |
| 590 | |
| 591 | func (x *KeyComposite) Reset() { |
| 592 | *x = KeyComposite{} |
| 593 | mi := &file_spec_proto_kv_proto_msgTypes[10] |
| 594 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 595 | ms.StoreMessageInfo(mi) |
| 596 | } |
| 597 | |
| 598 | func (x *KeyComposite) String() string { |
| 599 | return protoimpl.X.MessageStringOf(x) |
| 600 | } |
| 601 | |
| 602 | func (*KeyComposite) ProtoMessage() {} |
| 603 | |
| 604 | func (x *KeyComposite) ProtoReflect() protoreflect.Message { |
| 605 | mi := &file_spec_proto_kv_proto_msgTypes[10] |
| 606 | if x != nil { |
| 607 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 608 | if ms.LoadMessageInfo() == nil { |
| 609 | ms.StoreMessageInfo(mi) |
| 610 | } |
| 611 | return ms |
| 612 | } |
| 613 | return mi.MessageOf(x) |
| 614 | } |
| 615 | |
| 616 | // Deprecated: Use KeyComposite.ProtoReflect.Descriptor instead. |
| 617 | func (*KeyComposite) Descriptor() ([]byte, []int) { |
| 618 | return file_spec_proto_kv_proto_rawDescGZIP(), []int{10} |
| 619 | } |
| 620 | |
| 621 | func (x *KeyComposite) GetKey() []byte { |
| 622 | if x != nil { |
| 623 | return x.Key |
| 624 | } |
| 625 | return nil |
| 626 | } |
| 627 | |
| 628 | func (x *KeyComposite) GetType() KeyComposite_Type { |
| 629 | if x != nil { |
| 630 | return x.Type |
| 631 | } |
| 632 | return KeyComposite_UNKNOWN |
| 633 | } |
| 634 | |
| 635 | type ListKeysResponse struct { |
| 636 | state protoimpl.MessageState `protogen:"open.v1"` |
| 637 | Keys []*KeyComposite `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` |
| 638 | unknownFields protoimpl.UnknownFields |
| 639 | sizeCache protoimpl.SizeCache |
| 640 | } |
| 641 | |
| 642 | func (x *ListKeysResponse) Reset() { |
| 643 | *x = ListKeysResponse{} |
| 644 | mi := &file_spec_proto_kv_proto_msgTypes[11] |
| 645 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 646 | ms.StoreMessageInfo(mi) |
| 647 | } |
| 648 | |
| 649 | func (x *ListKeysResponse) String() string { |
| 650 | return protoimpl.X.MessageStringOf(x) |
| 651 | } |
| 652 | |
| 653 | func (*ListKeysResponse) ProtoMessage() {} |
| 654 | |
| 655 | func (x *ListKeysResponse) ProtoReflect() protoreflect.Message { |
| 656 | mi := &file_spec_proto_kv_proto_msgTypes[11] |
| 657 | if x != nil { |
| 658 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 659 | if ms.LoadMessageInfo() == nil { |
| 660 | ms.StoreMessageInfo(mi) |
| 661 | } |
| 662 | return ms |
| 663 | } |
| 664 | return mi.MessageOf(x) |
| 665 | } |
| 666 | |
| 667 | // Deprecated: Use ListKeysResponse.ProtoReflect.Descriptor instead. |
| 668 | func (*ListKeysResponse) Descriptor() ([]byte, []int) { |
| 669 | return file_spec_proto_kv_proto_rawDescGZIP(), []int{11} |
| 670 | } |
| 671 | |
| 672 | func (x *ListKeysResponse) GetKeys() []*KeyComposite { |
| 673 | if x != nil { |
| 674 | return x.Keys |
| 675 | } |
| 676 | return nil |
| 677 | } |
| 678 | |
| 679 | var File_spec_proto_kv_proto protoreflect.FileDescriptor |
| 680 | |
| 681 | const file_spec_proto_kv_proto_rawDesc = "" + |
| 682 | "\n" + |
| 683 | "\x13spec/proto/kv.proto\x12\bprotocol\x1a\x1egoogle/protobuf/duration.proto\"7\n" + |
| 684 | "\rSimpleRequest\x12\x10\n" + |
| 685 | "\x03key\x18\x01 \x01(\fR\x03key\x12\x14\n" + |
| 686 | "\x05value\x18\x02 \x01(\fR\x05value\"&\n" + |
| 687 | "\x0eSimpleResponse\x12\x14\n" + |
| 688 | "\x05value\x18\x01 \x01(\fR\x05value\"=\n" + |
| 689 | "\rPrefixRequest\x12\x16\n" + |
| 690 | "\x06prefix\x18\x01 \x01(\fR\x06prefix\x12\x14\n" + |
| 691 | "\x05child\x18\x02 \x01(\fR\x05child\"D\n" + |
| 692 | "\x0ePrefixResponse\x12\x1a\n" + |
| 693 | "\bchildren\x18\x01 \x03(\fR\bchildren\x12\x16\n" + |
| 694 | "\x06exists\x18\x02 \x01(\bR\x06exists\"\x8d\x01\n" + |
| 695 | "\fLeaseRequest\x12\x14\n" + |
| 696 | "\x05lease\x18\x01 \x01(\fR\x05lease\x12\x1b\n" + |
| 697 | "\tnew_token\x18\x02 \x01(\x04R\bnewToken\x12\x1d\n" + |
| 698 | "\n" + |
| 699 | "prev_token\x18\x03 \x01(\x04R\tprevToken\x12+\n" + |
| 700 | "\x03ttl\x18\x05 \x01(\v2\x19.google.protobuf.DurationR\x03ttl\"%\n" + |
| 701 | "\rLeaseResponse\x12\x14\n" + |
| 702 | "\x05token\x18\x01 \x01(\x04R\x05token\"\x8f\x01\n" + |
| 703 | "\n" + |
| 704 | "KVTransfer\x12&\n" + |
| 705 | "\fsimple_value\x18\x01 \x01(\fH\x00R\vsimpleValue\x88\x01\x01\x12'\n" + |
| 706 | "\x0fprefix_children\x18\x02 \x03(\fR\x0eprefixChildren\x12\x1f\n" + |
| 707 | "\vlease_token\x18\x03 \x01(\x04R\n" + |
| 708 | "leaseTokenB\x0f\n" + |
| 709 | "\r_simple_value\"Q\n" + |
| 710 | "\rImportRequest\x12\x12\n" + |
| 711 | "\x04keys\x18\x01 \x03(\fR\x04keys\x12,\n" + |
| 712 | "\x06values\x18\x02 \x03(\v2\x14.protocol.KVTransferR\x06values\"\x10\n" + |
| 713 | "\x0eImportResponse\")\n" + |
| 714 | "\x0fListKeysRequest\x12\x16\n" + |
| 715 | "\x06prefix\x18\x01 \x01(\fR\x06prefix\"\x89\x01\n" + |
| 716 | "\fKeyComposite\x12\x10\n" + |
| 717 | "\x03key\x18\x01 \x01(\fR\x03key\x12/\n" + |
| 718 | "\x04type\x18\x02 \x01(\x0e2\x1b.protocol.KeyComposite.TypeR\x04type\"6\n" + |
| 719 | "\x04Type\x12\v\n" + |
| 720 | "\aUNKNOWN\x10\x00\x12\n" + |
| 721 | "\n" + |
| 722 | "\x06SIMPLE\x10\x01\x12\n" + |
| 723 | "\n" + |
| 724 | "\x06PREFIX\x10\x02\x12\t\n" + |
| 725 | "\x05LEASE\x10\x03\">\n" + |
| 726 | "\x10ListKeysResponse\x12*\n" + |
| 727 | "\x04keys\x18\x01 \x03(\v2\x16.protocol.KeyCompositeR\x04keys2\xe2\x05\n" + |
| 728 | "\tKVService\x128\n" + |
| 729 | "\x03Put\x12\x17.protocol.SimpleRequest\x1a\x18.protocol.SimpleResponse\x128\n" + |
| 730 | "\x03Get\x12\x17.protocol.SimpleRequest\x1a\x18.protocol.SimpleResponse\x12;\n" + |
| 731 | "\x06Delete\x12\x17.protocol.SimpleRequest\x1a\x18.protocol.SimpleResponse\x12;\n" + |
| 732 | "\x06Append\x12\x17.protocol.PrefixRequest\x1a\x18.protocol.PrefixResponse\x129\n" + |
| 733 | "\x04List\x12\x17.protocol.PrefixRequest\x1a\x18.protocol.PrefixResponse\x12=\n" + |
| 734 | "\bContains\x12\x17.protocol.PrefixRequest\x1a\x18.protocol.PrefixResponse\x12;\n" + |
| 735 | "\x06Remove\x12\x17.protocol.PrefixRequest\x1a\x18.protocol.PrefixResponse\x12:\n" + |
| 736 | "\aAcquire\x12\x16.protocol.LeaseRequest\x1a\x17.protocol.LeaseResponse\x128\n" + |
| 737 | "\x05Renew\x12\x16.protocol.LeaseRequest\x1a\x17.protocol.LeaseResponse\x12:\n" + |
| 738 | "\aRelease\x12\x16.protocol.LeaseRequest\x1a\x17.protocol.LeaseResponse\x12;\n" + |
| 739 | "\x06Import\x12\x17.protocol.ImportRequest\x1a\x18.protocol.ImportResponse\x12A\n" + |
| 740 | "\bListKeys\x12\x19.protocol.ListKeysRequest\x1a\x1a.protocol.ListKeysResponseB+H\x01Z'go.miragespace.co/specter/spec/protocolb\x06proto3" |
| 741 | |
| 742 | var ( |
| 743 | file_spec_proto_kv_proto_rawDescOnce sync.Once |
| 744 | file_spec_proto_kv_proto_rawDescData []byte |
| 745 | ) |
| 746 | |
| 747 | func file_spec_proto_kv_proto_rawDescGZIP() []byte { |
| 748 | file_spec_proto_kv_proto_rawDescOnce.Do(func() { |
| 749 | file_spec_proto_kv_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_spec_proto_kv_proto_rawDesc), len(file_spec_proto_kv_proto_rawDesc))) |
| 750 | }) |
| 751 | return file_spec_proto_kv_proto_rawDescData |
| 752 | } |
| 753 | |
| 754 | var file_spec_proto_kv_proto_enumTypes = make([]protoimpl.EnumInfo, 1) |
| 755 | var file_spec_proto_kv_proto_msgTypes = make([]protoimpl.MessageInfo, 12) |
| 756 | var file_spec_proto_kv_proto_goTypes = []any{ |
| 757 | (KeyComposite_Type)(0), // 0: protocol.KeyComposite.Type |
| 758 | (*SimpleRequest)(nil), // 1: protocol.SimpleRequest |
| 759 | (*SimpleResponse)(nil), // 2: protocol.SimpleResponse |
| 760 | (*PrefixRequest)(nil), // 3: protocol.PrefixRequest |
| 761 | (*PrefixResponse)(nil), // 4: protocol.PrefixResponse |
| 762 | (*LeaseRequest)(nil), // 5: protocol.LeaseRequest |
| 763 | (*LeaseResponse)(nil), // 6: protocol.LeaseResponse |
| 764 | (*KVTransfer)(nil), // 7: protocol.KVTransfer |
| 765 | (*ImportRequest)(nil), // 8: protocol.ImportRequest |
| 766 | (*ImportResponse)(nil), // 9: protocol.ImportResponse |
| 767 | (*ListKeysRequest)(nil), // 10: protocol.ListKeysRequest |
| 768 | (*KeyComposite)(nil), // 11: protocol.KeyComposite |
| 769 | (*ListKeysResponse)(nil), // 12: protocol.ListKeysResponse |
| 770 | (*durationpb.Duration)(nil), // 13: google.protobuf.Duration |
| 771 | } |
| 772 | var file_spec_proto_kv_proto_depIdxs = []int32{ |
| 773 | 13, // 0: protocol.LeaseRequest.ttl:type_name -> google.protobuf.Duration |
| 774 | 7, // 1: protocol.ImportRequest.values:type_name -> protocol.KVTransfer |
| 775 | 0, // 2: protocol.KeyComposite.type:type_name -> protocol.KeyComposite.Type |
| 776 | 11, // 3: protocol.ListKeysResponse.keys:type_name -> protocol.KeyComposite |
| 777 | 1, // 4: protocol.KVService.Put:input_type -> protocol.SimpleRequest |
| 778 | 1, // 5: protocol.KVService.Get:input_type -> protocol.SimpleRequest |
| 779 | 1, // 6: protocol.KVService.Delete:input_type -> protocol.SimpleRequest |
| 780 | 3, // 7: protocol.KVService.Append:input_type -> protocol.PrefixRequest |
| 781 | 3, // 8: protocol.KVService.List:input_type -> protocol.PrefixRequest |
| 782 | 3, // 9: protocol.KVService.Contains:input_type -> protocol.PrefixRequest |
| 783 | 3, // 10: protocol.KVService.Remove:input_type -> protocol.PrefixRequest |
| 784 | 5, // 11: protocol.KVService.Acquire:input_type -> protocol.LeaseRequest |
| 785 | 5, // 12: protocol.KVService.Renew:input_type -> protocol.LeaseRequest |
| 786 | 5, // 13: protocol.KVService.Release:input_type -> protocol.LeaseRequest |
| 787 | 8, // 14: protocol.KVService.Import:input_type -> protocol.ImportRequest |
| 788 | 10, // 15: protocol.KVService.ListKeys:input_type -> protocol.ListKeysRequest |
| 789 | 2, // 16: protocol.KVService.Put:output_type -> protocol.SimpleResponse |
| 790 | 2, // 17: protocol.KVService.Get:output_type -> protocol.SimpleResponse |
| 791 | 2, // 18: protocol.KVService.Delete:output_type -> protocol.SimpleResponse |
| 792 | 4, // 19: protocol.KVService.Append:output_type -> protocol.PrefixResponse |
| 793 | 4, // 20: protocol.KVService.List:output_type -> protocol.PrefixResponse |
| 794 | 4, // 21: protocol.KVService.Contains:output_type -> protocol.PrefixResponse |
| 795 | 4, // 22: protocol.KVService.Remove:output_type -> protocol.PrefixResponse |
| 796 | 6, // 23: protocol.KVService.Acquire:output_type -> protocol.LeaseResponse |
| 797 | 6, // 24: protocol.KVService.Renew:output_type -> protocol.LeaseResponse |
| 798 | 6, // 25: protocol.KVService.Release:output_type -> protocol.LeaseResponse |
| 799 | 9, // 26: protocol.KVService.Import:output_type -> protocol.ImportResponse |
| 800 | 12, // 27: protocol.KVService.ListKeys:output_type -> protocol.ListKeysResponse |
| 801 | 16, // [16:28] is the sub-list for method output_type |
| 802 | 4, // [4:16] is the sub-list for method input_type |
| 803 | 4, // [4:4] is the sub-list for extension type_name |
| 804 | 4, // [4:4] is the sub-list for extension extendee |
| 805 | 0, // [0:4] is the sub-list for field type_name |
| 806 | } |
| 807 | |
| 808 | func init() { file_spec_proto_kv_proto_init() } |
| 809 | func file_spec_proto_kv_proto_init() { |
| 810 | if File_spec_proto_kv_proto != nil { |
| 811 | return |
| 812 | } |
| 813 | file_spec_proto_kv_proto_msgTypes[6].OneofWrappers = []any{} |
| 814 | type x struct{} |
| 815 | out := protoimpl.TypeBuilder{ |
| 816 | File: protoimpl.DescBuilder{ |
| 817 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 818 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_spec_proto_kv_proto_rawDesc), len(file_spec_proto_kv_proto_rawDesc)), |
| 819 | NumEnums: 1, |
| 820 | NumMessages: 12, |
| 821 | NumExtensions: 0, |
| 822 | NumServices: 1, |
| 823 | }, |
| 824 | GoTypes: file_spec_proto_kv_proto_goTypes, |
| 825 | DependencyIndexes: file_spec_proto_kv_proto_depIdxs, |
| 826 | EnumInfos: file_spec_proto_kv_proto_enumTypes, |
| 827 | MessageInfos: file_spec_proto_kv_proto_msgTypes, |
| 828 | }.Build() |
| 829 | File_spec_proto_kv_proto = out.File |
| 830 | file_spec_proto_kv_proto_goTypes = nil |
| 831 | file_spec_proto_kv_proto_depIdxs = nil |
| 832 | } |