github.com/git-amp/amp-sdk-go@v0.7.5/crates/crates.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: crates/crates.proto 3 4 // Contains data structures used by the client for content management and deployment 5 6 package crates 7 8 import ( 9 encoding_binary "encoding/binary" 10 fmt "fmt" 11 proto "github.com/gogo/protobuf/proto" 12 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" 13 io "io" 14 math "math" 15 math_bits "math/bits" 16 reflect "reflect" 17 strconv "strconv" 18 strings "strings" 19 ) 20 21 // Reference imports to suppress errors if they are not otherwise used. 22 var _ = proto.Marshal 23 var _ = fmt.Errorf 24 var _ = math.Inf 25 26 // This is a compile-time assertion to ensure that this generated file 27 // is compatible with the proto package it is being compiled against. 28 // A compilation error at this line likely means your copy of the 29 // proto package needs to be updated. 30 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 31 32 type AssetFlags int32 33 34 const ( 35 NoFlags AssetFlags = 0 36 IsTexture AssetFlags = 1 37 IsSprite AssetFlags = 2 38 IsMaterial AssetFlags = 4 39 IsPlaceable AssetFlags = 8 40 IsMonoCell AssetFlags = 16 41 // HasIcon means that this Asset includes an icon with the same name (and has IsIcon set), 42 HasIcon AssetFlags = 256 43 // IsPrivate means this item is not intended for general use and is not normally visible. 44 IsPrivate AssetFlags = 512 45 // IsSkybox means this is a transform containing a Skybox component. 46 IsSkybox AssetFlags = 1024 47 // AutoScale means this asset should be placed with auto scale enabled by default. 48 AutoScale AssetFlags = 2048 49 // IsSurface means this asset behaves like terrain and/or should be considered a constituent part of a scene. 50 // These objects should be opaque and have colliders attached to them 51 // e.g. a building, a terrain formation, a wall 52 IsSurface AssetFlags = 4096 53 ) 54 55 var AssetFlags_name = map[int32]string{ 56 0: "NoFlags", 57 1: "IsTexture", 58 2: "IsSprite", 59 4: "IsMaterial", 60 8: "IsPlaceable", 61 16: "IsMonoCell", 62 256: "HasIcon", 63 512: "IsPrivate", 64 1024: "IsSkybox", 65 2048: "AutoScale", 66 4096: "IsSurface", 67 } 68 69 var AssetFlags_value = map[string]int32{ 70 "NoFlags": 0, 71 "IsTexture": 1, 72 "IsSprite": 2, 73 "IsMaterial": 4, 74 "IsPlaceable": 8, 75 "IsMonoCell": 16, 76 "HasIcon": 256, 77 "IsPrivate": 512, 78 "IsSkybox": 1024, 79 "AutoScale": 2048, 80 "IsSurface": 4096, 81 } 82 83 func (AssetFlags) EnumDescriptor() ([]byte, []int) { 84 return fileDescriptor_44b18017c076fca5, []int{0} 85 } 86 87 // Enum values should be three base10 digits corresponding to the major, minor, and revision number. 88 type CrateSchema int32 89 90 const ( 91 UndefinedSchema CrateSchema = 0 92 // v100 (April 2020) should be used for CrateInfo.CrateSchema 93 v100 CrateSchema = 100 94 ) 95 96 var CrateSchema_name = map[int32]string{ 97 0: "UndefinedSchema", 98 100: "v100", 99 } 100 101 var CrateSchema_value = map[string]int32{ 102 "UndefinedSchema": 0, 103 "v100": 100, 104 } 105 106 func (CrateSchema) EnumDescriptor() ([]byte, []int) { 107 return fileDescriptor_44b18017c076fca5, []int{1} 108 } 109 110 // KVEntry is a generic entry for any key-value pair. 111 type KVEntry struct { 112 Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` 113 Value string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` 114 } 115 116 func (m *KVEntry) Reset() { *m = KVEntry{} } 117 func (*KVEntry) ProtoMessage() {} 118 func (*KVEntry) Descriptor() ([]byte, []int) { 119 return fileDescriptor_44b18017c076fca5, []int{0} 120 } 121 func (m *KVEntry) XXX_Unmarshal(b []byte) error { 122 return m.Unmarshal(b) 123 } 124 func (m *KVEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 125 if deterministic { 126 return xxx_messageInfo_KVEntry.Marshal(b, m, deterministic) 127 } else { 128 b = b[:cap(b)] 129 n, err := m.MarshalToSizedBuffer(b) 130 if err != nil { 131 return nil, err 132 } 133 return b[:n], nil 134 } 135 } 136 func (m *KVEntry) XXX_Merge(src proto.Message) { 137 xxx_messageInfo_KVEntry.Merge(m, src) 138 } 139 func (m *KVEntry) XXX_Size() int { 140 return m.Size() 141 } 142 func (m *KVEntry) XXX_DiscardUnknown() { 143 xxx_messageInfo_KVEntry.DiscardUnknown(m) 144 } 145 146 var xxx_messageInfo_KVEntry proto.InternalMessageInfo 147 148 func (m *KVEntry) GetKey() string { 149 if m != nil { 150 return m.Key 151 } 152 return "" 153 } 154 155 func (m *KVEntry) GetValue() string { 156 if m != nil { 157 return m.Value 158 } 159 return "" 160 } 161 162 type AppVars struct { 163 // AppDomain is the domain name used for primary queries (e.g. "arcspace.systems") 164 AppDomain string `protobuf:"bytes,2,opt,name=AppDomain,proto3" json:"AppDomain,omitempty"` 165 // AppDesc succinctly describes this org and is for humans. 166 AppDesc string `protobuf:"bytes,4,opt,name=AppDesc,proto3" json:"AppDesc,omitempty"` 167 // OrgHomeURL is the home link for this org (e.g. "https://blockcities.com") 168 OrgHomeURL string `protobuf:"bytes,6,opt,name=OrgHomeURL,proto3" json:"OrgHomeURL,omitempty"` 169 // AppHomeURL points to the home URL for the app 170 AppHomeURL string `protobuf:"bytes,12,opt,name=AppHomeURL,proto3" json:"AppHomeURL,omitempty"` 171 // CratesSnapshotURL specifies where to load this org's CratesSnapshot 172 CratesSnapshotURL string `protobuf:"bytes,14,opt,name=CratesSnapshotURL,proto3" json:"CratesSnapshotURL,omitempty"` 173 // AppDownloadURLs are a download URL for a given platform. 174 // A key of "" denotes an unknown platform 175 AppDownloadURLs map[string]string `protobuf:"bytes,16,rep,name=AppDownloadURLs,proto3" json:"AppDownloadURLs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 176 // URLSchemes declare URL schemes for this app's custom URL scheme (e.g. "arcspace://") 177 // The first entry is the primary scheme and the rest are alternately recognized schemes. 178 // URL schemas should always end with "://" 179 URLSchemes []string `protobuf:"bytes,18,rep,name=URLSchemes,proto3" json:"URLSchemes,omitempty"` 180 // Overrides default settings 181 Settings map[string]string `protobuf:"bytes,20,rep,name=Settings,proto3" json:"Settings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 182 // Links is a list of channel URIs for easy access. 183 Links []*KVEntry `protobuf:"bytes,40,rep,name=Links,proto3" json:"Links,omitempty"` 184 } 185 186 func (m *AppVars) Reset() { *m = AppVars{} } 187 func (*AppVars) ProtoMessage() {} 188 func (*AppVars) Descriptor() ([]byte, []int) { 189 return fileDescriptor_44b18017c076fca5, []int{1} 190 } 191 func (m *AppVars) XXX_Unmarshal(b []byte) error { 192 return m.Unmarshal(b) 193 } 194 func (m *AppVars) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 195 if deterministic { 196 return xxx_messageInfo_AppVars.Marshal(b, m, deterministic) 197 } else { 198 b = b[:cap(b)] 199 n, err := m.MarshalToSizedBuffer(b) 200 if err != nil { 201 return nil, err 202 } 203 return b[:n], nil 204 } 205 } 206 func (m *AppVars) XXX_Merge(src proto.Message) { 207 xxx_messageInfo_AppVars.Merge(m, src) 208 } 209 func (m *AppVars) XXX_Size() int { 210 return m.Size() 211 } 212 func (m *AppVars) XXX_DiscardUnknown() { 213 xxx_messageInfo_AppVars.DiscardUnknown(m) 214 } 215 216 var xxx_messageInfo_AppVars proto.InternalMessageInfo 217 218 func (m *AppVars) GetAppDomain() string { 219 if m != nil { 220 return m.AppDomain 221 } 222 return "" 223 } 224 225 func (m *AppVars) GetAppDesc() string { 226 if m != nil { 227 return m.AppDesc 228 } 229 return "" 230 } 231 232 func (m *AppVars) GetOrgHomeURL() string { 233 if m != nil { 234 return m.OrgHomeURL 235 } 236 return "" 237 } 238 239 func (m *AppVars) GetAppHomeURL() string { 240 if m != nil { 241 return m.AppHomeURL 242 } 243 return "" 244 } 245 246 func (m *AppVars) GetCratesSnapshotURL() string { 247 if m != nil { 248 return m.CratesSnapshotURL 249 } 250 return "" 251 } 252 253 func (m *AppVars) GetAppDownloadURLs() map[string]string { 254 if m != nil { 255 return m.AppDownloadURLs 256 } 257 return nil 258 } 259 260 func (m *AppVars) GetURLSchemes() []string { 261 if m != nil { 262 return m.URLSchemes 263 } 264 return nil 265 } 266 267 func (m *AppVars) GetSettings() map[string]string { 268 if m != nil { 269 return m.Settings 270 } 271 return nil 272 } 273 274 func (m *AppVars) GetLinks() []*KVEntry { 275 if m != nil { 276 return m.Links 277 } 278 return nil 279 } 280 281 type AssetEntry struct { 282 // AssetFlags specifies properties about this AssetEntry. 283 Flags AssetFlags `protobuf:"varint,1,opt,name=Flags,proto3,enum=crates.AssetFlags" json:"Flags,omitempty"` 284 // URI is a unix-style pathname that identifies an asset within a crate. 285 // By convention this URI does *not* start or end with '/' 286 // An asset URI has the form "{CrateURI}/{EntryURI}" 287 // If two or more assets have same EntryURI then only one is accessible. 288 EntryURI string `protobuf:"bytes,2,opt,name=EntryURI,proto3" json:"EntryURI,omitempty"` 289 // Name is the human-readable label for this asset. 290 Label string `protobuf:"bytes,3,opt,name=Label,proto3" json:"Label,omitempty"` 291 // CenterX and CenterZ specify the positional center of this asset (and are typically 0). 292 // CenterY is the distance above the baseline (y=0) to the y center-point height of this asset. 293 // Y is considered to be the *vertical* (up) direction and by convention rest on the plane y=0. 294 CenterX float32 `protobuf:"fixed32,5,opt,name=CenterX,proto3" json:"CenterX,omitempty"` 295 CenterY float32 `protobuf:"fixed32,6,opt,name=CenterY,proto3" json:"CenterY,omitempty"` 296 CenterZ float32 `protobuf:"fixed32,7,opt,name=CenterZ,proto3" json:"CenterZ,omitempty"` 297 // Extents specify the extents as distance from the center to the extent of the asset on each axis. 298 ExtentsX float32 `protobuf:"fixed32,10,opt,name=ExtentsX,proto3" json:"ExtentsX,omitempty"` 299 ExtentsY float32 `protobuf:"fixed32,11,opt,name=ExtentsY,proto3" json:"ExtentsY,omitempty"` 300 ExtentsZ float32 `protobuf:"fixed32,12,opt,name=ExtentsZ,proto3" json:"ExtentsZ,omitempty"` 301 // Reserved for runtime use -- defaults to empty 302 LocalURI string `protobuf:"bytes,30,opt,name=LocalURI,proto3" json:"LocalURI,omitempty"` 303 // Comma delimited and whitespace-trimmed list of of tags 304 Tags string `protobuf:"bytes,31,opt,name=Tags,proto3" json:"Tags,omitempty"` 305 // A short phrase or fragment describing this asset, starting with an article where appropriate. e.g.: 306 // "A typical 6 crew member fire truck" 307 // "A leading U.S. naval ship-based helicopter" 308 // "The Texas capital building located in Austin" 309 // "An animated scared-geometry inspired flat seal" 310 ShortDesc string `protobuf:"bytes,32,opt,name=ShortDesc,proto3" json:"ShortDesc,omitempty"` 311 } 312 313 func (m *AssetEntry) Reset() { *m = AssetEntry{} } 314 func (*AssetEntry) ProtoMessage() {} 315 func (*AssetEntry) Descriptor() ([]byte, []int) { 316 return fileDescriptor_44b18017c076fca5, []int{2} 317 } 318 func (m *AssetEntry) XXX_Unmarshal(b []byte) error { 319 return m.Unmarshal(b) 320 } 321 func (m *AssetEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 322 if deterministic { 323 return xxx_messageInfo_AssetEntry.Marshal(b, m, deterministic) 324 } else { 325 b = b[:cap(b)] 326 n, err := m.MarshalToSizedBuffer(b) 327 if err != nil { 328 return nil, err 329 } 330 return b[:n], nil 331 } 332 } 333 func (m *AssetEntry) XXX_Merge(src proto.Message) { 334 xxx_messageInfo_AssetEntry.Merge(m, src) 335 } 336 func (m *AssetEntry) XXX_Size() int { 337 return m.Size() 338 } 339 func (m *AssetEntry) XXX_DiscardUnknown() { 340 xxx_messageInfo_AssetEntry.DiscardUnknown(m) 341 } 342 343 var xxx_messageInfo_AssetEntry proto.InternalMessageInfo 344 345 func (m *AssetEntry) GetFlags() AssetFlags { 346 if m != nil { 347 return m.Flags 348 } 349 return NoFlags 350 } 351 352 func (m *AssetEntry) GetEntryURI() string { 353 if m != nil { 354 return m.EntryURI 355 } 356 return "" 357 } 358 359 func (m *AssetEntry) GetLabel() string { 360 if m != nil { 361 return m.Label 362 } 363 return "" 364 } 365 366 func (m *AssetEntry) GetCenterX() float32 { 367 if m != nil { 368 return m.CenterX 369 } 370 return 0 371 } 372 373 func (m *AssetEntry) GetCenterY() float32 { 374 if m != nil { 375 return m.CenterY 376 } 377 return 0 378 } 379 380 func (m *AssetEntry) GetCenterZ() float32 { 381 if m != nil { 382 return m.CenterZ 383 } 384 return 0 385 } 386 387 func (m *AssetEntry) GetExtentsX() float32 { 388 if m != nil { 389 return m.ExtentsX 390 } 391 return 0 392 } 393 394 func (m *AssetEntry) GetExtentsY() float32 { 395 if m != nil { 396 return m.ExtentsY 397 } 398 return 0 399 } 400 401 func (m *AssetEntry) GetExtentsZ() float32 { 402 if m != nil { 403 return m.ExtentsZ 404 } 405 return 0 406 } 407 408 func (m *AssetEntry) GetLocalURI() string { 409 if m != nil { 410 return m.LocalURI 411 } 412 return "" 413 } 414 415 func (m *AssetEntry) GetTags() string { 416 if m != nil { 417 return m.Tags 418 } 419 return "" 420 } 421 422 func (m *AssetEntry) GetShortDesc() string { 423 if m != nil { 424 return m.ShortDesc 425 } 426 return "" 427 } 428 429 type BundleManifest struct { 430 // BundleTitle is how the outside world sees this bundle and has no other impact. 431 // This means it can change from build to build and contain any Unicode characters. 432 BundleTitle string `protobuf:"bytes,2,opt,name=BundleTitle,proto3" json:"BundleTitle,omitempty"` 433 // BundleNameID is how this bundle is internally identified and expressed the filename of this bundle 434 // This is case sensitive, contains only path-safe characters (sans /:\<>|?*\"), and does not terminate in '.' or whitespace. 435 BundleNameID string `protobuf:"bytes,3,opt,name=BundleNameID,proto3" json:"BundleNameID,omitempty"` 436 Assets []*AssetEntry `protobuf:"bytes,10,rep,name=Assets,proto3" json:"Assets,omitempty"` 437 LoadAllHint bool `protobuf:"varint,20,opt,name=LoadAllHint,proto3" json:"LoadAllHint,omitempty"` 438 } 439 440 func (m *BundleManifest) Reset() { *m = BundleManifest{} } 441 func (*BundleManifest) ProtoMessage() {} 442 func (*BundleManifest) Descriptor() ([]byte, []int) { 443 return fileDescriptor_44b18017c076fca5, []int{3} 444 } 445 func (m *BundleManifest) XXX_Unmarshal(b []byte) error { 446 return m.Unmarshal(b) 447 } 448 func (m *BundleManifest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 449 if deterministic { 450 return xxx_messageInfo_BundleManifest.Marshal(b, m, deterministic) 451 } else { 452 b = b[:cap(b)] 453 n, err := m.MarshalToSizedBuffer(b) 454 if err != nil { 455 return nil, err 456 } 457 return b[:n], nil 458 } 459 } 460 func (m *BundleManifest) XXX_Merge(src proto.Message) { 461 xxx_messageInfo_BundleManifest.Merge(m, src) 462 } 463 func (m *BundleManifest) XXX_Size() int { 464 return m.Size() 465 } 466 func (m *BundleManifest) XXX_DiscardUnknown() { 467 xxx_messageInfo_BundleManifest.DiscardUnknown(m) 468 } 469 470 var xxx_messageInfo_BundleManifest proto.InternalMessageInfo 471 472 func (m *BundleManifest) GetBundleTitle() string { 473 if m != nil { 474 return m.BundleTitle 475 } 476 return "" 477 } 478 479 func (m *BundleManifest) GetBundleNameID() string { 480 if m != nil { 481 return m.BundleNameID 482 } 483 return "" 484 } 485 486 func (m *BundleManifest) GetAssets() []*AssetEntry { 487 if m != nil { 488 return m.Assets 489 } 490 return nil 491 } 492 493 func (m *BundleManifest) GetLoadAllHint() bool { 494 if m != nil { 495 return m.LoadAllHint 496 } 497 return false 498 } 499 500 // CrateInfo represents a Crate, the fundamental unit of PLAN's asset/package manager. 501 type CrateInfo struct { 502 // CrateSchema communicates which build and packaging schema was used for this crate build . 503 // This value should be the integer value of a valid CrateSchema.vNNN enum. 504 CrateSchema int32 `protobuf:"varint,1,opt,name=CrateSchema,proto3" json:"CrateSchema,omitempty"` 505 // InstID is 0 by default and reserved for a runtime manager to reference a crate via issuing integers. 506 // If non-zero, it will not change and no other instance will have the same value. 507 InstID uint32 `protobuf:"varint,2,opt,name=InstID,proto3" json:"InstID,omitempty"` 508 // CrateURI takes the form "{PublisherID}/{CrateID}" is used to globally reference assets in this crate. 509 // This URI string can only contains chars in [A-Za-z0-9_.-] (other than the separating '/' char). 510 // PublisherID uniquely identifies the author/owner/publisher of this crate (and potentially other crates). 511 // CrateID uniquely identifies this crate for the given publisher and all subsequent revisions. 512 // "plan-systems.org/plan.app.ui" 513 // "plan-systems.org/about-plan-systems" 514 // "themushroom.farm/land" 515 // "themushroom.farm/mycology-201" 516 // "the-smiths.family/123-Maple" 517 CrateURI string `protobuf:"bytes,4,opt,name=CrateURI,proto3" json:"CrateURI,omitempty"` 518 // PublisherName is a human-readable of the author/owner/publisher of this crate and can change without repercussions (i.e. is purely optical). 519 PublisherName string `protobuf:"bytes,6,opt,name=PublisherName,proto3" json:"PublisherName,omitempty"` 520 // CrateName is a human-readable title for this crate and can change without repercussions. 521 CrateName string `protobuf:"bytes,10,opt,name=CrateName,proto3" json:"CrateName,omitempty"` 522 // ShortDesc describes this crate in a brief phrase 523 ShortDesc string `protobuf:"bytes,11,opt,name=ShortDesc,proto3" json:"ShortDesc,omitempty"` 524 // Comma delimited and whitespace-trimmed list of of tags 525 Tags string `protobuf:"bytes,15,opt,name=Tags,proto3" json:"Tags,omitempty"` 526 // TimeCreated is UTC value (in seconds) when this crate first created (and does not change) 527 TimeCreated int64 `protobuf:"varint,30,opt,name=TimeCreated,proto3" json:"TimeCreated,omitempty"` 528 // TimeBuilt is UTC value (in seconds) when this crate was built. 529 TimeBuilt int64 `protobuf:"varint,31,opt,name=TimeBuilt,proto3" json:"TimeBuilt,omitempty"` 530 // VersionID uniquely identifies this build and has the form "v{MajorNum}.{MinorNum}.{BuildNum}" 531 // e.g. "v1.11.201" 532 MajorVersion int32 `protobuf:"varint,40,opt,name=MajorVersion,proto3" json:"MajorVersion,omitempty"` 533 MinorVersion int32 `protobuf:"varint,41,opt,name=MinorVersion,proto3" json:"MinorVersion,omitempty"` 534 BuildNumber int32 `protobuf:"varint,42,opt,name=BuildNumber,proto3" json:"BuildNumber,omitempty"` 535 // BuildID uniquely identifies a particular crate build/version. 536 // This value should have no spaces and only have '.', '_', or '-' (and starts and ends with an alpha-numeric) 537 // By convention, the format is "yyMMdd-{VersionID}" (so that sorting by BuildID string yields the most recent release). 538 // e.g. "210320-v0.1.11" 539 BuildID string `protobuf:"bytes,45,opt,name=BuildID,proto3" json:"BuildID,omitempty"` 540 // HomeURL is an optional link that allows a human to learn more about this crate. 541 HomeURL string `protobuf:"bytes,50,opt,name=HomeURL,proto3" json:"HomeURL,omitempty"` 542 // URL is an optional string available to specifying URL to download this crate. 543 URL string `protobuf:"bytes,55,opt,name=URL,proto3" json:"URL,omitempty"` 544 // Approximate size of this crate in bytes (or 0 if unknown) 545 ApproxSize int64 `protobuf:"varint,60,opt,name=ApproxSize,proto3" json:"ApproxSize,omitempty"` 546 } 547 548 func (m *CrateInfo) Reset() { *m = CrateInfo{} } 549 func (*CrateInfo) ProtoMessage() {} 550 func (*CrateInfo) Descriptor() ([]byte, []int) { 551 return fileDescriptor_44b18017c076fca5, []int{4} 552 } 553 func (m *CrateInfo) XXX_Unmarshal(b []byte) error { 554 return m.Unmarshal(b) 555 } 556 func (m *CrateInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 557 if deterministic { 558 return xxx_messageInfo_CrateInfo.Marshal(b, m, deterministic) 559 } else { 560 b = b[:cap(b)] 561 n, err := m.MarshalToSizedBuffer(b) 562 if err != nil { 563 return nil, err 564 } 565 return b[:n], nil 566 } 567 } 568 func (m *CrateInfo) XXX_Merge(src proto.Message) { 569 xxx_messageInfo_CrateInfo.Merge(m, src) 570 } 571 func (m *CrateInfo) XXX_Size() int { 572 return m.Size() 573 } 574 func (m *CrateInfo) XXX_DiscardUnknown() { 575 xxx_messageInfo_CrateInfo.DiscardUnknown(m) 576 } 577 578 var xxx_messageInfo_CrateInfo proto.InternalMessageInfo 579 580 func (m *CrateInfo) GetCrateSchema() int32 { 581 if m != nil { 582 return m.CrateSchema 583 } 584 return 0 585 } 586 587 func (m *CrateInfo) GetInstID() uint32 { 588 if m != nil { 589 return m.InstID 590 } 591 return 0 592 } 593 594 func (m *CrateInfo) GetCrateURI() string { 595 if m != nil { 596 return m.CrateURI 597 } 598 return "" 599 } 600 601 func (m *CrateInfo) GetPublisherName() string { 602 if m != nil { 603 return m.PublisherName 604 } 605 return "" 606 } 607 608 func (m *CrateInfo) GetCrateName() string { 609 if m != nil { 610 return m.CrateName 611 } 612 return "" 613 } 614 615 func (m *CrateInfo) GetShortDesc() string { 616 if m != nil { 617 return m.ShortDesc 618 } 619 return "" 620 } 621 622 func (m *CrateInfo) GetTags() string { 623 if m != nil { 624 return m.Tags 625 } 626 return "" 627 } 628 629 func (m *CrateInfo) GetTimeCreated() int64 { 630 if m != nil { 631 return m.TimeCreated 632 } 633 return 0 634 } 635 636 func (m *CrateInfo) GetTimeBuilt() int64 { 637 if m != nil { 638 return m.TimeBuilt 639 } 640 return 0 641 } 642 643 func (m *CrateInfo) GetMajorVersion() int32 { 644 if m != nil { 645 return m.MajorVersion 646 } 647 return 0 648 } 649 650 func (m *CrateInfo) GetMinorVersion() int32 { 651 if m != nil { 652 return m.MinorVersion 653 } 654 return 0 655 } 656 657 func (m *CrateInfo) GetBuildNumber() int32 { 658 if m != nil { 659 return m.BuildNumber 660 } 661 return 0 662 } 663 664 func (m *CrateInfo) GetBuildID() string { 665 if m != nil { 666 return m.BuildID 667 } 668 return "" 669 } 670 671 func (m *CrateInfo) GetHomeURL() string { 672 if m != nil { 673 return m.HomeURL 674 } 675 return "" 676 } 677 678 func (m *CrateInfo) GetURL() string { 679 if m != nil { 680 return m.URL 681 } 682 return "" 683 } 684 685 func (m *CrateInfo) GetApproxSize() int64 { 686 if m != nil { 687 return m.ApproxSize 688 } 689 return 0 690 } 691 692 // CrateManifest is the top-level manifest/catalog for a PLAN asset module called a "crate". 693 // It contains catalog and type info that PLAN loads at runtime to know what's inside binary asset bundles without having to load them. 694 // 695 // A reference to a PLAN asset is via a URI with the form: 696 // assetURI := "PublisherID/CrateID[@CrateBuildID]/{AssetEntry.Pathname}" 697 // 698 type CrateManifest struct { 699 Info *CrateInfo `protobuf:"bytes,1,opt,name=Info,proto3" json:"Info,omitempty"` 700 // IconBundleName is the bundle name ID of the bundle containing icons (Sprites) used to represent the "real" crate assets. 701 // Asset name IDs in this bundle correspond to assets in all the other Crate's bundles. 702 IconBundleName string `protobuf:"bytes,5,opt,name=IconBundleName,proto3" json:"IconBundleName,omitempty"` 703 Bundles []*BundleManifest `protobuf:"bytes,10,rep,name=Bundles,proto3" json:"Bundles,omitempty"` 704 } 705 706 func (m *CrateManifest) Reset() { *m = CrateManifest{} } 707 func (*CrateManifest) ProtoMessage() {} 708 func (*CrateManifest) Descriptor() ([]byte, []int) { 709 return fileDescriptor_44b18017c076fca5, []int{5} 710 } 711 func (m *CrateManifest) XXX_Unmarshal(b []byte) error { 712 return m.Unmarshal(b) 713 } 714 func (m *CrateManifest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 715 if deterministic { 716 return xxx_messageInfo_CrateManifest.Marshal(b, m, deterministic) 717 } else { 718 b = b[:cap(b)] 719 n, err := m.MarshalToSizedBuffer(b) 720 if err != nil { 721 return nil, err 722 } 723 return b[:n], nil 724 } 725 } 726 func (m *CrateManifest) XXX_Merge(src proto.Message) { 727 xxx_messageInfo_CrateManifest.Merge(m, src) 728 } 729 func (m *CrateManifest) XXX_Size() int { 730 return m.Size() 731 } 732 func (m *CrateManifest) XXX_DiscardUnknown() { 733 xxx_messageInfo_CrateManifest.DiscardUnknown(m) 734 } 735 736 var xxx_messageInfo_CrateManifest proto.InternalMessageInfo 737 738 func (m *CrateManifest) GetInfo() *CrateInfo { 739 if m != nil { 740 return m.Info 741 } 742 return nil 743 } 744 745 func (m *CrateManifest) GetIconBundleName() string { 746 if m != nil { 747 return m.IconBundleName 748 } 749 return "" 750 } 751 752 func (m *CrateManifest) GetBundles() []*BundleManifest { 753 if m != nil { 754 return m.Bundles 755 } 756 return nil 757 } 758 759 // CratesSnapshot is a general purpose container to track multiple crates and associated build IDs. 760 type CratesSnapshot struct { 761 RevID int64 `protobuf:"varint,1,opt,name=RevID,proto3" json:"RevID,omitempty"` 762 // This is a template URL where the symbols "CrateURI", "CrateBuildID", "PlatformID" are delimited with { }. 763 // The symbol "{.}" is to be replaced with a local pathname if the URL refers to a local file system pathname. 764 // e.g. "https://whatever.com/{CrateURI}__{CrateBuildID}.{PlatformID}.crate" 765 // "{.}/{CrateURI}__{CrateBuildID}.{PlatformID}.crate" 766 DownloadURL string `protobuf:"bytes,3,opt,name=DownloadURL,proto3" json:"DownloadURL,omitempty"` 767 Crates []*CrateInfo `protobuf:"bytes,10,rep,name=Crates,proto3" json:"Crates,omitempty"` 768 } 769 770 func (m *CratesSnapshot) Reset() { *m = CratesSnapshot{} } 771 func (*CratesSnapshot) ProtoMessage() {} 772 func (*CratesSnapshot) Descriptor() ([]byte, []int) { 773 return fileDescriptor_44b18017c076fca5, []int{6} 774 } 775 func (m *CratesSnapshot) XXX_Unmarshal(b []byte) error { 776 return m.Unmarshal(b) 777 } 778 func (m *CratesSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 779 if deterministic { 780 return xxx_messageInfo_CratesSnapshot.Marshal(b, m, deterministic) 781 } else { 782 b = b[:cap(b)] 783 n, err := m.MarshalToSizedBuffer(b) 784 if err != nil { 785 return nil, err 786 } 787 return b[:n], nil 788 } 789 } 790 func (m *CratesSnapshot) XXX_Merge(src proto.Message) { 791 xxx_messageInfo_CratesSnapshot.Merge(m, src) 792 } 793 func (m *CratesSnapshot) XXX_Size() int { 794 return m.Size() 795 } 796 func (m *CratesSnapshot) XXX_DiscardUnknown() { 797 xxx_messageInfo_CratesSnapshot.DiscardUnknown(m) 798 } 799 800 var xxx_messageInfo_CratesSnapshot proto.InternalMessageInfo 801 802 func (m *CratesSnapshot) GetRevID() int64 { 803 if m != nil { 804 return m.RevID 805 } 806 return 0 807 } 808 809 func (m *CratesSnapshot) GetDownloadURL() string { 810 if m != nil { 811 return m.DownloadURL 812 } 813 return "" 814 } 815 816 func (m *CratesSnapshot) GetCrates() []*CrateInfo { 817 if m != nil { 818 return m.Crates 819 } 820 return nil 821 } 822 823 func init() { 824 proto.RegisterEnum("crates.AssetFlags", AssetFlags_name, AssetFlags_value) 825 proto.RegisterEnum("crates.CrateSchema", CrateSchema_name, CrateSchema_value) 826 proto.RegisterType((*KVEntry)(nil), "crates.KVEntry") 827 proto.RegisterType((*AppVars)(nil), "crates.AppVars") 828 proto.RegisterMapType((map[string]string)(nil), "crates.AppVars.AppDownloadURLsEntry") 829 proto.RegisterMapType((map[string]string)(nil), "crates.AppVars.SettingsEntry") 830 proto.RegisterType((*AssetEntry)(nil), "crates.AssetEntry") 831 proto.RegisterType((*BundleManifest)(nil), "crates.BundleManifest") 832 proto.RegisterType((*CrateInfo)(nil), "crates.CrateInfo") 833 proto.RegisterType((*CrateManifest)(nil), "crates.CrateManifest") 834 proto.RegisterType((*CratesSnapshot)(nil), "crates.CratesSnapshot") 835 } 836 837 func init() { proto.RegisterFile("crates/crates.proto", fileDescriptor_44b18017c076fca5) } 838 839 var fileDescriptor_44b18017c076fca5 = []byte{ 840 // 1046 bytes of a gzipped FileDescriptorProto 841 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x4f, 0x4f, 0x1b, 0x47, 842 0x14, 0xf7, 0xda, 0xc6, 0xd8, 0xcf, 0xd8, 0x6c, 0x26, 0x28, 0x1a, 0x45, 0xed, 0xd6, 0xb2, 0x92, 843 0xca, 0x41, 0x29, 0x25, 0xf4, 0xd0, 0x36, 0xed, 0xc5, 0xe0, 0x56, 0xac, 0x62, 0x28, 0x5a, 0x03, 844 0x0a, 0xdc, 0xc6, 0xf6, 0x00, 0x5b, 0xd6, 0xbb, 0xd6, 0xce, 0x98, 0x42, 0x4f, 0x56, 0x3f, 0x41, 845 0x3e, 0x44, 0x0f, 0x55, 0xcf, 0xfd, 0x10, 0x3d, 0x72, 0xe4, 0x58, 0xcc, 0xa1, 0x3d, 0xe6, 0x23, 846 0x54, 0xf3, 0x66, 0xff, 0xd9, 0xcd, 0xa5, 0x27, 0xef, 0xfb, 0xfd, 0x7e, 0x6f, 0x66, 0xde, 0x5f, 847 0x19, 0x1e, 0x0f, 0x42, 0x26, 0xb9, 0xf8, 0x5c, 0xff, 0x6c, 0x8c, 0xc3, 0x40, 0x06, 0xa4, 0xa4, 848 0xad, 0xe6, 0x2b, 0x58, 0x7e, 0x73, 0xfc, 0x9d, 0x2f, 0xc3, 0x1b, 0x62, 0x42, 0xe1, 0x0d, 0xbf, 849 0xa1, 0x46, 0xc3, 0x68, 0x55, 0x1c, 0xf5, 0x49, 0xd6, 0x60, 0xe9, 0x98, 0x79, 0x13, 0x4e, 0xf3, 850 0x88, 0x69, 0xa3, 0xf9, 0x4b, 0x11, 0x96, 0xdb, 0xe3, 0xf1, 0x31, 0x0b, 0x05, 0xf9, 0x08, 0x2a, 851 0xed, 0xf1, 0xb8, 0x13, 0x8c, 0x98, 0xeb, 0x47, 0xaa, 0x14, 0x20, 0x14, 0x85, 0x1d, 0x2e, 0x06, 852 0xb4, 0x88, 0x5c, 0x6c, 0x12, 0x0b, 0xe0, 0x87, 0xf0, 0x7c, 0x37, 0x18, 0xf1, 0x23, 0xa7, 0x4b, 853 0x4b, 0x48, 0x66, 0x10, 0xc5, 0xb7, 0xc7, 0xe3, 0x98, 0x5f, 0xd1, 0x7c, 0x8a, 0x90, 0x97, 0xf0, 854 0x68, 0x07, 0x03, 0xe8, 0xf9, 0x6c, 0x2c, 0x2e, 0x02, 0xa9, 0x64, 0x75, 0x94, 0xfd, 0x97, 0x20, 855 0xfb, 0xb0, 0x8a, 0x8f, 0xfa, 0xc9, 0xf7, 0x02, 0x36, 0x3c, 0x72, 0xba, 0x82, 0x9a, 0x8d, 0x42, 856 0xab, 0xba, 0xf5, 0x6c, 0x23, 0x4a, 0x4a, 0x14, 0xcf, 0xc6, 0x82, 0x0c, 0x13, 0xe3, 0x2c, 0x3a, 857 0xab, 0xd7, 0x1d, 0x39, 0xdd, 0xde, 0xe0, 0x82, 0x8f, 0xb8, 0xa0, 0xa4, 0x51, 0x50, 0xaf, 0x4b, 858 0x11, 0xf2, 0x35, 0x94, 0x7b, 0x5c, 0x4a, 0xd7, 0x3f, 0x17, 0x74, 0x0d, 0x2f, 0xfa, 0x78, 0xf1, 859 0xa2, 0x98, 0xd7, 0x37, 0x24, 0x72, 0xf2, 0x1c, 0x96, 0xba, 0xae, 0x7f, 0x29, 0x68, 0x0b, 0xfd, 860 0x56, 0x63, 0xbf, 0xa8, 0x48, 0x8e, 0x66, 0x9f, 0x6e, 0xc3, 0xda, 0x87, 0x9e, 0xaa, 0x6a, 0x78, 861 0x99, 0xd6, 0xf0, 0x52, 0xd7, 0xf0, 0x2a, 0x5b, 0x43, 0x34, 0x5e, 0xe7, 0xbf, 0x32, 0x9e, 0x7e, 862 0x03, 0xb5, 0xb9, 0x57, 0xfc, 0x1f, 0xe7, 0xe6, 0x5d, 0x1e, 0xa0, 0x2d, 0x04, 0x97, 0xda, 0xb5, 863 0x05, 0x4b, 0xdf, 0x7b, 0xec, 0x5c, 0xa0, 0x73, 0x7d, 0x8b, 0x24, 0xe1, 0x2a, 0x09, 0x32, 0x8e, 864 0x16, 0x90, 0xa7, 0x50, 0x46, 0x97, 0x23, 0xc7, 0x8e, 0x4e, 0x4d, 0x6c, 0x75, 0x5d, 0x97, 0xf5, 865 0xb9, 0x47, 0x0b, 0xfa, 0x3a, 0x34, 0x54, 0x17, 0xed, 0x70, 0x5f, 0xf2, 0xf0, 0x2d, 0x5d, 0x6a, 866 0x18, 0xad, 0xbc, 0x13, 0x9b, 0x29, 0x73, 0x82, 0x2d, 0x94, 0x30, 0x27, 0x29, 0x73, 0x4a, 0x97, 867 0xb3, 0xcc, 0x29, 0xde, 0x7f, 0x2d, 0xb9, 0x2f, 0xc5, 0x5b, 0x0a, 0x48, 0x25, 0x76, 0x86, 0x3b, 868 0xa1, 0xd5, 0x39, 0xee, 0x24, 0xc3, 0x9d, 0x62, 0x3f, 0xa6, 0x1c, 0x9e, 0xd9, 0x0d, 0x06, 0xcc, 869 0x53, 0x31, 0x59, 0x3a, 0xa6, 0xd8, 0x26, 0x04, 0x8a, 0x87, 0x2a, 0x31, 0x9f, 0x20, 0x8e, 0xdf, 870 0x6a, 0x6a, 0x7a, 0x17, 0x41, 0x28, 0x71, 0x32, 0x1a, 0x7a, 0x6a, 0x12, 0xa0, 0xf9, 0xab, 0x01, 871 0xf5, 0xed, 0x89, 0x3f, 0xf4, 0xf8, 0x1e, 0xf3, 0xdd, 0x33, 0x2e, 0x24, 0x69, 0x40, 0x55, 0x23, 872 0x87, 0xae, 0xf4, 0xe2, 0x6a, 0x64, 0x21, 0xd2, 0x84, 0x15, 0x6d, 0xee, 0xb3, 0x11, 0xb7, 0x3b, 873 0x51, 0x06, 0xe7, 0x30, 0xb2, 0x0e, 0x25, 0xac, 0x87, 0xa0, 0x80, 0xcd, 0x35, 0x5f, 0x25, 0xdd, 874 0x5f, 0x91, 0x42, 0xdd, 0xd8, 0x0d, 0xd8, 0xb0, 0xed, 0x79, 0xbb, 0xae, 0x2f, 0xe9, 0x5a, 0xc3, 875 0x68, 0x95, 0x9d, 0x2c, 0xd4, 0xfc, 0xbb, 0x00, 0x15, 0x1c, 0x35, 0xdb, 0x3f, 0x0b, 0x94, 0x1e, 876 0x0d, 0x1c, 0x01, 0x86, 0x6d, 0xb0, 0xe4, 0x64, 0x21, 0xf2, 0x04, 0x4a, 0xb6, 0x2f, 0xa4, 0xdd, 877 0xc1, 0xe7, 0xd7, 0x9c, 0xc8, 0x52, 0xc9, 0x43, 0x99, 0x4a, 0x9e, 0xde, 0x12, 0x89, 0x4d, 0x9e, 878 0x41, 0xed, 0x60, 0xd2, 0xf7, 0x5c, 0x71, 0xc1, 0x43, 0x15, 0x44, 0xb4, 0x29, 0xe6, 0x41, 0x95, 879 0x4e, 0xf4, 0x40, 0x05, 0xe8, 0x74, 0x26, 0xc0, 0x7c, 0xb2, 0xab, 0x0b, 0xc9, 0x4e, 0xca, 0xb3, 880 0x9a, 0x29, 0x4f, 0x03, 0xaa, 0x87, 0xee, 0x88, 0xef, 0x84, 0x9c, 0x49, 0x3e, 0xc4, 0x8a, 0x16, 881 0x9c, 0x2c, 0xa4, 0xce, 0x54, 0xe6, 0xf6, 0xc4, 0xf5, 0x24, 0x56, 0xb6, 0xe0, 0xa4, 0x80, 0xaa, 882 0xc5, 0x1e, 0xfb, 0x31, 0x08, 0x8f, 0x79, 0x28, 0xdc, 0xc0, 0xa7, 0x2d, 0x4c, 0xc6, 0x1c, 0x86, 883 0x1a, 0xd7, 0x4f, 0x35, 0x2f, 0x22, 0x4d, 0x06, 0xd3, 0x55, 0x77, 0xbd, 0xe1, 0xfe, 0x64, 0xd4, 884 0xe7, 0x21, 0x5d, 0xd7, 0x39, 0xcd, 0x40, 0xaa, 0xcd, 0xd1, 0xb4, 0x3b, 0xf4, 0x33, 0xbd, 0x60, 885 0x23, 0x53, 0x31, 0xf1, 0xf6, 0xdc, 0xd2, 0x4c, 0xbc, 0x3a, 0x4d, 0x28, 0x28, 0xf4, 0x4b, 0x3d, 886 0xe5, 0xe9, 0xb2, 0x0d, 0x83, 0xeb, 0x9e, 0xfb, 0x33, 0xa7, 0xdf, 0x62, 0x38, 0x19, 0xa4, 0xf9, 887 0xce, 0x80, 0x1a, 0xe6, 0x33, 0xe9, 0xc7, 0xe7, 0x50, 0x54, 0x55, 0xc7, 0x32, 0x57, 0xb7, 0x1e, 888 0xc5, 0x7d, 0x94, 0xb4, 0x83, 0x83, 0x34, 0xf9, 0x14, 0xea, 0xf6, 0x20, 0xf0, 0xd3, 0x26, 0xc4, 889 0x01, 0xae, 0x38, 0x0b, 0x28, 0xd9, 0x54, 0x61, 0x28, 0x2b, 0xee, 0xcc, 0x27, 0xf1, 0x89, 0xf3, 890 0x73, 0xe0, 0xc4, 0xb2, 0xa6, 0x80, 0xfa, 0xfc, 0x9a, 0x57, 0xbb, 0xc3, 0xe1, 0x57, 0x76, 0x07, 891 0xdf, 0x54, 0x70, 0xb4, 0xa1, 0x52, 0x98, 0x59, 0x92, 0xd1, 0x54, 0x64, 0x21, 0xf2, 0x02, 0x4a, 892 0xfa, 0xa4, 0xe8, 0xea, 0x0f, 0x04, 0x13, 0x09, 0xd6, 0xff, 0x30, 0xa2, 0x9d, 0xa7, 0x37, 0x59, 893 0x15, 0x96, 0xf7, 0x03, 0xfc, 0x34, 0x73, 0xa4, 0x06, 0x15, 0x5b, 0x1c, 0xf2, 0x6b, 0x39, 0x09, 894 0xb9, 0x69, 0x90, 0x15, 0x28, 0xdb, 0xa2, 0x37, 0x0e, 0x5d, 0xc9, 0xcd, 0x3c, 0xa9, 0x03, 0xd8, 895 0x62, 0x8f, 0x49, 0x1e, 0xba, 0xcc, 0x33, 0x8b, 0x64, 0x15, 0xaa, 0xb6, 0x38, 0xf0, 0xd8, 0x80, 896 0xb3, 0xbe, 0xc7, 0xcd, 0x72, 0x24, 0x08, 0xfc, 0x60, 0x87, 0x7b, 0x9e, 0x69, 0x92, 0x15, 0x58, 897 0xde, 0x65, 0x42, 0x65, 0xc9, 0x9c, 0x2a, 0xf7, 0x8a, 0x2d, 0x0e, 0x42, 0xf7, 0x8a, 0x49, 0x6e, 898 0x4e, 0x8b, 0xa4, 0x86, 0x87, 0x5f, 0xde, 0xf4, 0x83, 0x6b, 0x73, 0xaa, 0x9c, 0x2b, 0xed, 0x89, 899 0x0c, 0x7a, 0x03, 0xe6, 0x71, 0x73, 0x6a, 0x6a, 0x79, 0x6f, 0x12, 0x9e, 0xb1, 0x01, 0x37, 0xa7, 900 0x8d, 0xf5, 0x97, 0x73, 0xa3, 0x49, 0x1e, 0xc3, 0xea, 0x91, 0x3f, 0xe4, 0x67, 0xae, 0xcf, 0x87, 901 0x1a, 0x32, 0x73, 0xa4, 0x0c, 0xc5, 0xab, 0x57, 0x9b, 0x9b, 0xe6, 0x70, 0xfb, 0xf5, 0xed, 0xbd, 902 0x95, 0xbb, 0xbb, 0xb7, 0x72, 0xef, 0xef, 0x2d, 0x63, 0x3a, 0xb3, 0x8c, 0xdf, 0x66, 0x96, 0xf1, 903 0xe7, 0xcc, 0x32, 0x6e, 0x67, 0x96, 0xf1, 0xd7, 0xcc, 0x32, 0xfe, 0x99, 0x59, 0xb9, 0xf7, 0x33, 904 0xcb, 0x78, 0xf7, 0x60, 0xe5, 0x6e, 0x1f, 0xac, 0xdc, 0xdd, 0x83, 0x95, 0xfb, 0x3d, 0x5f, 0x68, 905 0xef, 0x1d, 0xf4, 0x4b, 0xf8, 0xdf, 0xe2, 0x8b, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x79, 0xc7, 906 0x14, 0xb3, 0x72, 0x08, 0x00, 0x00, 907 } 908 909 func (x AssetFlags) String() string { 910 s, ok := AssetFlags_name[int32(x)] 911 if ok { 912 return s 913 } 914 return strconv.Itoa(int(x)) 915 } 916 func (x CrateSchema) String() string { 917 s, ok := CrateSchema_name[int32(x)] 918 if ok { 919 return s 920 } 921 return strconv.Itoa(int(x)) 922 } 923 func (this *KVEntry) Equal(that interface{}) bool { 924 if that == nil { 925 return this == nil 926 } 927 928 that1, ok := that.(*KVEntry) 929 if !ok { 930 that2, ok := that.(KVEntry) 931 if ok { 932 that1 = &that2 933 } else { 934 return false 935 } 936 } 937 if that1 == nil { 938 return this == nil 939 } else if this == nil { 940 return false 941 } 942 if this.Key != that1.Key { 943 return false 944 } 945 if this.Value != that1.Value { 946 return false 947 } 948 return true 949 } 950 func (this *AppVars) Equal(that interface{}) bool { 951 if that == nil { 952 return this == nil 953 } 954 955 that1, ok := that.(*AppVars) 956 if !ok { 957 that2, ok := that.(AppVars) 958 if ok { 959 that1 = &that2 960 } else { 961 return false 962 } 963 } 964 if that1 == nil { 965 return this == nil 966 } else if this == nil { 967 return false 968 } 969 if this.AppDomain != that1.AppDomain { 970 return false 971 } 972 if this.AppDesc != that1.AppDesc { 973 return false 974 } 975 if this.OrgHomeURL != that1.OrgHomeURL { 976 return false 977 } 978 if this.AppHomeURL != that1.AppHomeURL { 979 return false 980 } 981 if this.CratesSnapshotURL != that1.CratesSnapshotURL { 982 return false 983 } 984 if len(this.AppDownloadURLs) != len(that1.AppDownloadURLs) { 985 return false 986 } 987 for i := range this.AppDownloadURLs { 988 if this.AppDownloadURLs[i] != that1.AppDownloadURLs[i] { 989 return false 990 } 991 } 992 if len(this.URLSchemes) != len(that1.URLSchemes) { 993 return false 994 } 995 for i := range this.URLSchemes { 996 if this.URLSchemes[i] != that1.URLSchemes[i] { 997 return false 998 } 999 } 1000 if len(this.Settings) != len(that1.Settings) { 1001 return false 1002 } 1003 for i := range this.Settings { 1004 if this.Settings[i] != that1.Settings[i] { 1005 return false 1006 } 1007 } 1008 if len(this.Links) != len(that1.Links) { 1009 return false 1010 } 1011 for i := range this.Links { 1012 if !this.Links[i].Equal(that1.Links[i]) { 1013 return false 1014 } 1015 } 1016 return true 1017 } 1018 func (this *AssetEntry) Equal(that interface{}) bool { 1019 if that == nil { 1020 return this == nil 1021 } 1022 1023 that1, ok := that.(*AssetEntry) 1024 if !ok { 1025 that2, ok := that.(AssetEntry) 1026 if ok { 1027 that1 = &that2 1028 } else { 1029 return false 1030 } 1031 } 1032 if that1 == nil { 1033 return this == nil 1034 } else if this == nil { 1035 return false 1036 } 1037 if this.Flags != that1.Flags { 1038 return false 1039 } 1040 if this.EntryURI != that1.EntryURI { 1041 return false 1042 } 1043 if this.Label != that1.Label { 1044 return false 1045 } 1046 if this.CenterX != that1.CenterX { 1047 return false 1048 } 1049 if this.CenterY != that1.CenterY { 1050 return false 1051 } 1052 if this.CenterZ != that1.CenterZ { 1053 return false 1054 } 1055 if this.ExtentsX != that1.ExtentsX { 1056 return false 1057 } 1058 if this.ExtentsY != that1.ExtentsY { 1059 return false 1060 } 1061 if this.ExtentsZ != that1.ExtentsZ { 1062 return false 1063 } 1064 if this.LocalURI != that1.LocalURI { 1065 return false 1066 } 1067 if this.Tags != that1.Tags { 1068 return false 1069 } 1070 if this.ShortDesc != that1.ShortDesc { 1071 return false 1072 } 1073 return true 1074 } 1075 func (this *BundleManifest) Equal(that interface{}) bool { 1076 if that == nil { 1077 return this == nil 1078 } 1079 1080 that1, ok := that.(*BundleManifest) 1081 if !ok { 1082 that2, ok := that.(BundleManifest) 1083 if ok { 1084 that1 = &that2 1085 } else { 1086 return false 1087 } 1088 } 1089 if that1 == nil { 1090 return this == nil 1091 } else if this == nil { 1092 return false 1093 } 1094 if this.BundleTitle != that1.BundleTitle { 1095 return false 1096 } 1097 if this.BundleNameID != that1.BundleNameID { 1098 return false 1099 } 1100 if len(this.Assets) != len(that1.Assets) { 1101 return false 1102 } 1103 for i := range this.Assets { 1104 if !this.Assets[i].Equal(that1.Assets[i]) { 1105 return false 1106 } 1107 } 1108 if this.LoadAllHint != that1.LoadAllHint { 1109 return false 1110 } 1111 return true 1112 } 1113 func (this *CrateInfo) Equal(that interface{}) bool { 1114 if that == nil { 1115 return this == nil 1116 } 1117 1118 that1, ok := that.(*CrateInfo) 1119 if !ok { 1120 that2, ok := that.(CrateInfo) 1121 if ok { 1122 that1 = &that2 1123 } else { 1124 return false 1125 } 1126 } 1127 if that1 == nil { 1128 return this == nil 1129 } else if this == nil { 1130 return false 1131 } 1132 if this.CrateSchema != that1.CrateSchema { 1133 return false 1134 } 1135 if this.InstID != that1.InstID { 1136 return false 1137 } 1138 if this.CrateURI != that1.CrateURI { 1139 return false 1140 } 1141 if this.PublisherName != that1.PublisherName { 1142 return false 1143 } 1144 if this.CrateName != that1.CrateName { 1145 return false 1146 } 1147 if this.ShortDesc != that1.ShortDesc { 1148 return false 1149 } 1150 if this.Tags != that1.Tags { 1151 return false 1152 } 1153 if this.TimeCreated != that1.TimeCreated { 1154 return false 1155 } 1156 if this.TimeBuilt != that1.TimeBuilt { 1157 return false 1158 } 1159 if this.MajorVersion != that1.MajorVersion { 1160 return false 1161 } 1162 if this.MinorVersion != that1.MinorVersion { 1163 return false 1164 } 1165 if this.BuildNumber != that1.BuildNumber { 1166 return false 1167 } 1168 if this.BuildID != that1.BuildID { 1169 return false 1170 } 1171 if this.HomeURL != that1.HomeURL { 1172 return false 1173 } 1174 if this.URL != that1.URL { 1175 return false 1176 } 1177 if this.ApproxSize != that1.ApproxSize { 1178 return false 1179 } 1180 return true 1181 } 1182 func (this *CrateManifest) Equal(that interface{}) bool { 1183 if that == nil { 1184 return this == nil 1185 } 1186 1187 that1, ok := that.(*CrateManifest) 1188 if !ok { 1189 that2, ok := that.(CrateManifest) 1190 if ok { 1191 that1 = &that2 1192 } else { 1193 return false 1194 } 1195 } 1196 if that1 == nil { 1197 return this == nil 1198 } else if this == nil { 1199 return false 1200 } 1201 if !this.Info.Equal(that1.Info) { 1202 return false 1203 } 1204 if this.IconBundleName != that1.IconBundleName { 1205 return false 1206 } 1207 if len(this.Bundles) != len(that1.Bundles) { 1208 return false 1209 } 1210 for i := range this.Bundles { 1211 if !this.Bundles[i].Equal(that1.Bundles[i]) { 1212 return false 1213 } 1214 } 1215 return true 1216 } 1217 func (this *CratesSnapshot) Equal(that interface{}) bool { 1218 if that == nil { 1219 return this == nil 1220 } 1221 1222 that1, ok := that.(*CratesSnapshot) 1223 if !ok { 1224 that2, ok := that.(CratesSnapshot) 1225 if ok { 1226 that1 = &that2 1227 } else { 1228 return false 1229 } 1230 } 1231 if that1 == nil { 1232 return this == nil 1233 } else if this == nil { 1234 return false 1235 } 1236 if this.RevID != that1.RevID { 1237 return false 1238 } 1239 if this.DownloadURL != that1.DownloadURL { 1240 return false 1241 } 1242 if len(this.Crates) != len(that1.Crates) { 1243 return false 1244 } 1245 for i := range this.Crates { 1246 if !this.Crates[i].Equal(that1.Crates[i]) { 1247 return false 1248 } 1249 } 1250 return true 1251 } 1252 func (this *KVEntry) GoString() string { 1253 if this == nil { 1254 return "nil" 1255 } 1256 s := make([]string, 0, 6) 1257 s = append(s, "&crates.KVEntry{") 1258 s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") 1259 s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") 1260 s = append(s, "}") 1261 return strings.Join(s, "") 1262 } 1263 func (this *AppVars) GoString() string { 1264 if this == nil { 1265 return "nil" 1266 } 1267 s := make([]string, 0, 13) 1268 s = append(s, "&crates.AppVars{") 1269 s = append(s, "AppDomain: "+fmt.Sprintf("%#v", this.AppDomain)+",\n") 1270 s = append(s, "AppDesc: "+fmt.Sprintf("%#v", this.AppDesc)+",\n") 1271 s = append(s, "OrgHomeURL: "+fmt.Sprintf("%#v", this.OrgHomeURL)+",\n") 1272 s = append(s, "AppHomeURL: "+fmt.Sprintf("%#v", this.AppHomeURL)+",\n") 1273 s = append(s, "CratesSnapshotURL: "+fmt.Sprintf("%#v", this.CratesSnapshotURL)+",\n") 1274 keysForAppDownloadURLs := make([]string, 0, len(this.AppDownloadURLs)) 1275 for k, _ := range this.AppDownloadURLs { 1276 keysForAppDownloadURLs = append(keysForAppDownloadURLs, k) 1277 } 1278 github_com_gogo_protobuf_sortkeys.Strings(keysForAppDownloadURLs) 1279 mapStringForAppDownloadURLs := "map[string]string{" 1280 for _, k := range keysForAppDownloadURLs { 1281 mapStringForAppDownloadURLs += fmt.Sprintf("%#v: %#v,", k, this.AppDownloadURLs[k]) 1282 } 1283 mapStringForAppDownloadURLs += "}" 1284 if this.AppDownloadURLs != nil { 1285 s = append(s, "AppDownloadURLs: "+mapStringForAppDownloadURLs+",\n") 1286 } 1287 s = append(s, "URLSchemes: "+fmt.Sprintf("%#v", this.URLSchemes)+",\n") 1288 keysForSettings := make([]string, 0, len(this.Settings)) 1289 for k, _ := range this.Settings { 1290 keysForSettings = append(keysForSettings, k) 1291 } 1292 github_com_gogo_protobuf_sortkeys.Strings(keysForSettings) 1293 mapStringForSettings := "map[string]string{" 1294 for _, k := range keysForSettings { 1295 mapStringForSettings += fmt.Sprintf("%#v: %#v,", k, this.Settings[k]) 1296 } 1297 mapStringForSettings += "}" 1298 if this.Settings != nil { 1299 s = append(s, "Settings: "+mapStringForSettings+",\n") 1300 } 1301 if this.Links != nil { 1302 s = append(s, "Links: "+fmt.Sprintf("%#v", this.Links)+",\n") 1303 } 1304 s = append(s, "}") 1305 return strings.Join(s, "") 1306 } 1307 func (this *AssetEntry) GoString() string { 1308 if this == nil { 1309 return "nil" 1310 } 1311 s := make([]string, 0, 16) 1312 s = append(s, "&crates.AssetEntry{") 1313 s = append(s, "Flags: "+fmt.Sprintf("%#v", this.Flags)+",\n") 1314 s = append(s, "EntryURI: "+fmt.Sprintf("%#v", this.EntryURI)+",\n") 1315 s = append(s, "Label: "+fmt.Sprintf("%#v", this.Label)+",\n") 1316 s = append(s, "CenterX: "+fmt.Sprintf("%#v", this.CenterX)+",\n") 1317 s = append(s, "CenterY: "+fmt.Sprintf("%#v", this.CenterY)+",\n") 1318 s = append(s, "CenterZ: "+fmt.Sprintf("%#v", this.CenterZ)+",\n") 1319 s = append(s, "ExtentsX: "+fmt.Sprintf("%#v", this.ExtentsX)+",\n") 1320 s = append(s, "ExtentsY: "+fmt.Sprintf("%#v", this.ExtentsY)+",\n") 1321 s = append(s, "ExtentsZ: "+fmt.Sprintf("%#v", this.ExtentsZ)+",\n") 1322 s = append(s, "LocalURI: "+fmt.Sprintf("%#v", this.LocalURI)+",\n") 1323 s = append(s, "Tags: "+fmt.Sprintf("%#v", this.Tags)+",\n") 1324 s = append(s, "ShortDesc: "+fmt.Sprintf("%#v", this.ShortDesc)+",\n") 1325 s = append(s, "}") 1326 return strings.Join(s, "") 1327 } 1328 func (this *BundleManifest) GoString() string { 1329 if this == nil { 1330 return "nil" 1331 } 1332 s := make([]string, 0, 8) 1333 s = append(s, "&crates.BundleManifest{") 1334 s = append(s, "BundleTitle: "+fmt.Sprintf("%#v", this.BundleTitle)+",\n") 1335 s = append(s, "BundleNameID: "+fmt.Sprintf("%#v", this.BundleNameID)+",\n") 1336 if this.Assets != nil { 1337 s = append(s, "Assets: "+fmt.Sprintf("%#v", this.Assets)+",\n") 1338 } 1339 s = append(s, "LoadAllHint: "+fmt.Sprintf("%#v", this.LoadAllHint)+",\n") 1340 s = append(s, "}") 1341 return strings.Join(s, "") 1342 } 1343 func (this *CrateInfo) GoString() string { 1344 if this == nil { 1345 return "nil" 1346 } 1347 s := make([]string, 0, 20) 1348 s = append(s, "&crates.CrateInfo{") 1349 s = append(s, "CrateSchema: "+fmt.Sprintf("%#v", this.CrateSchema)+",\n") 1350 s = append(s, "InstID: "+fmt.Sprintf("%#v", this.InstID)+",\n") 1351 s = append(s, "CrateURI: "+fmt.Sprintf("%#v", this.CrateURI)+",\n") 1352 s = append(s, "PublisherName: "+fmt.Sprintf("%#v", this.PublisherName)+",\n") 1353 s = append(s, "CrateName: "+fmt.Sprintf("%#v", this.CrateName)+",\n") 1354 s = append(s, "ShortDesc: "+fmt.Sprintf("%#v", this.ShortDesc)+",\n") 1355 s = append(s, "Tags: "+fmt.Sprintf("%#v", this.Tags)+",\n") 1356 s = append(s, "TimeCreated: "+fmt.Sprintf("%#v", this.TimeCreated)+",\n") 1357 s = append(s, "TimeBuilt: "+fmt.Sprintf("%#v", this.TimeBuilt)+",\n") 1358 s = append(s, "MajorVersion: "+fmt.Sprintf("%#v", this.MajorVersion)+",\n") 1359 s = append(s, "MinorVersion: "+fmt.Sprintf("%#v", this.MinorVersion)+",\n") 1360 s = append(s, "BuildNumber: "+fmt.Sprintf("%#v", this.BuildNumber)+",\n") 1361 s = append(s, "BuildID: "+fmt.Sprintf("%#v", this.BuildID)+",\n") 1362 s = append(s, "HomeURL: "+fmt.Sprintf("%#v", this.HomeURL)+",\n") 1363 s = append(s, "URL: "+fmt.Sprintf("%#v", this.URL)+",\n") 1364 s = append(s, "ApproxSize: "+fmt.Sprintf("%#v", this.ApproxSize)+",\n") 1365 s = append(s, "}") 1366 return strings.Join(s, "") 1367 } 1368 func (this *CrateManifest) GoString() string { 1369 if this == nil { 1370 return "nil" 1371 } 1372 s := make([]string, 0, 7) 1373 s = append(s, "&crates.CrateManifest{") 1374 if this.Info != nil { 1375 s = append(s, "Info: "+fmt.Sprintf("%#v", this.Info)+",\n") 1376 } 1377 s = append(s, "IconBundleName: "+fmt.Sprintf("%#v", this.IconBundleName)+",\n") 1378 if this.Bundles != nil { 1379 s = append(s, "Bundles: "+fmt.Sprintf("%#v", this.Bundles)+",\n") 1380 } 1381 s = append(s, "}") 1382 return strings.Join(s, "") 1383 } 1384 func (this *CratesSnapshot) GoString() string { 1385 if this == nil { 1386 return "nil" 1387 } 1388 s := make([]string, 0, 7) 1389 s = append(s, "&crates.CratesSnapshot{") 1390 s = append(s, "RevID: "+fmt.Sprintf("%#v", this.RevID)+",\n") 1391 s = append(s, "DownloadURL: "+fmt.Sprintf("%#v", this.DownloadURL)+",\n") 1392 if this.Crates != nil { 1393 s = append(s, "Crates: "+fmt.Sprintf("%#v", this.Crates)+",\n") 1394 } 1395 s = append(s, "}") 1396 return strings.Join(s, "") 1397 } 1398 func valueToGoStringCrates(v interface{}, typ string) string { 1399 rv := reflect.ValueOf(v) 1400 if rv.IsNil() { 1401 return "nil" 1402 } 1403 pv := reflect.Indirect(rv).Interface() 1404 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) 1405 } 1406 func (m *KVEntry) Marshal() (dAtA []byte, err error) { 1407 size := m.Size() 1408 dAtA = make([]byte, size) 1409 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1410 if err != nil { 1411 return nil, err 1412 } 1413 return dAtA[:n], nil 1414 } 1415 1416 func (m *KVEntry) MarshalTo(dAtA []byte) (int, error) { 1417 size := m.Size() 1418 return m.MarshalToSizedBuffer(dAtA[:size]) 1419 } 1420 1421 func (m *KVEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1422 i := len(dAtA) 1423 _ = i 1424 var l int 1425 _ = l 1426 if len(m.Value) > 0 { 1427 i -= len(m.Value) 1428 copy(dAtA[i:], m.Value) 1429 i = encodeVarintCrates(dAtA, i, uint64(len(m.Value))) 1430 i-- 1431 dAtA[i] = 0x12 1432 } 1433 if len(m.Key) > 0 { 1434 i -= len(m.Key) 1435 copy(dAtA[i:], m.Key) 1436 i = encodeVarintCrates(dAtA, i, uint64(len(m.Key))) 1437 i-- 1438 dAtA[i] = 0xa 1439 } 1440 return len(dAtA) - i, nil 1441 } 1442 1443 func (m *AppVars) Marshal() (dAtA []byte, err error) { 1444 size := m.Size() 1445 dAtA = make([]byte, size) 1446 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1447 if err != nil { 1448 return nil, err 1449 } 1450 return dAtA[:n], nil 1451 } 1452 1453 func (m *AppVars) MarshalTo(dAtA []byte) (int, error) { 1454 size := m.Size() 1455 return m.MarshalToSizedBuffer(dAtA[:size]) 1456 } 1457 1458 func (m *AppVars) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1459 i := len(dAtA) 1460 _ = i 1461 var l int 1462 _ = l 1463 if len(m.Links) > 0 { 1464 for iNdEx := len(m.Links) - 1; iNdEx >= 0; iNdEx-- { 1465 { 1466 size, err := m.Links[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1467 if err != nil { 1468 return 0, err 1469 } 1470 i -= size 1471 i = encodeVarintCrates(dAtA, i, uint64(size)) 1472 } 1473 i-- 1474 dAtA[i] = 0x2 1475 i-- 1476 dAtA[i] = 0xc2 1477 } 1478 } 1479 if len(m.Settings) > 0 { 1480 for k := range m.Settings { 1481 v := m.Settings[k] 1482 baseI := i 1483 i -= len(v) 1484 copy(dAtA[i:], v) 1485 i = encodeVarintCrates(dAtA, i, uint64(len(v))) 1486 i-- 1487 dAtA[i] = 0x12 1488 i -= len(k) 1489 copy(dAtA[i:], k) 1490 i = encodeVarintCrates(dAtA, i, uint64(len(k))) 1491 i-- 1492 dAtA[i] = 0xa 1493 i = encodeVarintCrates(dAtA, i, uint64(baseI-i)) 1494 i-- 1495 dAtA[i] = 0x1 1496 i-- 1497 dAtA[i] = 0xa2 1498 } 1499 } 1500 if len(m.URLSchemes) > 0 { 1501 for iNdEx := len(m.URLSchemes) - 1; iNdEx >= 0; iNdEx-- { 1502 i -= len(m.URLSchemes[iNdEx]) 1503 copy(dAtA[i:], m.URLSchemes[iNdEx]) 1504 i = encodeVarintCrates(dAtA, i, uint64(len(m.URLSchemes[iNdEx]))) 1505 i-- 1506 dAtA[i] = 0x1 1507 i-- 1508 dAtA[i] = 0x92 1509 } 1510 } 1511 if len(m.AppDownloadURLs) > 0 { 1512 for k := range m.AppDownloadURLs { 1513 v := m.AppDownloadURLs[k] 1514 baseI := i 1515 i -= len(v) 1516 copy(dAtA[i:], v) 1517 i = encodeVarintCrates(dAtA, i, uint64(len(v))) 1518 i-- 1519 dAtA[i] = 0x12 1520 i -= len(k) 1521 copy(dAtA[i:], k) 1522 i = encodeVarintCrates(dAtA, i, uint64(len(k))) 1523 i-- 1524 dAtA[i] = 0xa 1525 i = encodeVarintCrates(dAtA, i, uint64(baseI-i)) 1526 i-- 1527 dAtA[i] = 0x1 1528 i-- 1529 dAtA[i] = 0x82 1530 } 1531 } 1532 if len(m.CratesSnapshotURL) > 0 { 1533 i -= len(m.CratesSnapshotURL) 1534 copy(dAtA[i:], m.CratesSnapshotURL) 1535 i = encodeVarintCrates(dAtA, i, uint64(len(m.CratesSnapshotURL))) 1536 i-- 1537 dAtA[i] = 0x72 1538 } 1539 if len(m.AppHomeURL) > 0 { 1540 i -= len(m.AppHomeURL) 1541 copy(dAtA[i:], m.AppHomeURL) 1542 i = encodeVarintCrates(dAtA, i, uint64(len(m.AppHomeURL))) 1543 i-- 1544 dAtA[i] = 0x62 1545 } 1546 if len(m.OrgHomeURL) > 0 { 1547 i -= len(m.OrgHomeURL) 1548 copy(dAtA[i:], m.OrgHomeURL) 1549 i = encodeVarintCrates(dAtA, i, uint64(len(m.OrgHomeURL))) 1550 i-- 1551 dAtA[i] = 0x32 1552 } 1553 if len(m.AppDesc) > 0 { 1554 i -= len(m.AppDesc) 1555 copy(dAtA[i:], m.AppDesc) 1556 i = encodeVarintCrates(dAtA, i, uint64(len(m.AppDesc))) 1557 i-- 1558 dAtA[i] = 0x22 1559 } 1560 if len(m.AppDomain) > 0 { 1561 i -= len(m.AppDomain) 1562 copy(dAtA[i:], m.AppDomain) 1563 i = encodeVarintCrates(dAtA, i, uint64(len(m.AppDomain))) 1564 i-- 1565 dAtA[i] = 0x12 1566 } 1567 return len(dAtA) - i, nil 1568 } 1569 1570 func (m *AssetEntry) Marshal() (dAtA []byte, err error) { 1571 size := m.Size() 1572 dAtA = make([]byte, size) 1573 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1574 if err != nil { 1575 return nil, err 1576 } 1577 return dAtA[:n], nil 1578 } 1579 1580 func (m *AssetEntry) MarshalTo(dAtA []byte) (int, error) { 1581 size := m.Size() 1582 return m.MarshalToSizedBuffer(dAtA[:size]) 1583 } 1584 1585 func (m *AssetEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1586 i := len(dAtA) 1587 _ = i 1588 var l int 1589 _ = l 1590 if len(m.ShortDesc) > 0 { 1591 i -= len(m.ShortDesc) 1592 copy(dAtA[i:], m.ShortDesc) 1593 i = encodeVarintCrates(dAtA, i, uint64(len(m.ShortDesc))) 1594 i-- 1595 dAtA[i] = 0x2 1596 i-- 1597 dAtA[i] = 0x82 1598 } 1599 if len(m.Tags) > 0 { 1600 i -= len(m.Tags) 1601 copy(dAtA[i:], m.Tags) 1602 i = encodeVarintCrates(dAtA, i, uint64(len(m.Tags))) 1603 i-- 1604 dAtA[i] = 0x1 1605 i-- 1606 dAtA[i] = 0xfa 1607 } 1608 if len(m.LocalURI) > 0 { 1609 i -= len(m.LocalURI) 1610 copy(dAtA[i:], m.LocalURI) 1611 i = encodeVarintCrates(dAtA, i, uint64(len(m.LocalURI))) 1612 i-- 1613 dAtA[i] = 0x1 1614 i-- 1615 dAtA[i] = 0xf2 1616 } 1617 if m.ExtentsZ != 0 { 1618 i -= 4 1619 encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.ExtentsZ)))) 1620 i-- 1621 dAtA[i] = 0x65 1622 } 1623 if m.ExtentsY != 0 { 1624 i -= 4 1625 encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.ExtentsY)))) 1626 i-- 1627 dAtA[i] = 0x5d 1628 } 1629 if m.ExtentsX != 0 { 1630 i -= 4 1631 encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.ExtentsX)))) 1632 i-- 1633 dAtA[i] = 0x55 1634 } 1635 if m.CenterZ != 0 { 1636 i -= 4 1637 encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.CenterZ)))) 1638 i-- 1639 dAtA[i] = 0x3d 1640 } 1641 if m.CenterY != 0 { 1642 i -= 4 1643 encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.CenterY)))) 1644 i-- 1645 dAtA[i] = 0x35 1646 } 1647 if m.CenterX != 0 { 1648 i -= 4 1649 encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.CenterX)))) 1650 i-- 1651 dAtA[i] = 0x2d 1652 } 1653 if len(m.Label) > 0 { 1654 i -= len(m.Label) 1655 copy(dAtA[i:], m.Label) 1656 i = encodeVarintCrates(dAtA, i, uint64(len(m.Label))) 1657 i-- 1658 dAtA[i] = 0x1a 1659 } 1660 if len(m.EntryURI) > 0 { 1661 i -= len(m.EntryURI) 1662 copy(dAtA[i:], m.EntryURI) 1663 i = encodeVarintCrates(dAtA, i, uint64(len(m.EntryURI))) 1664 i-- 1665 dAtA[i] = 0x12 1666 } 1667 if m.Flags != 0 { 1668 i = encodeVarintCrates(dAtA, i, uint64(m.Flags)) 1669 i-- 1670 dAtA[i] = 0x8 1671 } 1672 return len(dAtA) - i, nil 1673 } 1674 1675 func (m *BundleManifest) Marshal() (dAtA []byte, err error) { 1676 size := m.Size() 1677 dAtA = make([]byte, size) 1678 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1679 if err != nil { 1680 return nil, err 1681 } 1682 return dAtA[:n], nil 1683 } 1684 1685 func (m *BundleManifest) MarshalTo(dAtA []byte) (int, error) { 1686 size := m.Size() 1687 return m.MarshalToSizedBuffer(dAtA[:size]) 1688 } 1689 1690 func (m *BundleManifest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1691 i := len(dAtA) 1692 _ = i 1693 var l int 1694 _ = l 1695 if m.LoadAllHint { 1696 i-- 1697 if m.LoadAllHint { 1698 dAtA[i] = 1 1699 } else { 1700 dAtA[i] = 0 1701 } 1702 i-- 1703 dAtA[i] = 0x1 1704 i-- 1705 dAtA[i] = 0xa0 1706 } 1707 if len(m.Assets) > 0 { 1708 for iNdEx := len(m.Assets) - 1; iNdEx >= 0; iNdEx-- { 1709 { 1710 size, err := m.Assets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1711 if err != nil { 1712 return 0, err 1713 } 1714 i -= size 1715 i = encodeVarintCrates(dAtA, i, uint64(size)) 1716 } 1717 i-- 1718 dAtA[i] = 0x52 1719 } 1720 } 1721 if len(m.BundleNameID) > 0 { 1722 i -= len(m.BundleNameID) 1723 copy(dAtA[i:], m.BundleNameID) 1724 i = encodeVarintCrates(dAtA, i, uint64(len(m.BundleNameID))) 1725 i-- 1726 dAtA[i] = 0x1a 1727 } 1728 if len(m.BundleTitle) > 0 { 1729 i -= len(m.BundleTitle) 1730 copy(dAtA[i:], m.BundleTitle) 1731 i = encodeVarintCrates(dAtA, i, uint64(len(m.BundleTitle))) 1732 i-- 1733 dAtA[i] = 0x12 1734 } 1735 return len(dAtA) - i, nil 1736 } 1737 1738 func (m *CrateInfo) Marshal() (dAtA []byte, err error) { 1739 size := m.Size() 1740 dAtA = make([]byte, size) 1741 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1742 if err != nil { 1743 return nil, err 1744 } 1745 return dAtA[:n], nil 1746 } 1747 1748 func (m *CrateInfo) MarshalTo(dAtA []byte) (int, error) { 1749 size := m.Size() 1750 return m.MarshalToSizedBuffer(dAtA[:size]) 1751 } 1752 1753 func (m *CrateInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1754 i := len(dAtA) 1755 _ = i 1756 var l int 1757 _ = l 1758 if m.ApproxSize != 0 { 1759 i = encodeVarintCrates(dAtA, i, uint64(m.ApproxSize)) 1760 i-- 1761 dAtA[i] = 0x3 1762 i-- 1763 dAtA[i] = 0xe0 1764 } 1765 if len(m.URL) > 0 { 1766 i -= len(m.URL) 1767 copy(dAtA[i:], m.URL) 1768 i = encodeVarintCrates(dAtA, i, uint64(len(m.URL))) 1769 i-- 1770 dAtA[i] = 0x3 1771 i-- 1772 dAtA[i] = 0xba 1773 } 1774 if len(m.HomeURL) > 0 { 1775 i -= len(m.HomeURL) 1776 copy(dAtA[i:], m.HomeURL) 1777 i = encodeVarintCrates(dAtA, i, uint64(len(m.HomeURL))) 1778 i-- 1779 dAtA[i] = 0x3 1780 i-- 1781 dAtA[i] = 0x92 1782 } 1783 if len(m.BuildID) > 0 { 1784 i -= len(m.BuildID) 1785 copy(dAtA[i:], m.BuildID) 1786 i = encodeVarintCrates(dAtA, i, uint64(len(m.BuildID))) 1787 i-- 1788 dAtA[i] = 0x2 1789 i-- 1790 dAtA[i] = 0xea 1791 } 1792 if m.BuildNumber != 0 { 1793 i = encodeVarintCrates(dAtA, i, uint64(m.BuildNumber)) 1794 i-- 1795 dAtA[i] = 0x2 1796 i-- 1797 dAtA[i] = 0xd0 1798 } 1799 if m.MinorVersion != 0 { 1800 i = encodeVarintCrates(dAtA, i, uint64(m.MinorVersion)) 1801 i-- 1802 dAtA[i] = 0x2 1803 i-- 1804 dAtA[i] = 0xc8 1805 } 1806 if m.MajorVersion != 0 { 1807 i = encodeVarintCrates(dAtA, i, uint64(m.MajorVersion)) 1808 i-- 1809 dAtA[i] = 0x2 1810 i-- 1811 dAtA[i] = 0xc0 1812 } 1813 if m.TimeBuilt != 0 { 1814 i = encodeVarintCrates(dAtA, i, uint64(m.TimeBuilt)) 1815 i-- 1816 dAtA[i] = 0x1 1817 i-- 1818 dAtA[i] = 0xf8 1819 } 1820 if m.TimeCreated != 0 { 1821 i = encodeVarintCrates(dAtA, i, uint64(m.TimeCreated)) 1822 i-- 1823 dAtA[i] = 0x1 1824 i-- 1825 dAtA[i] = 0xf0 1826 } 1827 if len(m.Tags) > 0 { 1828 i -= len(m.Tags) 1829 copy(dAtA[i:], m.Tags) 1830 i = encodeVarintCrates(dAtA, i, uint64(len(m.Tags))) 1831 i-- 1832 dAtA[i] = 0x7a 1833 } 1834 if len(m.ShortDesc) > 0 { 1835 i -= len(m.ShortDesc) 1836 copy(dAtA[i:], m.ShortDesc) 1837 i = encodeVarintCrates(dAtA, i, uint64(len(m.ShortDesc))) 1838 i-- 1839 dAtA[i] = 0x5a 1840 } 1841 if len(m.CrateName) > 0 { 1842 i -= len(m.CrateName) 1843 copy(dAtA[i:], m.CrateName) 1844 i = encodeVarintCrates(dAtA, i, uint64(len(m.CrateName))) 1845 i-- 1846 dAtA[i] = 0x52 1847 } 1848 if len(m.PublisherName) > 0 { 1849 i -= len(m.PublisherName) 1850 copy(dAtA[i:], m.PublisherName) 1851 i = encodeVarintCrates(dAtA, i, uint64(len(m.PublisherName))) 1852 i-- 1853 dAtA[i] = 0x32 1854 } 1855 if len(m.CrateURI) > 0 { 1856 i -= len(m.CrateURI) 1857 copy(dAtA[i:], m.CrateURI) 1858 i = encodeVarintCrates(dAtA, i, uint64(len(m.CrateURI))) 1859 i-- 1860 dAtA[i] = 0x22 1861 } 1862 if m.InstID != 0 { 1863 i = encodeVarintCrates(dAtA, i, uint64(m.InstID)) 1864 i-- 1865 dAtA[i] = 0x10 1866 } 1867 if m.CrateSchema != 0 { 1868 i = encodeVarintCrates(dAtA, i, uint64(m.CrateSchema)) 1869 i-- 1870 dAtA[i] = 0x8 1871 } 1872 return len(dAtA) - i, nil 1873 } 1874 1875 func (m *CrateManifest) Marshal() (dAtA []byte, err error) { 1876 size := m.Size() 1877 dAtA = make([]byte, size) 1878 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1879 if err != nil { 1880 return nil, err 1881 } 1882 return dAtA[:n], nil 1883 } 1884 1885 func (m *CrateManifest) MarshalTo(dAtA []byte) (int, error) { 1886 size := m.Size() 1887 return m.MarshalToSizedBuffer(dAtA[:size]) 1888 } 1889 1890 func (m *CrateManifest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1891 i := len(dAtA) 1892 _ = i 1893 var l int 1894 _ = l 1895 if len(m.Bundles) > 0 { 1896 for iNdEx := len(m.Bundles) - 1; iNdEx >= 0; iNdEx-- { 1897 { 1898 size, err := m.Bundles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1899 if err != nil { 1900 return 0, err 1901 } 1902 i -= size 1903 i = encodeVarintCrates(dAtA, i, uint64(size)) 1904 } 1905 i-- 1906 dAtA[i] = 0x52 1907 } 1908 } 1909 if len(m.IconBundleName) > 0 { 1910 i -= len(m.IconBundleName) 1911 copy(dAtA[i:], m.IconBundleName) 1912 i = encodeVarintCrates(dAtA, i, uint64(len(m.IconBundleName))) 1913 i-- 1914 dAtA[i] = 0x2a 1915 } 1916 if m.Info != nil { 1917 { 1918 size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) 1919 if err != nil { 1920 return 0, err 1921 } 1922 i -= size 1923 i = encodeVarintCrates(dAtA, i, uint64(size)) 1924 } 1925 i-- 1926 dAtA[i] = 0xa 1927 } 1928 return len(dAtA) - i, nil 1929 } 1930 1931 func (m *CratesSnapshot) Marshal() (dAtA []byte, err error) { 1932 size := m.Size() 1933 dAtA = make([]byte, size) 1934 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1935 if err != nil { 1936 return nil, err 1937 } 1938 return dAtA[:n], nil 1939 } 1940 1941 func (m *CratesSnapshot) MarshalTo(dAtA []byte) (int, error) { 1942 size := m.Size() 1943 return m.MarshalToSizedBuffer(dAtA[:size]) 1944 } 1945 1946 func (m *CratesSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1947 i := len(dAtA) 1948 _ = i 1949 var l int 1950 _ = l 1951 if len(m.Crates) > 0 { 1952 for iNdEx := len(m.Crates) - 1; iNdEx >= 0; iNdEx-- { 1953 { 1954 size, err := m.Crates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1955 if err != nil { 1956 return 0, err 1957 } 1958 i -= size 1959 i = encodeVarintCrates(dAtA, i, uint64(size)) 1960 } 1961 i-- 1962 dAtA[i] = 0x52 1963 } 1964 } 1965 if len(m.DownloadURL) > 0 { 1966 i -= len(m.DownloadURL) 1967 copy(dAtA[i:], m.DownloadURL) 1968 i = encodeVarintCrates(dAtA, i, uint64(len(m.DownloadURL))) 1969 i-- 1970 dAtA[i] = 0x1a 1971 } 1972 if m.RevID != 0 { 1973 i = encodeVarintCrates(dAtA, i, uint64(m.RevID)) 1974 i-- 1975 dAtA[i] = 0x8 1976 } 1977 return len(dAtA) - i, nil 1978 } 1979 1980 func encodeVarintCrates(dAtA []byte, offset int, v uint64) int { 1981 offset -= sovCrates(v) 1982 base := offset 1983 for v >= 1<<7 { 1984 dAtA[offset] = uint8(v&0x7f | 0x80) 1985 v >>= 7 1986 offset++ 1987 } 1988 dAtA[offset] = uint8(v) 1989 return base 1990 } 1991 func (m *KVEntry) Size() (n int) { 1992 if m == nil { 1993 return 0 1994 } 1995 var l int 1996 _ = l 1997 l = len(m.Key) 1998 if l > 0 { 1999 n += 1 + l + sovCrates(uint64(l)) 2000 } 2001 l = len(m.Value) 2002 if l > 0 { 2003 n += 1 + l + sovCrates(uint64(l)) 2004 } 2005 return n 2006 } 2007 2008 func (m *AppVars) Size() (n int) { 2009 if m == nil { 2010 return 0 2011 } 2012 var l int 2013 _ = l 2014 l = len(m.AppDomain) 2015 if l > 0 { 2016 n += 1 + l + sovCrates(uint64(l)) 2017 } 2018 l = len(m.AppDesc) 2019 if l > 0 { 2020 n += 1 + l + sovCrates(uint64(l)) 2021 } 2022 l = len(m.OrgHomeURL) 2023 if l > 0 { 2024 n += 1 + l + sovCrates(uint64(l)) 2025 } 2026 l = len(m.AppHomeURL) 2027 if l > 0 { 2028 n += 1 + l + sovCrates(uint64(l)) 2029 } 2030 l = len(m.CratesSnapshotURL) 2031 if l > 0 { 2032 n += 1 + l + sovCrates(uint64(l)) 2033 } 2034 if len(m.AppDownloadURLs) > 0 { 2035 for k, v := range m.AppDownloadURLs { 2036 _ = k 2037 _ = v 2038 mapEntrySize := 1 + len(k) + sovCrates(uint64(len(k))) + 1 + len(v) + sovCrates(uint64(len(v))) 2039 n += mapEntrySize + 2 + sovCrates(uint64(mapEntrySize)) 2040 } 2041 } 2042 if len(m.URLSchemes) > 0 { 2043 for _, s := range m.URLSchemes { 2044 l = len(s) 2045 n += 2 + l + sovCrates(uint64(l)) 2046 } 2047 } 2048 if len(m.Settings) > 0 { 2049 for k, v := range m.Settings { 2050 _ = k 2051 _ = v 2052 mapEntrySize := 1 + len(k) + sovCrates(uint64(len(k))) + 1 + len(v) + sovCrates(uint64(len(v))) 2053 n += mapEntrySize + 2 + sovCrates(uint64(mapEntrySize)) 2054 } 2055 } 2056 if len(m.Links) > 0 { 2057 for _, e := range m.Links { 2058 l = e.Size() 2059 n += 2 + l + sovCrates(uint64(l)) 2060 } 2061 } 2062 return n 2063 } 2064 2065 func (m *AssetEntry) Size() (n int) { 2066 if m == nil { 2067 return 0 2068 } 2069 var l int 2070 _ = l 2071 if m.Flags != 0 { 2072 n += 1 + sovCrates(uint64(m.Flags)) 2073 } 2074 l = len(m.EntryURI) 2075 if l > 0 { 2076 n += 1 + l + sovCrates(uint64(l)) 2077 } 2078 l = len(m.Label) 2079 if l > 0 { 2080 n += 1 + l + sovCrates(uint64(l)) 2081 } 2082 if m.CenterX != 0 { 2083 n += 5 2084 } 2085 if m.CenterY != 0 { 2086 n += 5 2087 } 2088 if m.CenterZ != 0 { 2089 n += 5 2090 } 2091 if m.ExtentsX != 0 { 2092 n += 5 2093 } 2094 if m.ExtentsY != 0 { 2095 n += 5 2096 } 2097 if m.ExtentsZ != 0 { 2098 n += 5 2099 } 2100 l = len(m.LocalURI) 2101 if l > 0 { 2102 n += 2 + l + sovCrates(uint64(l)) 2103 } 2104 l = len(m.Tags) 2105 if l > 0 { 2106 n += 2 + l + sovCrates(uint64(l)) 2107 } 2108 l = len(m.ShortDesc) 2109 if l > 0 { 2110 n += 2 + l + sovCrates(uint64(l)) 2111 } 2112 return n 2113 } 2114 2115 func (m *BundleManifest) Size() (n int) { 2116 if m == nil { 2117 return 0 2118 } 2119 var l int 2120 _ = l 2121 l = len(m.BundleTitle) 2122 if l > 0 { 2123 n += 1 + l + sovCrates(uint64(l)) 2124 } 2125 l = len(m.BundleNameID) 2126 if l > 0 { 2127 n += 1 + l + sovCrates(uint64(l)) 2128 } 2129 if len(m.Assets) > 0 { 2130 for _, e := range m.Assets { 2131 l = e.Size() 2132 n += 1 + l + sovCrates(uint64(l)) 2133 } 2134 } 2135 if m.LoadAllHint { 2136 n += 3 2137 } 2138 return n 2139 } 2140 2141 func (m *CrateInfo) Size() (n int) { 2142 if m == nil { 2143 return 0 2144 } 2145 var l int 2146 _ = l 2147 if m.CrateSchema != 0 { 2148 n += 1 + sovCrates(uint64(m.CrateSchema)) 2149 } 2150 if m.InstID != 0 { 2151 n += 1 + sovCrates(uint64(m.InstID)) 2152 } 2153 l = len(m.CrateURI) 2154 if l > 0 { 2155 n += 1 + l + sovCrates(uint64(l)) 2156 } 2157 l = len(m.PublisherName) 2158 if l > 0 { 2159 n += 1 + l + sovCrates(uint64(l)) 2160 } 2161 l = len(m.CrateName) 2162 if l > 0 { 2163 n += 1 + l + sovCrates(uint64(l)) 2164 } 2165 l = len(m.ShortDesc) 2166 if l > 0 { 2167 n += 1 + l + sovCrates(uint64(l)) 2168 } 2169 l = len(m.Tags) 2170 if l > 0 { 2171 n += 1 + l + sovCrates(uint64(l)) 2172 } 2173 if m.TimeCreated != 0 { 2174 n += 2 + sovCrates(uint64(m.TimeCreated)) 2175 } 2176 if m.TimeBuilt != 0 { 2177 n += 2 + sovCrates(uint64(m.TimeBuilt)) 2178 } 2179 if m.MajorVersion != 0 { 2180 n += 2 + sovCrates(uint64(m.MajorVersion)) 2181 } 2182 if m.MinorVersion != 0 { 2183 n += 2 + sovCrates(uint64(m.MinorVersion)) 2184 } 2185 if m.BuildNumber != 0 { 2186 n += 2 + sovCrates(uint64(m.BuildNumber)) 2187 } 2188 l = len(m.BuildID) 2189 if l > 0 { 2190 n += 2 + l + sovCrates(uint64(l)) 2191 } 2192 l = len(m.HomeURL) 2193 if l > 0 { 2194 n += 2 + l + sovCrates(uint64(l)) 2195 } 2196 l = len(m.URL) 2197 if l > 0 { 2198 n += 2 + l + sovCrates(uint64(l)) 2199 } 2200 if m.ApproxSize != 0 { 2201 n += 2 + sovCrates(uint64(m.ApproxSize)) 2202 } 2203 return n 2204 } 2205 2206 func (m *CrateManifest) Size() (n int) { 2207 if m == nil { 2208 return 0 2209 } 2210 var l int 2211 _ = l 2212 if m.Info != nil { 2213 l = m.Info.Size() 2214 n += 1 + l + sovCrates(uint64(l)) 2215 } 2216 l = len(m.IconBundleName) 2217 if l > 0 { 2218 n += 1 + l + sovCrates(uint64(l)) 2219 } 2220 if len(m.Bundles) > 0 { 2221 for _, e := range m.Bundles { 2222 l = e.Size() 2223 n += 1 + l + sovCrates(uint64(l)) 2224 } 2225 } 2226 return n 2227 } 2228 2229 func (m *CratesSnapshot) Size() (n int) { 2230 if m == nil { 2231 return 0 2232 } 2233 var l int 2234 _ = l 2235 if m.RevID != 0 { 2236 n += 1 + sovCrates(uint64(m.RevID)) 2237 } 2238 l = len(m.DownloadURL) 2239 if l > 0 { 2240 n += 1 + l + sovCrates(uint64(l)) 2241 } 2242 if len(m.Crates) > 0 { 2243 for _, e := range m.Crates { 2244 l = e.Size() 2245 n += 1 + l + sovCrates(uint64(l)) 2246 } 2247 } 2248 return n 2249 } 2250 2251 func sovCrates(x uint64) (n int) { 2252 return (math_bits.Len64(x|1) + 6) / 7 2253 } 2254 func sozCrates(x uint64) (n int) { 2255 return sovCrates(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 2256 } 2257 func (this *KVEntry) String() string { 2258 if this == nil { 2259 return "nil" 2260 } 2261 s := strings.Join([]string{`&KVEntry{`, 2262 `Key:` + fmt.Sprintf("%v", this.Key) + `,`, 2263 `Value:` + fmt.Sprintf("%v", this.Value) + `,`, 2264 `}`, 2265 }, "") 2266 return s 2267 } 2268 func (this *AppVars) String() string { 2269 if this == nil { 2270 return "nil" 2271 } 2272 repeatedStringForLinks := "[]*KVEntry{" 2273 for _, f := range this.Links { 2274 repeatedStringForLinks += strings.Replace(f.String(), "KVEntry", "KVEntry", 1) + "," 2275 } 2276 repeatedStringForLinks += "}" 2277 keysForAppDownloadURLs := make([]string, 0, len(this.AppDownloadURLs)) 2278 for k, _ := range this.AppDownloadURLs { 2279 keysForAppDownloadURLs = append(keysForAppDownloadURLs, k) 2280 } 2281 github_com_gogo_protobuf_sortkeys.Strings(keysForAppDownloadURLs) 2282 mapStringForAppDownloadURLs := "map[string]string{" 2283 for _, k := range keysForAppDownloadURLs { 2284 mapStringForAppDownloadURLs += fmt.Sprintf("%v: %v,", k, this.AppDownloadURLs[k]) 2285 } 2286 mapStringForAppDownloadURLs += "}" 2287 keysForSettings := make([]string, 0, len(this.Settings)) 2288 for k, _ := range this.Settings { 2289 keysForSettings = append(keysForSettings, k) 2290 } 2291 github_com_gogo_protobuf_sortkeys.Strings(keysForSettings) 2292 mapStringForSettings := "map[string]string{" 2293 for _, k := range keysForSettings { 2294 mapStringForSettings += fmt.Sprintf("%v: %v,", k, this.Settings[k]) 2295 } 2296 mapStringForSettings += "}" 2297 s := strings.Join([]string{`&AppVars{`, 2298 `AppDomain:` + fmt.Sprintf("%v", this.AppDomain) + `,`, 2299 `AppDesc:` + fmt.Sprintf("%v", this.AppDesc) + `,`, 2300 `OrgHomeURL:` + fmt.Sprintf("%v", this.OrgHomeURL) + `,`, 2301 `AppHomeURL:` + fmt.Sprintf("%v", this.AppHomeURL) + `,`, 2302 `CratesSnapshotURL:` + fmt.Sprintf("%v", this.CratesSnapshotURL) + `,`, 2303 `AppDownloadURLs:` + mapStringForAppDownloadURLs + `,`, 2304 `URLSchemes:` + fmt.Sprintf("%v", this.URLSchemes) + `,`, 2305 `Settings:` + mapStringForSettings + `,`, 2306 `Links:` + repeatedStringForLinks + `,`, 2307 `}`, 2308 }, "") 2309 return s 2310 } 2311 func (this *AssetEntry) String() string { 2312 if this == nil { 2313 return "nil" 2314 } 2315 s := strings.Join([]string{`&AssetEntry{`, 2316 `Flags:` + fmt.Sprintf("%v", this.Flags) + `,`, 2317 `EntryURI:` + fmt.Sprintf("%v", this.EntryURI) + `,`, 2318 `Label:` + fmt.Sprintf("%v", this.Label) + `,`, 2319 `CenterX:` + fmt.Sprintf("%v", this.CenterX) + `,`, 2320 `CenterY:` + fmt.Sprintf("%v", this.CenterY) + `,`, 2321 `CenterZ:` + fmt.Sprintf("%v", this.CenterZ) + `,`, 2322 `ExtentsX:` + fmt.Sprintf("%v", this.ExtentsX) + `,`, 2323 `ExtentsY:` + fmt.Sprintf("%v", this.ExtentsY) + `,`, 2324 `ExtentsZ:` + fmt.Sprintf("%v", this.ExtentsZ) + `,`, 2325 `LocalURI:` + fmt.Sprintf("%v", this.LocalURI) + `,`, 2326 `Tags:` + fmt.Sprintf("%v", this.Tags) + `,`, 2327 `ShortDesc:` + fmt.Sprintf("%v", this.ShortDesc) + `,`, 2328 `}`, 2329 }, "") 2330 return s 2331 } 2332 func (this *BundleManifest) String() string { 2333 if this == nil { 2334 return "nil" 2335 } 2336 repeatedStringForAssets := "[]*AssetEntry{" 2337 for _, f := range this.Assets { 2338 repeatedStringForAssets += strings.Replace(f.String(), "AssetEntry", "AssetEntry", 1) + "," 2339 } 2340 repeatedStringForAssets += "}" 2341 s := strings.Join([]string{`&BundleManifest{`, 2342 `BundleTitle:` + fmt.Sprintf("%v", this.BundleTitle) + `,`, 2343 `BundleNameID:` + fmt.Sprintf("%v", this.BundleNameID) + `,`, 2344 `Assets:` + repeatedStringForAssets + `,`, 2345 `LoadAllHint:` + fmt.Sprintf("%v", this.LoadAllHint) + `,`, 2346 `}`, 2347 }, "") 2348 return s 2349 } 2350 func (this *CrateInfo) String() string { 2351 if this == nil { 2352 return "nil" 2353 } 2354 s := strings.Join([]string{`&CrateInfo{`, 2355 `CrateSchema:` + fmt.Sprintf("%v", this.CrateSchema) + `,`, 2356 `InstID:` + fmt.Sprintf("%v", this.InstID) + `,`, 2357 `CrateURI:` + fmt.Sprintf("%v", this.CrateURI) + `,`, 2358 `PublisherName:` + fmt.Sprintf("%v", this.PublisherName) + `,`, 2359 `CrateName:` + fmt.Sprintf("%v", this.CrateName) + `,`, 2360 `ShortDesc:` + fmt.Sprintf("%v", this.ShortDesc) + `,`, 2361 `Tags:` + fmt.Sprintf("%v", this.Tags) + `,`, 2362 `TimeCreated:` + fmt.Sprintf("%v", this.TimeCreated) + `,`, 2363 `TimeBuilt:` + fmt.Sprintf("%v", this.TimeBuilt) + `,`, 2364 `MajorVersion:` + fmt.Sprintf("%v", this.MajorVersion) + `,`, 2365 `MinorVersion:` + fmt.Sprintf("%v", this.MinorVersion) + `,`, 2366 `BuildNumber:` + fmt.Sprintf("%v", this.BuildNumber) + `,`, 2367 `BuildID:` + fmt.Sprintf("%v", this.BuildID) + `,`, 2368 `HomeURL:` + fmt.Sprintf("%v", this.HomeURL) + `,`, 2369 `URL:` + fmt.Sprintf("%v", this.URL) + `,`, 2370 `ApproxSize:` + fmt.Sprintf("%v", this.ApproxSize) + `,`, 2371 `}`, 2372 }, "") 2373 return s 2374 } 2375 func (this *CrateManifest) String() string { 2376 if this == nil { 2377 return "nil" 2378 } 2379 repeatedStringForBundles := "[]*BundleManifest{" 2380 for _, f := range this.Bundles { 2381 repeatedStringForBundles += strings.Replace(f.String(), "BundleManifest", "BundleManifest", 1) + "," 2382 } 2383 repeatedStringForBundles += "}" 2384 s := strings.Join([]string{`&CrateManifest{`, 2385 `Info:` + strings.Replace(this.Info.String(), "CrateInfo", "CrateInfo", 1) + `,`, 2386 `IconBundleName:` + fmt.Sprintf("%v", this.IconBundleName) + `,`, 2387 `Bundles:` + repeatedStringForBundles + `,`, 2388 `}`, 2389 }, "") 2390 return s 2391 } 2392 func (this *CratesSnapshot) String() string { 2393 if this == nil { 2394 return "nil" 2395 } 2396 repeatedStringForCrates := "[]*CrateInfo{" 2397 for _, f := range this.Crates { 2398 repeatedStringForCrates += strings.Replace(f.String(), "CrateInfo", "CrateInfo", 1) + "," 2399 } 2400 repeatedStringForCrates += "}" 2401 s := strings.Join([]string{`&CratesSnapshot{`, 2402 `RevID:` + fmt.Sprintf("%v", this.RevID) + `,`, 2403 `DownloadURL:` + fmt.Sprintf("%v", this.DownloadURL) + `,`, 2404 `Crates:` + repeatedStringForCrates + `,`, 2405 `}`, 2406 }, "") 2407 return s 2408 } 2409 func valueToStringCrates(v interface{}) string { 2410 rv := reflect.ValueOf(v) 2411 if rv.IsNil() { 2412 return "nil" 2413 } 2414 pv := reflect.Indirect(rv).Interface() 2415 return fmt.Sprintf("*%v", pv) 2416 } 2417 func (m *KVEntry) Unmarshal(dAtA []byte) error { 2418 l := len(dAtA) 2419 iNdEx := 0 2420 for iNdEx < l { 2421 preIndex := iNdEx 2422 var wire uint64 2423 for shift := uint(0); ; shift += 7 { 2424 if shift >= 64 { 2425 return ErrIntOverflowCrates 2426 } 2427 if iNdEx >= l { 2428 return io.ErrUnexpectedEOF 2429 } 2430 b := dAtA[iNdEx] 2431 iNdEx++ 2432 wire |= uint64(b&0x7F) << shift 2433 if b < 0x80 { 2434 break 2435 } 2436 } 2437 fieldNum := int32(wire >> 3) 2438 wireType := int(wire & 0x7) 2439 if wireType == 4 { 2440 return fmt.Errorf("proto: KVEntry: wiretype end group for non-group") 2441 } 2442 if fieldNum <= 0 { 2443 return fmt.Errorf("proto: KVEntry: illegal tag %d (wire type %d)", fieldNum, wire) 2444 } 2445 switch fieldNum { 2446 case 1: 2447 if wireType != 2 { 2448 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 2449 } 2450 var stringLen uint64 2451 for shift := uint(0); ; shift += 7 { 2452 if shift >= 64 { 2453 return ErrIntOverflowCrates 2454 } 2455 if iNdEx >= l { 2456 return io.ErrUnexpectedEOF 2457 } 2458 b := dAtA[iNdEx] 2459 iNdEx++ 2460 stringLen |= uint64(b&0x7F) << shift 2461 if b < 0x80 { 2462 break 2463 } 2464 } 2465 intStringLen := int(stringLen) 2466 if intStringLen < 0 { 2467 return ErrInvalidLengthCrates 2468 } 2469 postIndex := iNdEx + intStringLen 2470 if postIndex < 0 { 2471 return ErrInvalidLengthCrates 2472 } 2473 if postIndex > l { 2474 return io.ErrUnexpectedEOF 2475 } 2476 m.Key = string(dAtA[iNdEx:postIndex]) 2477 iNdEx = postIndex 2478 case 2: 2479 if wireType != 2 { 2480 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 2481 } 2482 var stringLen uint64 2483 for shift := uint(0); ; shift += 7 { 2484 if shift >= 64 { 2485 return ErrIntOverflowCrates 2486 } 2487 if iNdEx >= l { 2488 return io.ErrUnexpectedEOF 2489 } 2490 b := dAtA[iNdEx] 2491 iNdEx++ 2492 stringLen |= uint64(b&0x7F) << shift 2493 if b < 0x80 { 2494 break 2495 } 2496 } 2497 intStringLen := int(stringLen) 2498 if intStringLen < 0 { 2499 return ErrInvalidLengthCrates 2500 } 2501 postIndex := iNdEx + intStringLen 2502 if postIndex < 0 { 2503 return ErrInvalidLengthCrates 2504 } 2505 if postIndex > l { 2506 return io.ErrUnexpectedEOF 2507 } 2508 m.Value = string(dAtA[iNdEx:postIndex]) 2509 iNdEx = postIndex 2510 default: 2511 iNdEx = preIndex 2512 skippy, err := skipCrates(dAtA[iNdEx:]) 2513 if err != nil { 2514 return err 2515 } 2516 if (skippy < 0) || (iNdEx+skippy) < 0 { 2517 return ErrInvalidLengthCrates 2518 } 2519 if (iNdEx + skippy) > l { 2520 return io.ErrUnexpectedEOF 2521 } 2522 iNdEx += skippy 2523 } 2524 } 2525 2526 if iNdEx > l { 2527 return io.ErrUnexpectedEOF 2528 } 2529 return nil 2530 } 2531 func (m *AppVars) Unmarshal(dAtA []byte) error { 2532 l := len(dAtA) 2533 iNdEx := 0 2534 for iNdEx < l { 2535 preIndex := iNdEx 2536 var wire uint64 2537 for shift := uint(0); ; shift += 7 { 2538 if shift >= 64 { 2539 return ErrIntOverflowCrates 2540 } 2541 if iNdEx >= l { 2542 return io.ErrUnexpectedEOF 2543 } 2544 b := dAtA[iNdEx] 2545 iNdEx++ 2546 wire |= uint64(b&0x7F) << shift 2547 if b < 0x80 { 2548 break 2549 } 2550 } 2551 fieldNum := int32(wire >> 3) 2552 wireType := int(wire & 0x7) 2553 if wireType == 4 { 2554 return fmt.Errorf("proto: AppVars: wiretype end group for non-group") 2555 } 2556 if fieldNum <= 0 { 2557 return fmt.Errorf("proto: AppVars: illegal tag %d (wire type %d)", fieldNum, wire) 2558 } 2559 switch fieldNum { 2560 case 2: 2561 if wireType != 2 { 2562 return fmt.Errorf("proto: wrong wireType = %d for field AppDomain", wireType) 2563 } 2564 var stringLen uint64 2565 for shift := uint(0); ; shift += 7 { 2566 if shift >= 64 { 2567 return ErrIntOverflowCrates 2568 } 2569 if iNdEx >= l { 2570 return io.ErrUnexpectedEOF 2571 } 2572 b := dAtA[iNdEx] 2573 iNdEx++ 2574 stringLen |= uint64(b&0x7F) << shift 2575 if b < 0x80 { 2576 break 2577 } 2578 } 2579 intStringLen := int(stringLen) 2580 if intStringLen < 0 { 2581 return ErrInvalidLengthCrates 2582 } 2583 postIndex := iNdEx + intStringLen 2584 if postIndex < 0 { 2585 return ErrInvalidLengthCrates 2586 } 2587 if postIndex > l { 2588 return io.ErrUnexpectedEOF 2589 } 2590 m.AppDomain = string(dAtA[iNdEx:postIndex]) 2591 iNdEx = postIndex 2592 case 4: 2593 if wireType != 2 { 2594 return fmt.Errorf("proto: wrong wireType = %d for field AppDesc", wireType) 2595 } 2596 var stringLen uint64 2597 for shift := uint(0); ; shift += 7 { 2598 if shift >= 64 { 2599 return ErrIntOverflowCrates 2600 } 2601 if iNdEx >= l { 2602 return io.ErrUnexpectedEOF 2603 } 2604 b := dAtA[iNdEx] 2605 iNdEx++ 2606 stringLen |= uint64(b&0x7F) << shift 2607 if b < 0x80 { 2608 break 2609 } 2610 } 2611 intStringLen := int(stringLen) 2612 if intStringLen < 0 { 2613 return ErrInvalidLengthCrates 2614 } 2615 postIndex := iNdEx + intStringLen 2616 if postIndex < 0 { 2617 return ErrInvalidLengthCrates 2618 } 2619 if postIndex > l { 2620 return io.ErrUnexpectedEOF 2621 } 2622 m.AppDesc = string(dAtA[iNdEx:postIndex]) 2623 iNdEx = postIndex 2624 case 6: 2625 if wireType != 2 { 2626 return fmt.Errorf("proto: wrong wireType = %d for field OrgHomeURL", wireType) 2627 } 2628 var stringLen uint64 2629 for shift := uint(0); ; shift += 7 { 2630 if shift >= 64 { 2631 return ErrIntOverflowCrates 2632 } 2633 if iNdEx >= l { 2634 return io.ErrUnexpectedEOF 2635 } 2636 b := dAtA[iNdEx] 2637 iNdEx++ 2638 stringLen |= uint64(b&0x7F) << shift 2639 if b < 0x80 { 2640 break 2641 } 2642 } 2643 intStringLen := int(stringLen) 2644 if intStringLen < 0 { 2645 return ErrInvalidLengthCrates 2646 } 2647 postIndex := iNdEx + intStringLen 2648 if postIndex < 0 { 2649 return ErrInvalidLengthCrates 2650 } 2651 if postIndex > l { 2652 return io.ErrUnexpectedEOF 2653 } 2654 m.OrgHomeURL = string(dAtA[iNdEx:postIndex]) 2655 iNdEx = postIndex 2656 case 12: 2657 if wireType != 2 { 2658 return fmt.Errorf("proto: wrong wireType = %d for field AppHomeURL", wireType) 2659 } 2660 var stringLen uint64 2661 for shift := uint(0); ; shift += 7 { 2662 if shift >= 64 { 2663 return ErrIntOverflowCrates 2664 } 2665 if iNdEx >= l { 2666 return io.ErrUnexpectedEOF 2667 } 2668 b := dAtA[iNdEx] 2669 iNdEx++ 2670 stringLen |= uint64(b&0x7F) << shift 2671 if b < 0x80 { 2672 break 2673 } 2674 } 2675 intStringLen := int(stringLen) 2676 if intStringLen < 0 { 2677 return ErrInvalidLengthCrates 2678 } 2679 postIndex := iNdEx + intStringLen 2680 if postIndex < 0 { 2681 return ErrInvalidLengthCrates 2682 } 2683 if postIndex > l { 2684 return io.ErrUnexpectedEOF 2685 } 2686 m.AppHomeURL = string(dAtA[iNdEx:postIndex]) 2687 iNdEx = postIndex 2688 case 14: 2689 if wireType != 2 { 2690 return fmt.Errorf("proto: wrong wireType = %d for field CratesSnapshotURL", wireType) 2691 } 2692 var stringLen uint64 2693 for shift := uint(0); ; shift += 7 { 2694 if shift >= 64 { 2695 return ErrIntOverflowCrates 2696 } 2697 if iNdEx >= l { 2698 return io.ErrUnexpectedEOF 2699 } 2700 b := dAtA[iNdEx] 2701 iNdEx++ 2702 stringLen |= uint64(b&0x7F) << shift 2703 if b < 0x80 { 2704 break 2705 } 2706 } 2707 intStringLen := int(stringLen) 2708 if intStringLen < 0 { 2709 return ErrInvalidLengthCrates 2710 } 2711 postIndex := iNdEx + intStringLen 2712 if postIndex < 0 { 2713 return ErrInvalidLengthCrates 2714 } 2715 if postIndex > l { 2716 return io.ErrUnexpectedEOF 2717 } 2718 m.CratesSnapshotURL = string(dAtA[iNdEx:postIndex]) 2719 iNdEx = postIndex 2720 case 16: 2721 if wireType != 2 { 2722 return fmt.Errorf("proto: wrong wireType = %d for field AppDownloadURLs", wireType) 2723 } 2724 var msglen int 2725 for shift := uint(0); ; shift += 7 { 2726 if shift >= 64 { 2727 return ErrIntOverflowCrates 2728 } 2729 if iNdEx >= l { 2730 return io.ErrUnexpectedEOF 2731 } 2732 b := dAtA[iNdEx] 2733 iNdEx++ 2734 msglen |= int(b&0x7F) << shift 2735 if b < 0x80 { 2736 break 2737 } 2738 } 2739 if msglen < 0 { 2740 return ErrInvalidLengthCrates 2741 } 2742 postIndex := iNdEx + msglen 2743 if postIndex < 0 { 2744 return ErrInvalidLengthCrates 2745 } 2746 if postIndex > l { 2747 return io.ErrUnexpectedEOF 2748 } 2749 if m.AppDownloadURLs == nil { 2750 m.AppDownloadURLs = make(map[string]string) 2751 } 2752 var mapkey string 2753 var mapvalue string 2754 for iNdEx < postIndex { 2755 entryPreIndex := iNdEx 2756 var wire uint64 2757 for shift := uint(0); ; shift += 7 { 2758 if shift >= 64 { 2759 return ErrIntOverflowCrates 2760 } 2761 if iNdEx >= l { 2762 return io.ErrUnexpectedEOF 2763 } 2764 b := dAtA[iNdEx] 2765 iNdEx++ 2766 wire |= uint64(b&0x7F) << shift 2767 if b < 0x80 { 2768 break 2769 } 2770 } 2771 fieldNum := int32(wire >> 3) 2772 if fieldNum == 1 { 2773 var stringLenmapkey uint64 2774 for shift := uint(0); ; shift += 7 { 2775 if shift >= 64 { 2776 return ErrIntOverflowCrates 2777 } 2778 if iNdEx >= l { 2779 return io.ErrUnexpectedEOF 2780 } 2781 b := dAtA[iNdEx] 2782 iNdEx++ 2783 stringLenmapkey |= uint64(b&0x7F) << shift 2784 if b < 0x80 { 2785 break 2786 } 2787 } 2788 intStringLenmapkey := int(stringLenmapkey) 2789 if intStringLenmapkey < 0 { 2790 return ErrInvalidLengthCrates 2791 } 2792 postStringIndexmapkey := iNdEx + intStringLenmapkey 2793 if postStringIndexmapkey < 0 { 2794 return ErrInvalidLengthCrates 2795 } 2796 if postStringIndexmapkey > l { 2797 return io.ErrUnexpectedEOF 2798 } 2799 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 2800 iNdEx = postStringIndexmapkey 2801 } else if fieldNum == 2 { 2802 var stringLenmapvalue uint64 2803 for shift := uint(0); ; shift += 7 { 2804 if shift >= 64 { 2805 return ErrIntOverflowCrates 2806 } 2807 if iNdEx >= l { 2808 return io.ErrUnexpectedEOF 2809 } 2810 b := dAtA[iNdEx] 2811 iNdEx++ 2812 stringLenmapvalue |= uint64(b&0x7F) << shift 2813 if b < 0x80 { 2814 break 2815 } 2816 } 2817 intStringLenmapvalue := int(stringLenmapvalue) 2818 if intStringLenmapvalue < 0 { 2819 return ErrInvalidLengthCrates 2820 } 2821 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 2822 if postStringIndexmapvalue < 0 { 2823 return ErrInvalidLengthCrates 2824 } 2825 if postStringIndexmapvalue > l { 2826 return io.ErrUnexpectedEOF 2827 } 2828 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) 2829 iNdEx = postStringIndexmapvalue 2830 } else { 2831 iNdEx = entryPreIndex 2832 skippy, err := skipCrates(dAtA[iNdEx:]) 2833 if err != nil { 2834 return err 2835 } 2836 if (skippy < 0) || (iNdEx+skippy) < 0 { 2837 return ErrInvalidLengthCrates 2838 } 2839 if (iNdEx + skippy) > postIndex { 2840 return io.ErrUnexpectedEOF 2841 } 2842 iNdEx += skippy 2843 } 2844 } 2845 m.AppDownloadURLs[mapkey] = mapvalue 2846 iNdEx = postIndex 2847 case 18: 2848 if wireType != 2 { 2849 return fmt.Errorf("proto: wrong wireType = %d for field URLSchemes", wireType) 2850 } 2851 var stringLen uint64 2852 for shift := uint(0); ; shift += 7 { 2853 if shift >= 64 { 2854 return ErrIntOverflowCrates 2855 } 2856 if iNdEx >= l { 2857 return io.ErrUnexpectedEOF 2858 } 2859 b := dAtA[iNdEx] 2860 iNdEx++ 2861 stringLen |= uint64(b&0x7F) << shift 2862 if b < 0x80 { 2863 break 2864 } 2865 } 2866 intStringLen := int(stringLen) 2867 if intStringLen < 0 { 2868 return ErrInvalidLengthCrates 2869 } 2870 postIndex := iNdEx + intStringLen 2871 if postIndex < 0 { 2872 return ErrInvalidLengthCrates 2873 } 2874 if postIndex > l { 2875 return io.ErrUnexpectedEOF 2876 } 2877 m.URLSchemes = append(m.URLSchemes, string(dAtA[iNdEx:postIndex])) 2878 iNdEx = postIndex 2879 case 20: 2880 if wireType != 2 { 2881 return fmt.Errorf("proto: wrong wireType = %d for field Settings", wireType) 2882 } 2883 var msglen int 2884 for shift := uint(0); ; shift += 7 { 2885 if shift >= 64 { 2886 return ErrIntOverflowCrates 2887 } 2888 if iNdEx >= l { 2889 return io.ErrUnexpectedEOF 2890 } 2891 b := dAtA[iNdEx] 2892 iNdEx++ 2893 msglen |= int(b&0x7F) << shift 2894 if b < 0x80 { 2895 break 2896 } 2897 } 2898 if msglen < 0 { 2899 return ErrInvalidLengthCrates 2900 } 2901 postIndex := iNdEx + msglen 2902 if postIndex < 0 { 2903 return ErrInvalidLengthCrates 2904 } 2905 if postIndex > l { 2906 return io.ErrUnexpectedEOF 2907 } 2908 if m.Settings == nil { 2909 m.Settings = make(map[string]string) 2910 } 2911 var mapkey string 2912 var mapvalue string 2913 for iNdEx < postIndex { 2914 entryPreIndex := iNdEx 2915 var wire uint64 2916 for shift := uint(0); ; shift += 7 { 2917 if shift >= 64 { 2918 return ErrIntOverflowCrates 2919 } 2920 if iNdEx >= l { 2921 return io.ErrUnexpectedEOF 2922 } 2923 b := dAtA[iNdEx] 2924 iNdEx++ 2925 wire |= uint64(b&0x7F) << shift 2926 if b < 0x80 { 2927 break 2928 } 2929 } 2930 fieldNum := int32(wire >> 3) 2931 if fieldNum == 1 { 2932 var stringLenmapkey uint64 2933 for shift := uint(0); ; shift += 7 { 2934 if shift >= 64 { 2935 return ErrIntOverflowCrates 2936 } 2937 if iNdEx >= l { 2938 return io.ErrUnexpectedEOF 2939 } 2940 b := dAtA[iNdEx] 2941 iNdEx++ 2942 stringLenmapkey |= uint64(b&0x7F) << shift 2943 if b < 0x80 { 2944 break 2945 } 2946 } 2947 intStringLenmapkey := int(stringLenmapkey) 2948 if intStringLenmapkey < 0 { 2949 return ErrInvalidLengthCrates 2950 } 2951 postStringIndexmapkey := iNdEx + intStringLenmapkey 2952 if postStringIndexmapkey < 0 { 2953 return ErrInvalidLengthCrates 2954 } 2955 if postStringIndexmapkey > l { 2956 return io.ErrUnexpectedEOF 2957 } 2958 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 2959 iNdEx = postStringIndexmapkey 2960 } else if fieldNum == 2 { 2961 var stringLenmapvalue uint64 2962 for shift := uint(0); ; shift += 7 { 2963 if shift >= 64 { 2964 return ErrIntOverflowCrates 2965 } 2966 if iNdEx >= l { 2967 return io.ErrUnexpectedEOF 2968 } 2969 b := dAtA[iNdEx] 2970 iNdEx++ 2971 stringLenmapvalue |= uint64(b&0x7F) << shift 2972 if b < 0x80 { 2973 break 2974 } 2975 } 2976 intStringLenmapvalue := int(stringLenmapvalue) 2977 if intStringLenmapvalue < 0 { 2978 return ErrInvalidLengthCrates 2979 } 2980 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 2981 if postStringIndexmapvalue < 0 { 2982 return ErrInvalidLengthCrates 2983 } 2984 if postStringIndexmapvalue > l { 2985 return io.ErrUnexpectedEOF 2986 } 2987 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) 2988 iNdEx = postStringIndexmapvalue 2989 } else { 2990 iNdEx = entryPreIndex 2991 skippy, err := skipCrates(dAtA[iNdEx:]) 2992 if err != nil { 2993 return err 2994 } 2995 if (skippy < 0) || (iNdEx+skippy) < 0 { 2996 return ErrInvalidLengthCrates 2997 } 2998 if (iNdEx + skippy) > postIndex { 2999 return io.ErrUnexpectedEOF 3000 } 3001 iNdEx += skippy 3002 } 3003 } 3004 m.Settings[mapkey] = mapvalue 3005 iNdEx = postIndex 3006 case 40: 3007 if wireType != 2 { 3008 return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) 3009 } 3010 var msglen int 3011 for shift := uint(0); ; shift += 7 { 3012 if shift >= 64 { 3013 return ErrIntOverflowCrates 3014 } 3015 if iNdEx >= l { 3016 return io.ErrUnexpectedEOF 3017 } 3018 b := dAtA[iNdEx] 3019 iNdEx++ 3020 msglen |= int(b&0x7F) << shift 3021 if b < 0x80 { 3022 break 3023 } 3024 } 3025 if msglen < 0 { 3026 return ErrInvalidLengthCrates 3027 } 3028 postIndex := iNdEx + msglen 3029 if postIndex < 0 { 3030 return ErrInvalidLengthCrates 3031 } 3032 if postIndex > l { 3033 return io.ErrUnexpectedEOF 3034 } 3035 m.Links = append(m.Links, &KVEntry{}) 3036 if err := m.Links[len(m.Links)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3037 return err 3038 } 3039 iNdEx = postIndex 3040 default: 3041 iNdEx = preIndex 3042 skippy, err := skipCrates(dAtA[iNdEx:]) 3043 if err != nil { 3044 return err 3045 } 3046 if (skippy < 0) || (iNdEx+skippy) < 0 { 3047 return ErrInvalidLengthCrates 3048 } 3049 if (iNdEx + skippy) > l { 3050 return io.ErrUnexpectedEOF 3051 } 3052 iNdEx += skippy 3053 } 3054 } 3055 3056 if iNdEx > l { 3057 return io.ErrUnexpectedEOF 3058 } 3059 return nil 3060 } 3061 func (m *AssetEntry) Unmarshal(dAtA []byte) error { 3062 l := len(dAtA) 3063 iNdEx := 0 3064 for iNdEx < l { 3065 preIndex := iNdEx 3066 var wire uint64 3067 for shift := uint(0); ; shift += 7 { 3068 if shift >= 64 { 3069 return ErrIntOverflowCrates 3070 } 3071 if iNdEx >= l { 3072 return io.ErrUnexpectedEOF 3073 } 3074 b := dAtA[iNdEx] 3075 iNdEx++ 3076 wire |= uint64(b&0x7F) << shift 3077 if b < 0x80 { 3078 break 3079 } 3080 } 3081 fieldNum := int32(wire >> 3) 3082 wireType := int(wire & 0x7) 3083 if wireType == 4 { 3084 return fmt.Errorf("proto: AssetEntry: wiretype end group for non-group") 3085 } 3086 if fieldNum <= 0 { 3087 return fmt.Errorf("proto: AssetEntry: illegal tag %d (wire type %d)", fieldNum, wire) 3088 } 3089 switch fieldNum { 3090 case 1: 3091 if wireType != 0 { 3092 return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) 3093 } 3094 m.Flags = 0 3095 for shift := uint(0); ; shift += 7 { 3096 if shift >= 64 { 3097 return ErrIntOverflowCrates 3098 } 3099 if iNdEx >= l { 3100 return io.ErrUnexpectedEOF 3101 } 3102 b := dAtA[iNdEx] 3103 iNdEx++ 3104 m.Flags |= AssetFlags(b&0x7F) << shift 3105 if b < 0x80 { 3106 break 3107 } 3108 } 3109 case 2: 3110 if wireType != 2 { 3111 return fmt.Errorf("proto: wrong wireType = %d for field EntryURI", wireType) 3112 } 3113 var stringLen uint64 3114 for shift := uint(0); ; shift += 7 { 3115 if shift >= 64 { 3116 return ErrIntOverflowCrates 3117 } 3118 if iNdEx >= l { 3119 return io.ErrUnexpectedEOF 3120 } 3121 b := dAtA[iNdEx] 3122 iNdEx++ 3123 stringLen |= uint64(b&0x7F) << shift 3124 if b < 0x80 { 3125 break 3126 } 3127 } 3128 intStringLen := int(stringLen) 3129 if intStringLen < 0 { 3130 return ErrInvalidLengthCrates 3131 } 3132 postIndex := iNdEx + intStringLen 3133 if postIndex < 0 { 3134 return ErrInvalidLengthCrates 3135 } 3136 if postIndex > l { 3137 return io.ErrUnexpectedEOF 3138 } 3139 m.EntryURI = string(dAtA[iNdEx:postIndex]) 3140 iNdEx = postIndex 3141 case 3: 3142 if wireType != 2 { 3143 return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) 3144 } 3145 var stringLen uint64 3146 for shift := uint(0); ; shift += 7 { 3147 if shift >= 64 { 3148 return ErrIntOverflowCrates 3149 } 3150 if iNdEx >= l { 3151 return io.ErrUnexpectedEOF 3152 } 3153 b := dAtA[iNdEx] 3154 iNdEx++ 3155 stringLen |= uint64(b&0x7F) << shift 3156 if b < 0x80 { 3157 break 3158 } 3159 } 3160 intStringLen := int(stringLen) 3161 if intStringLen < 0 { 3162 return ErrInvalidLengthCrates 3163 } 3164 postIndex := iNdEx + intStringLen 3165 if postIndex < 0 { 3166 return ErrInvalidLengthCrates 3167 } 3168 if postIndex > l { 3169 return io.ErrUnexpectedEOF 3170 } 3171 m.Label = string(dAtA[iNdEx:postIndex]) 3172 iNdEx = postIndex 3173 case 5: 3174 if wireType != 5 { 3175 return fmt.Errorf("proto: wrong wireType = %d for field CenterX", wireType) 3176 } 3177 var v uint32 3178 if (iNdEx + 4) > l { 3179 return io.ErrUnexpectedEOF 3180 } 3181 v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) 3182 iNdEx += 4 3183 m.CenterX = float32(math.Float32frombits(v)) 3184 case 6: 3185 if wireType != 5 { 3186 return fmt.Errorf("proto: wrong wireType = %d for field CenterY", wireType) 3187 } 3188 var v uint32 3189 if (iNdEx + 4) > l { 3190 return io.ErrUnexpectedEOF 3191 } 3192 v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) 3193 iNdEx += 4 3194 m.CenterY = float32(math.Float32frombits(v)) 3195 case 7: 3196 if wireType != 5 { 3197 return fmt.Errorf("proto: wrong wireType = %d for field CenterZ", wireType) 3198 } 3199 var v uint32 3200 if (iNdEx + 4) > l { 3201 return io.ErrUnexpectedEOF 3202 } 3203 v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) 3204 iNdEx += 4 3205 m.CenterZ = float32(math.Float32frombits(v)) 3206 case 10: 3207 if wireType != 5 { 3208 return fmt.Errorf("proto: wrong wireType = %d for field ExtentsX", wireType) 3209 } 3210 var v uint32 3211 if (iNdEx + 4) > l { 3212 return io.ErrUnexpectedEOF 3213 } 3214 v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) 3215 iNdEx += 4 3216 m.ExtentsX = float32(math.Float32frombits(v)) 3217 case 11: 3218 if wireType != 5 { 3219 return fmt.Errorf("proto: wrong wireType = %d for field ExtentsY", wireType) 3220 } 3221 var v uint32 3222 if (iNdEx + 4) > l { 3223 return io.ErrUnexpectedEOF 3224 } 3225 v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) 3226 iNdEx += 4 3227 m.ExtentsY = float32(math.Float32frombits(v)) 3228 case 12: 3229 if wireType != 5 { 3230 return fmt.Errorf("proto: wrong wireType = %d for field ExtentsZ", wireType) 3231 } 3232 var v uint32 3233 if (iNdEx + 4) > l { 3234 return io.ErrUnexpectedEOF 3235 } 3236 v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) 3237 iNdEx += 4 3238 m.ExtentsZ = float32(math.Float32frombits(v)) 3239 case 30: 3240 if wireType != 2 { 3241 return fmt.Errorf("proto: wrong wireType = %d for field LocalURI", wireType) 3242 } 3243 var stringLen uint64 3244 for shift := uint(0); ; shift += 7 { 3245 if shift >= 64 { 3246 return ErrIntOverflowCrates 3247 } 3248 if iNdEx >= l { 3249 return io.ErrUnexpectedEOF 3250 } 3251 b := dAtA[iNdEx] 3252 iNdEx++ 3253 stringLen |= uint64(b&0x7F) << shift 3254 if b < 0x80 { 3255 break 3256 } 3257 } 3258 intStringLen := int(stringLen) 3259 if intStringLen < 0 { 3260 return ErrInvalidLengthCrates 3261 } 3262 postIndex := iNdEx + intStringLen 3263 if postIndex < 0 { 3264 return ErrInvalidLengthCrates 3265 } 3266 if postIndex > l { 3267 return io.ErrUnexpectedEOF 3268 } 3269 m.LocalURI = string(dAtA[iNdEx:postIndex]) 3270 iNdEx = postIndex 3271 case 31: 3272 if wireType != 2 { 3273 return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) 3274 } 3275 var stringLen uint64 3276 for shift := uint(0); ; shift += 7 { 3277 if shift >= 64 { 3278 return ErrIntOverflowCrates 3279 } 3280 if iNdEx >= l { 3281 return io.ErrUnexpectedEOF 3282 } 3283 b := dAtA[iNdEx] 3284 iNdEx++ 3285 stringLen |= uint64(b&0x7F) << shift 3286 if b < 0x80 { 3287 break 3288 } 3289 } 3290 intStringLen := int(stringLen) 3291 if intStringLen < 0 { 3292 return ErrInvalidLengthCrates 3293 } 3294 postIndex := iNdEx + intStringLen 3295 if postIndex < 0 { 3296 return ErrInvalidLengthCrates 3297 } 3298 if postIndex > l { 3299 return io.ErrUnexpectedEOF 3300 } 3301 m.Tags = string(dAtA[iNdEx:postIndex]) 3302 iNdEx = postIndex 3303 case 32: 3304 if wireType != 2 { 3305 return fmt.Errorf("proto: wrong wireType = %d for field ShortDesc", wireType) 3306 } 3307 var stringLen uint64 3308 for shift := uint(0); ; shift += 7 { 3309 if shift >= 64 { 3310 return ErrIntOverflowCrates 3311 } 3312 if iNdEx >= l { 3313 return io.ErrUnexpectedEOF 3314 } 3315 b := dAtA[iNdEx] 3316 iNdEx++ 3317 stringLen |= uint64(b&0x7F) << shift 3318 if b < 0x80 { 3319 break 3320 } 3321 } 3322 intStringLen := int(stringLen) 3323 if intStringLen < 0 { 3324 return ErrInvalidLengthCrates 3325 } 3326 postIndex := iNdEx + intStringLen 3327 if postIndex < 0 { 3328 return ErrInvalidLengthCrates 3329 } 3330 if postIndex > l { 3331 return io.ErrUnexpectedEOF 3332 } 3333 m.ShortDesc = string(dAtA[iNdEx:postIndex]) 3334 iNdEx = postIndex 3335 default: 3336 iNdEx = preIndex 3337 skippy, err := skipCrates(dAtA[iNdEx:]) 3338 if err != nil { 3339 return err 3340 } 3341 if (skippy < 0) || (iNdEx+skippy) < 0 { 3342 return ErrInvalidLengthCrates 3343 } 3344 if (iNdEx + skippy) > l { 3345 return io.ErrUnexpectedEOF 3346 } 3347 iNdEx += skippy 3348 } 3349 } 3350 3351 if iNdEx > l { 3352 return io.ErrUnexpectedEOF 3353 } 3354 return nil 3355 } 3356 func (m *BundleManifest) Unmarshal(dAtA []byte) error { 3357 l := len(dAtA) 3358 iNdEx := 0 3359 for iNdEx < l { 3360 preIndex := iNdEx 3361 var wire uint64 3362 for shift := uint(0); ; shift += 7 { 3363 if shift >= 64 { 3364 return ErrIntOverflowCrates 3365 } 3366 if iNdEx >= l { 3367 return io.ErrUnexpectedEOF 3368 } 3369 b := dAtA[iNdEx] 3370 iNdEx++ 3371 wire |= uint64(b&0x7F) << shift 3372 if b < 0x80 { 3373 break 3374 } 3375 } 3376 fieldNum := int32(wire >> 3) 3377 wireType := int(wire & 0x7) 3378 if wireType == 4 { 3379 return fmt.Errorf("proto: BundleManifest: wiretype end group for non-group") 3380 } 3381 if fieldNum <= 0 { 3382 return fmt.Errorf("proto: BundleManifest: illegal tag %d (wire type %d)", fieldNum, wire) 3383 } 3384 switch fieldNum { 3385 case 2: 3386 if wireType != 2 { 3387 return fmt.Errorf("proto: wrong wireType = %d for field BundleTitle", wireType) 3388 } 3389 var stringLen uint64 3390 for shift := uint(0); ; shift += 7 { 3391 if shift >= 64 { 3392 return ErrIntOverflowCrates 3393 } 3394 if iNdEx >= l { 3395 return io.ErrUnexpectedEOF 3396 } 3397 b := dAtA[iNdEx] 3398 iNdEx++ 3399 stringLen |= uint64(b&0x7F) << shift 3400 if b < 0x80 { 3401 break 3402 } 3403 } 3404 intStringLen := int(stringLen) 3405 if intStringLen < 0 { 3406 return ErrInvalidLengthCrates 3407 } 3408 postIndex := iNdEx + intStringLen 3409 if postIndex < 0 { 3410 return ErrInvalidLengthCrates 3411 } 3412 if postIndex > l { 3413 return io.ErrUnexpectedEOF 3414 } 3415 m.BundleTitle = string(dAtA[iNdEx:postIndex]) 3416 iNdEx = postIndex 3417 case 3: 3418 if wireType != 2 { 3419 return fmt.Errorf("proto: wrong wireType = %d for field BundleNameID", wireType) 3420 } 3421 var stringLen uint64 3422 for shift := uint(0); ; shift += 7 { 3423 if shift >= 64 { 3424 return ErrIntOverflowCrates 3425 } 3426 if iNdEx >= l { 3427 return io.ErrUnexpectedEOF 3428 } 3429 b := dAtA[iNdEx] 3430 iNdEx++ 3431 stringLen |= uint64(b&0x7F) << shift 3432 if b < 0x80 { 3433 break 3434 } 3435 } 3436 intStringLen := int(stringLen) 3437 if intStringLen < 0 { 3438 return ErrInvalidLengthCrates 3439 } 3440 postIndex := iNdEx + intStringLen 3441 if postIndex < 0 { 3442 return ErrInvalidLengthCrates 3443 } 3444 if postIndex > l { 3445 return io.ErrUnexpectedEOF 3446 } 3447 m.BundleNameID = string(dAtA[iNdEx:postIndex]) 3448 iNdEx = postIndex 3449 case 10: 3450 if wireType != 2 { 3451 return fmt.Errorf("proto: wrong wireType = %d for field Assets", wireType) 3452 } 3453 var msglen int 3454 for shift := uint(0); ; shift += 7 { 3455 if shift >= 64 { 3456 return ErrIntOverflowCrates 3457 } 3458 if iNdEx >= l { 3459 return io.ErrUnexpectedEOF 3460 } 3461 b := dAtA[iNdEx] 3462 iNdEx++ 3463 msglen |= int(b&0x7F) << shift 3464 if b < 0x80 { 3465 break 3466 } 3467 } 3468 if msglen < 0 { 3469 return ErrInvalidLengthCrates 3470 } 3471 postIndex := iNdEx + msglen 3472 if postIndex < 0 { 3473 return ErrInvalidLengthCrates 3474 } 3475 if postIndex > l { 3476 return io.ErrUnexpectedEOF 3477 } 3478 m.Assets = append(m.Assets, &AssetEntry{}) 3479 if err := m.Assets[len(m.Assets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3480 return err 3481 } 3482 iNdEx = postIndex 3483 case 20: 3484 if wireType != 0 { 3485 return fmt.Errorf("proto: wrong wireType = %d for field LoadAllHint", wireType) 3486 } 3487 var v int 3488 for shift := uint(0); ; shift += 7 { 3489 if shift >= 64 { 3490 return ErrIntOverflowCrates 3491 } 3492 if iNdEx >= l { 3493 return io.ErrUnexpectedEOF 3494 } 3495 b := dAtA[iNdEx] 3496 iNdEx++ 3497 v |= int(b&0x7F) << shift 3498 if b < 0x80 { 3499 break 3500 } 3501 } 3502 m.LoadAllHint = bool(v != 0) 3503 default: 3504 iNdEx = preIndex 3505 skippy, err := skipCrates(dAtA[iNdEx:]) 3506 if err != nil { 3507 return err 3508 } 3509 if (skippy < 0) || (iNdEx+skippy) < 0 { 3510 return ErrInvalidLengthCrates 3511 } 3512 if (iNdEx + skippy) > l { 3513 return io.ErrUnexpectedEOF 3514 } 3515 iNdEx += skippy 3516 } 3517 } 3518 3519 if iNdEx > l { 3520 return io.ErrUnexpectedEOF 3521 } 3522 return nil 3523 } 3524 func (m *CrateInfo) Unmarshal(dAtA []byte) error { 3525 l := len(dAtA) 3526 iNdEx := 0 3527 for iNdEx < l { 3528 preIndex := iNdEx 3529 var wire uint64 3530 for shift := uint(0); ; shift += 7 { 3531 if shift >= 64 { 3532 return ErrIntOverflowCrates 3533 } 3534 if iNdEx >= l { 3535 return io.ErrUnexpectedEOF 3536 } 3537 b := dAtA[iNdEx] 3538 iNdEx++ 3539 wire |= uint64(b&0x7F) << shift 3540 if b < 0x80 { 3541 break 3542 } 3543 } 3544 fieldNum := int32(wire >> 3) 3545 wireType := int(wire & 0x7) 3546 if wireType == 4 { 3547 return fmt.Errorf("proto: CrateInfo: wiretype end group for non-group") 3548 } 3549 if fieldNum <= 0 { 3550 return fmt.Errorf("proto: CrateInfo: illegal tag %d (wire type %d)", fieldNum, wire) 3551 } 3552 switch fieldNum { 3553 case 1: 3554 if wireType != 0 { 3555 return fmt.Errorf("proto: wrong wireType = %d for field CrateSchema", wireType) 3556 } 3557 m.CrateSchema = 0 3558 for shift := uint(0); ; shift += 7 { 3559 if shift >= 64 { 3560 return ErrIntOverflowCrates 3561 } 3562 if iNdEx >= l { 3563 return io.ErrUnexpectedEOF 3564 } 3565 b := dAtA[iNdEx] 3566 iNdEx++ 3567 m.CrateSchema |= int32(b&0x7F) << shift 3568 if b < 0x80 { 3569 break 3570 } 3571 } 3572 case 2: 3573 if wireType != 0 { 3574 return fmt.Errorf("proto: wrong wireType = %d for field InstID", wireType) 3575 } 3576 m.InstID = 0 3577 for shift := uint(0); ; shift += 7 { 3578 if shift >= 64 { 3579 return ErrIntOverflowCrates 3580 } 3581 if iNdEx >= l { 3582 return io.ErrUnexpectedEOF 3583 } 3584 b := dAtA[iNdEx] 3585 iNdEx++ 3586 m.InstID |= uint32(b&0x7F) << shift 3587 if b < 0x80 { 3588 break 3589 } 3590 } 3591 case 4: 3592 if wireType != 2 { 3593 return fmt.Errorf("proto: wrong wireType = %d for field CrateURI", wireType) 3594 } 3595 var stringLen uint64 3596 for shift := uint(0); ; shift += 7 { 3597 if shift >= 64 { 3598 return ErrIntOverflowCrates 3599 } 3600 if iNdEx >= l { 3601 return io.ErrUnexpectedEOF 3602 } 3603 b := dAtA[iNdEx] 3604 iNdEx++ 3605 stringLen |= uint64(b&0x7F) << shift 3606 if b < 0x80 { 3607 break 3608 } 3609 } 3610 intStringLen := int(stringLen) 3611 if intStringLen < 0 { 3612 return ErrInvalidLengthCrates 3613 } 3614 postIndex := iNdEx + intStringLen 3615 if postIndex < 0 { 3616 return ErrInvalidLengthCrates 3617 } 3618 if postIndex > l { 3619 return io.ErrUnexpectedEOF 3620 } 3621 m.CrateURI = string(dAtA[iNdEx:postIndex]) 3622 iNdEx = postIndex 3623 case 6: 3624 if wireType != 2 { 3625 return fmt.Errorf("proto: wrong wireType = %d for field PublisherName", wireType) 3626 } 3627 var stringLen uint64 3628 for shift := uint(0); ; shift += 7 { 3629 if shift >= 64 { 3630 return ErrIntOverflowCrates 3631 } 3632 if iNdEx >= l { 3633 return io.ErrUnexpectedEOF 3634 } 3635 b := dAtA[iNdEx] 3636 iNdEx++ 3637 stringLen |= uint64(b&0x7F) << shift 3638 if b < 0x80 { 3639 break 3640 } 3641 } 3642 intStringLen := int(stringLen) 3643 if intStringLen < 0 { 3644 return ErrInvalidLengthCrates 3645 } 3646 postIndex := iNdEx + intStringLen 3647 if postIndex < 0 { 3648 return ErrInvalidLengthCrates 3649 } 3650 if postIndex > l { 3651 return io.ErrUnexpectedEOF 3652 } 3653 m.PublisherName = string(dAtA[iNdEx:postIndex]) 3654 iNdEx = postIndex 3655 case 10: 3656 if wireType != 2 { 3657 return fmt.Errorf("proto: wrong wireType = %d for field CrateName", wireType) 3658 } 3659 var stringLen uint64 3660 for shift := uint(0); ; shift += 7 { 3661 if shift >= 64 { 3662 return ErrIntOverflowCrates 3663 } 3664 if iNdEx >= l { 3665 return io.ErrUnexpectedEOF 3666 } 3667 b := dAtA[iNdEx] 3668 iNdEx++ 3669 stringLen |= uint64(b&0x7F) << shift 3670 if b < 0x80 { 3671 break 3672 } 3673 } 3674 intStringLen := int(stringLen) 3675 if intStringLen < 0 { 3676 return ErrInvalidLengthCrates 3677 } 3678 postIndex := iNdEx + intStringLen 3679 if postIndex < 0 { 3680 return ErrInvalidLengthCrates 3681 } 3682 if postIndex > l { 3683 return io.ErrUnexpectedEOF 3684 } 3685 m.CrateName = string(dAtA[iNdEx:postIndex]) 3686 iNdEx = postIndex 3687 case 11: 3688 if wireType != 2 { 3689 return fmt.Errorf("proto: wrong wireType = %d for field ShortDesc", wireType) 3690 } 3691 var stringLen uint64 3692 for shift := uint(0); ; shift += 7 { 3693 if shift >= 64 { 3694 return ErrIntOverflowCrates 3695 } 3696 if iNdEx >= l { 3697 return io.ErrUnexpectedEOF 3698 } 3699 b := dAtA[iNdEx] 3700 iNdEx++ 3701 stringLen |= uint64(b&0x7F) << shift 3702 if b < 0x80 { 3703 break 3704 } 3705 } 3706 intStringLen := int(stringLen) 3707 if intStringLen < 0 { 3708 return ErrInvalidLengthCrates 3709 } 3710 postIndex := iNdEx + intStringLen 3711 if postIndex < 0 { 3712 return ErrInvalidLengthCrates 3713 } 3714 if postIndex > l { 3715 return io.ErrUnexpectedEOF 3716 } 3717 m.ShortDesc = string(dAtA[iNdEx:postIndex]) 3718 iNdEx = postIndex 3719 case 15: 3720 if wireType != 2 { 3721 return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) 3722 } 3723 var stringLen uint64 3724 for shift := uint(0); ; shift += 7 { 3725 if shift >= 64 { 3726 return ErrIntOverflowCrates 3727 } 3728 if iNdEx >= l { 3729 return io.ErrUnexpectedEOF 3730 } 3731 b := dAtA[iNdEx] 3732 iNdEx++ 3733 stringLen |= uint64(b&0x7F) << shift 3734 if b < 0x80 { 3735 break 3736 } 3737 } 3738 intStringLen := int(stringLen) 3739 if intStringLen < 0 { 3740 return ErrInvalidLengthCrates 3741 } 3742 postIndex := iNdEx + intStringLen 3743 if postIndex < 0 { 3744 return ErrInvalidLengthCrates 3745 } 3746 if postIndex > l { 3747 return io.ErrUnexpectedEOF 3748 } 3749 m.Tags = string(dAtA[iNdEx:postIndex]) 3750 iNdEx = postIndex 3751 case 30: 3752 if wireType != 0 { 3753 return fmt.Errorf("proto: wrong wireType = %d for field TimeCreated", wireType) 3754 } 3755 m.TimeCreated = 0 3756 for shift := uint(0); ; shift += 7 { 3757 if shift >= 64 { 3758 return ErrIntOverflowCrates 3759 } 3760 if iNdEx >= l { 3761 return io.ErrUnexpectedEOF 3762 } 3763 b := dAtA[iNdEx] 3764 iNdEx++ 3765 m.TimeCreated |= int64(b&0x7F) << shift 3766 if b < 0x80 { 3767 break 3768 } 3769 } 3770 case 31: 3771 if wireType != 0 { 3772 return fmt.Errorf("proto: wrong wireType = %d for field TimeBuilt", wireType) 3773 } 3774 m.TimeBuilt = 0 3775 for shift := uint(0); ; shift += 7 { 3776 if shift >= 64 { 3777 return ErrIntOverflowCrates 3778 } 3779 if iNdEx >= l { 3780 return io.ErrUnexpectedEOF 3781 } 3782 b := dAtA[iNdEx] 3783 iNdEx++ 3784 m.TimeBuilt |= int64(b&0x7F) << shift 3785 if b < 0x80 { 3786 break 3787 } 3788 } 3789 case 40: 3790 if wireType != 0 { 3791 return fmt.Errorf("proto: wrong wireType = %d for field MajorVersion", wireType) 3792 } 3793 m.MajorVersion = 0 3794 for shift := uint(0); ; shift += 7 { 3795 if shift >= 64 { 3796 return ErrIntOverflowCrates 3797 } 3798 if iNdEx >= l { 3799 return io.ErrUnexpectedEOF 3800 } 3801 b := dAtA[iNdEx] 3802 iNdEx++ 3803 m.MajorVersion |= int32(b&0x7F) << shift 3804 if b < 0x80 { 3805 break 3806 } 3807 } 3808 case 41: 3809 if wireType != 0 { 3810 return fmt.Errorf("proto: wrong wireType = %d for field MinorVersion", wireType) 3811 } 3812 m.MinorVersion = 0 3813 for shift := uint(0); ; shift += 7 { 3814 if shift >= 64 { 3815 return ErrIntOverflowCrates 3816 } 3817 if iNdEx >= l { 3818 return io.ErrUnexpectedEOF 3819 } 3820 b := dAtA[iNdEx] 3821 iNdEx++ 3822 m.MinorVersion |= int32(b&0x7F) << shift 3823 if b < 0x80 { 3824 break 3825 } 3826 } 3827 case 42: 3828 if wireType != 0 { 3829 return fmt.Errorf("proto: wrong wireType = %d for field BuildNumber", wireType) 3830 } 3831 m.BuildNumber = 0 3832 for shift := uint(0); ; shift += 7 { 3833 if shift >= 64 { 3834 return ErrIntOverflowCrates 3835 } 3836 if iNdEx >= l { 3837 return io.ErrUnexpectedEOF 3838 } 3839 b := dAtA[iNdEx] 3840 iNdEx++ 3841 m.BuildNumber |= int32(b&0x7F) << shift 3842 if b < 0x80 { 3843 break 3844 } 3845 } 3846 case 45: 3847 if wireType != 2 { 3848 return fmt.Errorf("proto: wrong wireType = %d for field BuildID", wireType) 3849 } 3850 var stringLen uint64 3851 for shift := uint(0); ; shift += 7 { 3852 if shift >= 64 { 3853 return ErrIntOverflowCrates 3854 } 3855 if iNdEx >= l { 3856 return io.ErrUnexpectedEOF 3857 } 3858 b := dAtA[iNdEx] 3859 iNdEx++ 3860 stringLen |= uint64(b&0x7F) << shift 3861 if b < 0x80 { 3862 break 3863 } 3864 } 3865 intStringLen := int(stringLen) 3866 if intStringLen < 0 { 3867 return ErrInvalidLengthCrates 3868 } 3869 postIndex := iNdEx + intStringLen 3870 if postIndex < 0 { 3871 return ErrInvalidLengthCrates 3872 } 3873 if postIndex > l { 3874 return io.ErrUnexpectedEOF 3875 } 3876 m.BuildID = string(dAtA[iNdEx:postIndex]) 3877 iNdEx = postIndex 3878 case 50: 3879 if wireType != 2 { 3880 return fmt.Errorf("proto: wrong wireType = %d for field HomeURL", wireType) 3881 } 3882 var stringLen uint64 3883 for shift := uint(0); ; shift += 7 { 3884 if shift >= 64 { 3885 return ErrIntOverflowCrates 3886 } 3887 if iNdEx >= l { 3888 return io.ErrUnexpectedEOF 3889 } 3890 b := dAtA[iNdEx] 3891 iNdEx++ 3892 stringLen |= uint64(b&0x7F) << shift 3893 if b < 0x80 { 3894 break 3895 } 3896 } 3897 intStringLen := int(stringLen) 3898 if intStringLen < 0 { 3899 return ErrInvalidLengthCrates 3900 } 3901 postIndex := iNdEx + intStringLen 3902 if postIndex < 0 { 3903 return ErrInvalidLengthCrates 3904 } 3905 if postIndex > l { 3906 return io.ErrUnexpectedEOF 3907 } 3908 m.HomeURL = string(dAtA[iNdEx:postIndex]) 3909 iNdEx = postIndex 3910 case 55: 3911 if wireType != 2 { 3912 return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) 3913 } 3914 var stringLen uint64 3915 for shift := uint(0); ; shift += 7 { 3916 if shift >= 64 { 3917 return ErrIntOverflowCrates 3918 } 3919 if iNdEx >= l { 3920 return io.ErrUnexpectedEOF 3921 } 3922 b := dAtA[iNdEx] 3923 iNdEx++ 3924 stringLen |= uint64(b&0x7F) << shift 3925 if b < 0x80 { 3926 break 3927 } 3928 } 3929 intStringLen := int(stringLen) 3930 if intStringLen < 0 { 3931 return ErrInvalidLengthCrates 3932 } 3933 postIndex := iNdEx + intStringLen 3934 if postIndex < 0 { 3935 return ErrInvalidLengthCrates 3936 } 3937 if postIndex > l { 3938 return io.ErrUnexpectedEOF 3939 } 3940 m.URL = string(dAtA[iNdEx:postIndex]) 3941 iNdEx = postIndex 3942 case 60: 3943 if wireType != 0 { 3944 return fmt.Errorf("proto: wrong wireType = %d for field ApproxSize", wireType) 3945 } 3946 m.ApproxSize = 0 3947 for shift := uint(0); ; shift += 7 { 3948 if shift >= 64 { 3949 return ErrIntOverflowCrates 3950 } 3951 if iNdEx >= l { 3952 return io.ErrUnexpectedEOF 3953 } 3954 b := dAtA[iNdEx] 3955 iNdEx++ 3956 m.ApproxSize |= int64(b&0x7F) << shift 3957 if b < 0x80 { 3958 break 3959 } 3960 } 3961 default: 3962 iNdEx = preIndex 3963 skippy, err := skipCrates(dAtA[iNdEx:]) 3964 if err != nil { 3965 return err 3966 } 3967 if (skippy < 0) || (iNdEx+skippy) < 0 { 3968 return ErrInvalidLengthCrates 3969 } 3970 if (iNdEx + skippy) > l { 3971 return io.ErrUnexpectedEOF 3972 } 3973 iNdEx += skippy 3974 } 3975 } 3976 3977 if iNdEx > l { 3978 return io.ErrUnexpectedEOF 3979 } 3980 return nil 3981 } 3982 func (m *CrateManifest) Unmarshal(dAtA []byte) error { 3983 l := len(dAtA) 3984 iNdEx := 0 3985 for iNdEx < l { 3986 preIndex := iNdEx 3987 var wire uint64 3988 for shift := uint(0); ; shift += 7 { 3989 if shift >= 64 { 3990 return ErrIntOverflowCrates 3991 } 3992 if iNdEx >= l { 3993 return io.ErrUnexpectedEOF 3994 } 3995 b := dAtA[iNdEx] 3996 iNdEx++ 3997 wire |= uint64(b&0x7F) << shift 3998 if b < 0x80 { 3999 break 4000 } 4001 } 4002 fieldNum := int32(wire >> 3) 4003 wireType := int(wire & 0x7) 4004 if wireType == 4 { 4005 return fmt.Errorf("proto: CrateManifest: wiretype end group for non-group") 4006 } 4007 if fieldNum <= 0 { 4008 return fmt.Errorf("proto: CrateManifest: illegal tag %d (wire type %d)", fieldNum, wire) 4009 } 4010 switch fieldNum { 4011 case 1: 4012 if wireType != 2 { 4013 return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) 4014 } 4015 var msglen int 4016 for shift := uint(0); ; shift += 7 { 4017 if shift >= 64 { 4018 return ErrIntOverflowCrates 4019 } 4020 if iNdEx >= l { 4021 return io.ErrUnexpectedEOF 4022 } 4023 b := dAtA[iNdEx] 4024 iNdEx++ 4025 msglen |= int(b&0x7F) << shift 4026 if b < 0x80 { 4027 break 4028 } 4029 } 4030 if msglen < 0 { 4031 return ErrInvalidLengthCrates 4032 } 4033 postIndex := iNdEx + msglen 4034 if postIndex < 0 { 4035 return ErrInvalidLengthCrates 4036 } 4037 if postIndex > l { 4038 return io.ErrUnexpectedEOF 4039 } 4040 if m.Info == nil { 4041 m.Info = &CrateInfo{} 4042 } 4043 if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4044 return err 4045 } 4046 iNdEx = postIndex 4047 case 5: 4048 if wireType != 2 { 4049 return fmt.Errorf("proto: wrong wireType = %d for field IconBundleName", wireType) 4050 } 4051 var stringLen uint64 4052 for shift := uint(0); ; shift += 7 { 4053 if shift >= 64 { 4054 return ErrIntOverflowCrates 4055 } 4056 if iNdEx >= l { 4057 return io.ErrUnexpectedEOF 4058 } 4059 b := dAtA[iNdEx] 4060 iNdEx++ 4061 stringLen |= uint64(b&0x7F) << shift 4062 if b < 0x80 { 4063 break 4064 } 4065 } 4066 intStringLen := int(stringLen) 4067 if intStringLen < 0 { 4068 return ErrInvalidLengthCrates 4069 } 4070 postIndex := iNdEx + intStringLen 4071 if postIndex < 0 { 4072 return ErrInvalidLengthCrates 4073 } 4074 if postIndex > l { 4075 return io.ErrUnexpectedEOF 4076 } 4077 m.IconBundleName = string(dAtA[iNdEx:postIndex]) 4078 iNdEx = postIndex 4079 case 10: 4080 if wireType != 2 { 4081 return fmt.Errorf("proto: wrong wireType = %d for field Bundles", wireType) 4082 } 4083 var msglen int 4084 for shift := uint(0); ; shift += 7 { 4085 if shift >= 64 { 4086 return ErrIntOverflowCrates 4087 } 4088 if iNdEx >= l { 4089 return io.ErrUnexpectedEOF 4090 } 4091 b := dAtA[iNdEx] 4092 iNdEx++ 4093 msglen |= int(b&0x7F) << shift 4094 if b < 0x80 { 4095 break 4096 } 4097 } 4098 if msglen < 0 { 4099 return ErrInvalidLengthCrates 4100 } 4101 postIndex := iNdEx + msglen 4102 if postIndex < 0 { 4103 return ErrInvalidLengthCrates 4104 } 4105 if postIndex > l { 4106 return io.ErrUnexpectedEOF 4107 } 4108 m.Bundles = append(m.Bundles, &BundleManifest{}) 4109 if err := m.Bundles[len(m.Bundles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4110 return err 4111 } 4112 iNdEx = postIndex 4113 default: 4114 iNdEx = preIndex 4115 skippy, err := skipCrates(dAtA[iNdEx:]) 4116 if err != nil { 4117 return err 4118 } 4119 if (skippy < 0) || (iNdEx+skippy) < 0 { 4120 return ErrInvalidLengthCrates 4121 } 4122 if (iNdEx + skippy) > l { 4123 return io.ErrUnexpectedEOF 4124 } 4125 iNdEx += skippy 4126 } 4127 } 4128 4129 if iNdEx > l { 4130 return io.ErrUnexpectedEOF 4131 } 4132 return nil 4133 } 4134 func (m *CratesSnapshot) Unmarshal(dAtA []byte) error { 4135 l := len(dAtA) 4136 iNdEx := 0 4137 for iNdEx < l { 4138 preIndex := iNdEx 4139 var wire uint64 4140 for shift := uint(0); ; shift += 7 { 4141 if shift >= 64 { 4142 return ErrIntOverflowCrates 4143 } 4144 if iNdEx >= l { 4145 return io.ErrUnexpectedEOF 4146 } 4147 b := dAtA[iNdEx] 4148 iNdEx++ 4149 wire |= uint64(b&0x7F) << shift 4150 if b < 0x80 { 4151 break 4152 } 4153 } 4154 fieldNum := int32(wire >> 3) 4155 wireType := int(wire & 0x7) 4156 if wireType == 4 { 4157 return fmt.Errorf("proto: CratesSnapshot: wiretype end group for non-group") 4158 } 4159 if fieldNum <= 0 { 4160 return fmt.Errorf("proto: CratesSnapshot: illegal tag %d (wire type %d)", fieldNum, wire) 4161 } 4162 switch fieldNum { 4163 case 1: 4164 if wireType != 0 { 4165 return fmt.Errorf("proto: wrong wireType = %d for field RevID", wireType) 4166 } 4167 m.RevID = 0 4168 for shift := uint(0); ; shift += 7 { 4169 if shift >= 64 { 4170 return ErrIntOverflowCrates 4171 } 4172 if iNdEx >= l { 4173 return io.ErrUnexpectedEOF 4174 } 4175 b := dAtA[iNdEx] 4176 iNdEx++ 4177 m.RevID |= int64(b&0x7F) << shift 4178 if b < 0x80 { 4179 break 4180 } 4181 } 4182 case 3: 4183 if wireType != 2 { 4184 return fmt.Errorf("proto: wrong wireType = %d for field DownloadURL", wireType) 4185 } 4186 var stringLen uint64 4187 for shift := uint(0); ; shift += 7 { 4188 if shift >= 64 { 4189 return ErrIntOverflowCrates 4190 } 4191 if iNdEx >= l { 4192 return io.ErrUnexpectedEOF 4193 } 4194 b := dAtA[iNdEx] 4195 iNdEx++ 4196 stringLen |= uint64(b&0x7F) << shift 4197 if b < 0x80 { 4198 break 4199 } 4200 } 4201 intStringLen := int(stringLen) 4202 if intStringLen < 0 { 4203 return ErrInvalidLengthCrates 4204 } 4205 postIndex := iNdEx + intStringLen 4206 if postIndex < 0 { 4207 return ErrInvalidLengthCrates 4208 } 4209 if postIndex > l { 4210 return io.ErrUnexpectedEOF 4211 } 4212 m.DownloadURL = string(dAtA[iNdEx:postIndex]) 4213 iNdEx = postIndex 4214 case 10: 4215 if wireType != 2 { 4216 return fmt.Errorf("proto: wrong wireType = %d for field Crates", wireType) 4217 } 4218 var msglen int 4219 for shift := uint(0); ; shift += 7 { 4220 if shift >= 64 { 4221 return ErrIntOverflowCrates 4222 } 4223 if iNdEx >= l { 4224 return io.ErrUnexpectedEOF 4225 } 4226 b := dAtA[iNdEx] 4227 iNdEx++ 4228 msglen |= int(b&0x7F) << shift 4229 if b < 0x80 { 4230 break 4231 } 4232 } 4233 if msglen < 0 { 4234 return ErrInvalidLengthCrates 4235 } 4236 postIndex := iNdEx + msglen 4237 if postIndex < 0 { 4238 return ErrInvalidLengthCrates 4239 } 4240 if postIndex > l { 4241 return io.ErrUnexpectedEOF 4242 } 4243 m.Crates = append(m.Crates, &CrateInfo{}) 4244 if err := m.Crates[len(m.Crates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4245 return err 4246 } 4247 iNdEx = postIndex 4248 default: 4249 iNdEx = preIndex 4250 skippy, err := skipCrates(dAtA[iNdEx:]) 4251 if err != nil { 4252 return err 4253 } 4254 if (skippy < 0) || (iNdEx+skippy) < 0 { 4255 return ErrInvalidLengthCrates 4256 } 4257 if (iNdEx + skippy) > l { 4258 return io.ErrUnexpectedEOF 4259 } 4260 iNdEx += skippy 4261 } 4262 } 4263 4264 if iNdEx > l { 4265 return io.ErrUnexpectedEOF 4266 } 4267 return nil 4268 } 4269 func skipCrates(dAtA []byte) (n int, err error) { 4270 l := len(dAtA) 4271 iNdEx := 0 4272 depth := 0 4273 for iNdEx < l { 4274 var wire uint64 4275 for shift := uint(0); ; shift += 7 { 4276 if shift >= 64 { 4277 return 0, ErrIntOverflowCrates 4278 } 4279 if iNdEx >= l { 4280 return 0, io.ErrUnexpectedEOF 4281 } 4282 b := dAtA[iNdEx] 4283 iNdEx++ 4284 wire |= (uint64(b) & 0x7F) << shift 4285 if b < 0x80 { 4286 break 4287 } 4288 } 4289 wireType := int(wire & 0x7) 4290 switch wireType { 4291 case 0: 4292 for shift := uint(0); ; shift += 7 { 4293 if shift >= 64 { 4294 return 0, ErrIntOverflowCrates 4295 } 4296 if iNdEx >= l { 4297 return 0, io.ErrUnexpectedEOF 4298 } 4299 iNdEx++ 4300 if dAtA[iNdEx-1] < 0x80 { 4301 break 4302 } 4303 } 4304 case 1: 4305 iNdEx += 8 4306 case 2: 4307 var length int 4308 for shift := uint(0); ; shift += 7 { 4309 if shift >= 64 { 4310 return 0, ErrIntOverflowCrates 4311 } 4312 if iNdEx >= l { 4313 return 0, io.ErrUnexpectedEOF 4314 } 4315 b := dAtA[iNdEx] 4316 iNdEx++ 4317 length |= (int(b) & 0x7F) << shift 4318 if b < 0x80 { 4319 break 4320 } 4321 } 4322 if length < 0 { 4323 return 0, ErrInvalidLengthCrates 4324 } 4325 iNdEx += length 4326 case 3: 4327 depth++ 4328 case 4: 4329 if depth == 0 { 4330 return 0, ErrUnexpectedEndOfGroupCrates 4331 } 4332 depth-- 4333 case 5: 4334 iNdEx += 4 4335 default: 4336 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 4337 } 4338 if iNdEx < 0 { 4339 return 0, ErrInvalidLengthCrates 4340 } 4341 if depth == 0 { 4342 return iNdEx, nil 4343 } 4344 } 4345 return 0, io.ErrUnexpectedEOF 4346 } 4347 4348 var ( 4349 ErrInvalidLengthCrates = fmt.Errorf("proto: negative length found during unmarshaling") 4350 ErrIntOverflowCrates = fmt.Errorf("proto: integer overflow") 4351 ErrUnexpectedEndOfGroupCrates = fmt.Errorf("proto: unexpected end of group") 4352 )