github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ts/catalog/chart_catalog.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: ts/catalog/chart_catalog.proto 3 4 package catalog 5 6 import proto "github.com/gogo/protobuf/proto" 7 import fmt "fmt" 8 import math "math" 9 import _go "github.com/prometheus/client_model/go" 10 import tspb "github.com/cockroachdb/cockroach/pkg/ts/tspb" 11 12 import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" 13 14 import io "io" 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 26 27 // AxisUnits describes the Unit options available in the Admin UI. It is defined here 28 // as opposed to importing the value from the Admin UI because the existing pb doesn't 29 // include an UNSET value, which we use to check for defaults. 30 type AxisUnits int32 31 32 const ( 33 // UNSET_UNITS expresses that the metric's DisplayUnit wasn't explicitly set. 34 AxisUnits_UNSET_UNITS AxisUnits = 0 35 // COUNT expresses that the metric's measurement is a count. 36 AxisUnits_COUNT AxisUnits = 1 37 // BYTES expresses that the metric's measurement is in bytes. 38 AxisUnits_BYTES AxisUnits = 2 39 // DURATION expresses that the metric's measurement represents some unit of time. 40 AxisUnits_DURATION AxisUnits = 3 41 ) 42 43 var AxisUnits_name = map[int32]string{ 44 0: "UNSET_UNITS", 45 1: "COUNT", 46 2: "BYTES", 47 3: "DURATION", 48 } 49 var AxisUnits_value = map[string]int32{ 50 "UNSET_UNITS": 0, 51 "COUNT": 1, 52 "BYTES": 2, 53 "DURATION": 3, 54 } 55 56 func (x AxisUnits) Enum() *AxisUnits { 57 p := new(AxisUnits) 58 *p = x 59 return p 60 } 61 func (x AxisUnits) String() string { 62 return proto.EnumName(AxisUnits_name, int32(x)) 63 } 64 func (x *AxisUnits) UnmarshalJSON(data []byte) error { 65 value, err := proto.UnmarshalJSONEnum(AxisUnits_value, data, "AxisUnits") 66 if err != nil { 67 return err 68 } 69 *x = AxisUnits(value) 70 return nil 71 } 72 func (AxisUnits) EnumDescriptor() ([]byte, []int) { 73 return fileDescriptor_chart_catalog_38c5478e18a7ed60, []int{0} 74 } 75 76 // DescribeAggregator works as a proxy for cockroach.ts.tspb.TimeSeriesQueryAggregator 77 // which does not support an unset zero value. 78 type DescribeAggregator int32 79 80 const ( 81 // UNSET_AGG expresses that the Aggregator value wasn't explicitly set and should 82 // use the default value for the respective metric type defined in chart_catalog.go. 83 DescribeAggregator_UNSET_AGG DescribeAggregator = 0 84 // AVG returns the average value of datapoints. 85 DescribeAggregator_AVG DescribeAggregator = 1 86 // SUM returns the sum value of datapoints. 87 DescribeAggregator_SUM DescribeAggregator = 2 88 // MAX returns the maximum value of datapoints. 89 DescribeAggregator_MAX DescribeAggregator = 3 90 // MIN returns the minimum value of datapoints. 91 DescribeAggregator_MIN DescribeAggregator = 4 92 ) 93 94 var DescribeAggregator_name = map[int32]string{ 95 0: "UNSET_AGG", 96 1: "AVG", 97 2: "SUM", 98 3: "MAX", 99 4: "MIN", 100 } 101 var DescribeAggregator_value = map[string]int32{ 102 "UNSET_AGG": 0, 103 "AVG": 1, 104 "SUM": 2, 105 "MAX": 3, 106 "MIN": 4, 107 } 108 109 func (x DescribeAggregator) Enum() *DescribeAggregator { 110 p := new(DescribeAggregator) 111 *p = x 112 return p 113 } 114 func (x DescribeAggregator) String() string { 115 return proto.EnumName(DescribeAggregator_name, int32(x)) 116 } 117 func (x *DescribeAggregator) UnmarshalJSON(data []byte) error { 118 value, err := proto.UnmarshalJSONEnum(DescribeAggregator_value, data, "DescribeAggregator") 119 if err != nil { 120 return err 121 } 122 *x = DescribeAggregator(value) 123 return nil 124 } 125 func (DescribeAggregator) EnumDescriptor() ([]byte, []int) { 126 return fileDescriptor_chart_catalog_38c5478e18a7ed60, []int{1} 127 } 128 129 // DescribeDerivative works as a proxy for cockroach.ts.tspb.TimeSeriesQueryDerivative 130 // which has an ambiguous zero value; it's unclear if the value isn't set or if it 131 // is intentionally set to NONE. 132 type DescribeDerivative int32 133 134 const ( 135 // UNSET_DER expresses that the Derivative value wasn't explicitly set and should 136 // use the default value for the respective metric type defined in chart_catalog.go. 137 DescribeDerivative_UNSET_DER DescribeDerivative = 0 138 // NONE does not apply a derivative function. 139 DescribeDerivative_NONE DescribeDerivative = 1 140 // DERIVATIVE returns the first-order derivative of values in the time series. 141 DescribeDerivative_DERIVATIVE DescribeDerivative = 2 142 // NON_NEGATIVE_DERIVATIVE returns only non-negative values of the first-order 143 // derivative; negative values are returned as zero. This should be used for 144 // counters that monotonically increase, but might wrap or reset. 145 DescribeDerivative_NON_NEGATIVE_DERIVATIVE DescribeDerivative = 3 146 ) 147 148 var DescribeDerivative_name = map[int32]string{ 149 0: "UNSET_DER", 150 1: "NONE", 151 2: "DERIVATIVE", 152 3: "NON_NEGATIVE_DERIVATIVE", 153 } 154 var DescribeDerivative_value = map[string]int32{ 155 "UNSET_DER": 0, 156 "NONE": 1, 157 "DERIVATIVE": 2, 158 "NON_NEGATIVE_DERIVATIVE": 3, 159 } 160 161 func (x DescribeDerivative) Enum() *DescribeDerivative { 162 p := new(DescribeDerivative) 163 *p = x 164 return p 165 } 166 func (x DescribeDerivative) String() string { 167 return proto.EnumName(DescribeDerivative_name, int32(x)) 168 } 169 func (x *DescribeDerivative) UnmarshalJSON(data []byte) error { 170 value, err := proto.UnmarshalJSONEnum(DescribeDerivative_value, data, "DescribeDerivative") 171 if err != nil { 172 return err 173 } 174 *x = DescribeDerivative(value) 175 return nil 176 } 177 func (DescribeDerivative) EnumDescriptor() ([]byte, []int) { 178 return fileDescriptor_chart_catalog_38c5478e18a7ed60, []int{2} 179 } 180 181 // ChartMetric converts cockroach.util.metric.Metadata 182 // into a struct that's useful for generating Admin UI charts. 183 type ChartMetric struct { 184 // name is the name of the metric. 185 Name string `protobuf:"bytes,1,req,name=name" json:"name"` 186 // help is the help text from the metric. 187 Help string `protobuf:"bytes,2,req,name=help" json:"help"` 188 // axisLabel is the label for the metric's y-axis. 189 AxisLabel string `protobuf:"bytes,3,req,name=axisLabel" json:"axisLabel"` 190 // preferredUnits describes the units the chart should be viewed with 191 // e.g. BYTES for storage. 192 PreferredUnits AxisUnits `protobuf:"varint,4,req,name=preferredUnits,enum=cockroach.ts.catalog.AxisUnits" json:"preferredUnits"` 193 // metricType describes the type of metric this is; all metrics on a chart 194 // should be of the same type to ensure the information displays behaves in 195 // expected ways. 196 MetricType _go.MetricType `protobuf:"varint,5,opt,name=metricType,enum=io.prometheus.client.MetricType" json:"metricType"` 197 } 198 199 func (m *ChartMetric) Reset() { *m = ChartMetric{} } 200 func (m *ChartMetric) String() string { return proto.CompactTextString(m) } 201 func (*ChartMetric) ProtoMessage() {} 202 func (*ChartMetric) Descriptor() ([]byte, []int) { 203 return fileDescriptor_chart_catalog_38c5478e18a7ed60, []int{0} 204 } 205 func (m *ChartMetric) XXX_Unmarshal(b []byte) error { 206 return m.Unmarshal(b) 207 } 208 func (m *ChartMetric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 209 b = b[:cap(b)] 210 n, err := m.MarshalTo(b) 211 if err != nil { 212 return nil, err 213 } 214 return b[:n], nil 215 } 216 func (dst *ChartMetric) XXX_Merge(src proto.Message) { 217 xxx_messageInfo_ChartMetric.Merge(dst, src) 218 } 219 func (m *ChartMetric) XXX_Size() int { 220 return m.Size() 221 } 222 func (m *ChartMetric) XXX_DiscardUnknown() { 223 xxx_messageInfo_ChartMetric.DiscardUnknown(m) 224 } 225 226 var xxx_messageInfo_ChartMetric proto.InternalMessageInfo 227 228 // IndividualChart describes both the properties necessary to display 229 // AdminUI charts, as well as a key to find them (collectionName). 230 type IndividualChart struct { 231 // title is the title of the chart. 232 Title string `protobuf:"bytes,1,req,name=title" json:"title"` 233 // longname displays the chart's organization within the catalog, 234 // as well as its own name. 235 LongTitle string `protobuf:"bytes,2,req,name=longTitle" json:"longTitle"` 236 // collectionName uniquely identifies a chart. 237 CollectionTitle string `protobuf:"bytes,3,req,name=collectionTitle" json:"collectionTitle"` 238 // downsampler specifies the chart's downsampler function. 239 Downsampler *tspb.TimeSeriesQueryAggregator `protobuf:"varint,4,req,name=downsampler,enum=cockroach.ts.tspb.TimeSeriesQueryAggregator" json:"downsampler,omitempty"` 240 // aggregator specifies the chart's aggregator function. 241 Aggregator *tspb.TimeSeriesQueryAggregator `protobuf:"varint,5,req,name=aggregator,enum=cockroach.ts.tspb.TimeSeriesQueryAggregator" json:"aggregator,omitempty"` 242 // derivative specifies the chart's derivative function. 243 Derivative *tspb.TimeSeriesQueryDerivative `protobuf:"varint,6,req,name=derivative,enum=cockroach.ts.tspb.TimeSeriesQueryDerivative" json:"derivative,omitempty"` 244 // units specifies the Admin UI units to display the chart with. 245 Units AxisUnits `protobuf:"varint,7,req,name=units,enum=cockroach.ts.catalog.AxisUnits" json:"units"` 246 // axisLabel defines the chart's y-axis label. 247 AxisLabel string `protobuf:"bytes,8,req,name=axisLabel" json:"axisLabel"` 248 // percentiles specifies whether the chart should have its metrics broken 249 // out into percentiles; applies only to histograms. 250 Percentiles bool `protobuf:"varint,9,req,name=percentiles" json:"percentiles"` 251 // metrics specifies the metics the chart should display. 252 Metrics []ChartMetric `protobuf:"bytes,10,rep,name=metrics" json:"metrics"` 253 } 254 255 func (m *IndividualChart) Reset() { *m = IndividualChart{} } 256 func (m *IndividualChart) String() string { return proto.CompactTextString(m) } 257 func (*IndividualChart) ProtoMessage() {} 258 func (*IndividualChart) Descriptor() ([]byte, []int) { 259 return fileDescriptor_chart_catalog_38c5478e18a7ed60, []int{1} 260 } 261 func (m *IndividualChart) XXX_Unmarshal(b []byte) error { 262 return m.Unmarshal(b) 263 } 264 func (m *IndividualChart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 265 b = b[:cap(b)] 266 n, err := m.MarshalTo(b) 267 if err != nil { 268 return nil, err 269 } 270 return b[:n], nil 271 } 272 func (dst *IndividualChart) XXX_Merge(src proto.Message) { 273 xxx_messageInfo_IndividualChart.Merge(dst, src) 274 } 275 func (m *IndividualChart) XXX_Size() int { 276 return m.Size() 277 } 278 func (m *IndividualChart) XXX_DiscardUnknown() { 279 xxx_messageInfo_IndividualChart.DiscardUnknown(m) 280 } 281 282 var xxx_messageInfo_IndividualChart proto.InternalMessageInfo 283 284 // ChartSections organize charts into groups that contain slices or charts and 285 // other subsections. 286 type ChartSection struct { 287 // title is the title of the section. 288 Title string `protobuf:"bytes,1,req,name=title" json:"title"` 289 // longname displays the section's organization within the catalog. 290 LongTitle string `protobuf:"bytes,2,req,name=longTitle" json:"longTitle"` 291 // collectionName uniquely identifies a section. 292 CollectionTitle string `protobuf:"bytes,3,req,name=collectionTitle" json:"collectionTitle"` 293 // description describes how to interpret the relationship of subsections 294 // and charts. It's only planned use is in the catalog page for Level 0 295 // sections. 296 Description string `protobuf:"bytes,4,req,name=description" json:"description"` 297 // level represents the section's depth in the catalog's organization. 298 Level int32 `protobuf:"varint,5,req,name=level" json:"level"` 299 // subsections are deeper levels of the chart's organization. 300 Subsections []*ChartSection `protobuf:"bytes,6,rep,name=subsections" json:"subsections,omitempty"` 301 // charts are the IndividualCharts that are grouped into this section. 302 Charts []*IndividualChart `protobuf:"bytes,7,rep,name=charts" json:"charts,omitempty"` 303 } 304 305 func (m *ChartSection) Reset() { *m = ChartSection{} } 306 func (m *ChartSection) String() string { return proto.CompactTextString(m) } 307 func (*ChartSection) ProtoMessage() {} 308 func (*ChartSection) Descriptor() ([]byte, []int) { 309 return fileDescriptor_chart_catalog_38c5478e18a7ed60, []int{2} 310 } 311 func (m *ChartSection) XXX_Unmarshal(b []byte) error { 312 return m.Unmarshal(b) 313 } 314 func (m *ChartSection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 315 b = b[:cap(b)] 316 n, err := m.MarshalTo(b) 317 if err != nil { 318 return nil, err 319 } 320 return b[:n], nil 321 } 322 func (dst *ChartSection) XXX_Merge(src proto.Message) { 323 xxx_messageInfo_ChartSection.Merge(dst, src) 324 } 325 func (m *ChartSection) XXX_Size() int { 326 return m.Size() 327 } 328 func (m *ChartSection) XXX_DiscardUnknown() { 329 xxx_messageInfo_ChartSection.DiscardUnknown(m) 330 } 331 332 var xxx_messageInfo_ChartSection proto.InternalMessageInfo 333 334 func init() { 335 proto.RegisterType((*ChartMetric)(nil), "cockroach.ts.catalog.ChartMetric") 336 proto.RegisterType((*IndividualChart)(nil), "cockroach.ts.catalog.IndividualChart") 337 proto.RegisterType((*ChartSection)(nil), "cockroach.ts.catalog.ChartSection") 338 proto.RegisterEnum("cockroach.ts.catalog.AxisUnits", AxisUnits_name, AxisUnits_value) 339 proto.RegisterEnum("cockroach.ts.catalog.DescribeAggregator", DescribeAggregator_name, DescribeAggregator_value) 340 proto.RegisterEnum("cockroach.ts.catalog.DescribeDerivative", DescribeDerivative_name, DescribeDerivative_value) 341 } 342 func (m *ChartMetric) Marshal() (dAtA []byte, err error) { 343 size := m.Size() 344 dAtA = make([]byte, size) 345 n, err := m.MarshalTo(dAtA) 346 if err != nil { 347 return nil, err 348 } 349 return dAtA[:n], nil 350 } 351 352 func (m *ChartMetric) MarshalTo(dAtA []byte) (int, error) { 353 var i int 354 _ = i 355 var l int 356 _ = l 357 dAtA[i] = 0xa 358 i++ 359 i = encodeVarintChartCatalog(dAtA, i, uint64(len(m.Name))) 360 i += copy(dAtA[i:], m.Name) 361 dAtA[i] = 0x12 362 i++ 363 i = encodeVarintChartCatalog(dAtA, i, uint64(len(m.Help))) 364 i += copy(dAtA[i:], m.Help) 365 dAtA[i] = 0x1a 366 i++ 367 i = encodeVarintChartCatalog(dAtA, i, uint64(len(m.AxisLabel))) 368 i += copy(dAtA[i:], m.AxisLabel) 369 dAtA[i] = 0x20 370 i++ 371 i = encodeVarintChartCatalog(dAtA, i, uint64(m.PreferredUnits)) 372 dAtA[i] = 0x28 373 i++ 374 i = encodeVarintChartCatalog(dAtA, i, uint64(m.MetricType)) 375 return i, nil 376 } 377 378 func (m *IndividualChart) Marshal() (dAtA []byte, err error) { 379 size := m.Size() 380 dAtA = make([]byte, size) 381 n, err := m.MarshalTo(dAtA) 382 if err != nil { 383 return nil, err 384 } 385 return dAtA[:n], nil 386 } 387 388 func (m *IndividualChart) MarshalTo(dAtA []byte) (int, error) { 389 var i int 390 _ = i 391 var l int 392 _ = l 393 dAtA[i] = 0xa 394 i++ 395 i = encodeVarintChartCatalog(dAtA, i, uint64(len(m.Title))) 396 i += copy(dAtA[i:], m.Title) 397 dAtA[i] = 0x12 398 i++ 399 i = encodeVarintChartCatalog(dAtA, i, uint64(len(m.LongTitle))) 400 i += copy(dAtA[i:], m.LongTitle) 401 dAtA[i] = 0x1a 402 i++ 403 i = encodeVarintChartCatalog(dAtA, i, uint64(len(m.CollectionTitle))) 404 i += copy(dAtA[i:], m.CollectionTitle) 405 if m.Downsampler == nil { 406 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("downsampler") 407 } else { 408 dAtA[i] = 0x20 409 i++ 410 i = encodeVarintChartCatalog(dAtA, i, uint64(*m.Downsampler)) 411 } 412 if m.Aggregator == nil { 413 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("aggregator") 414 } else { 415 dAtA[i] = 0x28 416 i++ 417 i = encodeVarintChartCatalog(dAtA, i, uint64(*m.Aggregator)) 418 } 419 if m.Derivative == nil { 420 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("derivative") 421 } else { 422 dAtA[i] = 0x30 423 i++ 424 i = encodeVarintChartCatalog(dAtA, i, uint64(*m.Derivative)) 425 } 426 dAtA[i] = 0x38 427 i++ 428 i = encodeVarintChartCatalog(dAtA, i, uint64(m.Units)) 429 dAtA[i] = 0x42 430 i++ 431 i = encodeVarintChartCatalog(dAtA, i, uint64(len(m.AxisLabel))) 432 i += copy(dAtA[i:], m.AxisLabel) 433 dAtA[i] = 0x48 434 i++ 435 if m.Percentiles { 436 dAtA[i] = 1 437 } else { 438 dAtA[i] = 0 439 } 440 i++ 441 if len(m.Metrics) > 0 { 442 for _, msg := range m.Metrics { 443 dAtA[i] = 0x52 444 i++ 445 i = encodeVarintChartCatalog(dAtA, i, uint64(msg.Size())) 446 n, err := msg.MarshalTo(dAtA[i:]) 447 if err != nil { 448 return 0, err 449 } 450 i += n 451 } 452 } 453 return i, nil 454 } 455 456 func (m *ChartSection) Marshal() (dAtA []byte, err error) { 457 size := m.Size() 458 dAtA = make([]byte, size) 459 n, err := m.MarshalTo(dAtA) 460 if err != nil { 461 return nil, err 462 } 463 return dAtA[:n], nil 464 } 465 466 func (m *ChartSection) MarshalTo(dAtA []byte) (int, error) { 467 var i int 468 _ = i 469 var l int 470 _ = l 471 dAtA[i] = 0xa 472 i++ 473 i = encodeVarintChartCatalog(dAtA, i, uint64(len(m.Title))) 474 i += copy(dAtA[i:], m.Title) 475 dAtA[i] = 0x12 476 i++ 477 i = encodeVarintChartCatalog(dAtA, i, uint64(len(m.LongTitle))) 478 i += copy(dAtA[i:], m.LongTitle) 479 dAtA[i] = 0x1a 480 i++ 481 i = encodeVarintChartCatalog(dAtA, i, uint64(len(m.CollectionTitle))) 482 i += copy(dAtA[i:], m.CollectionTitle) 483 dAtA[i] = 0x22 484 i++ 485 i = encodeVarintChartCatalog(dAtA, i, uint64(len(m.Description))) 486 i += copy(dAtA[i:], m.Description) 487 dAtA[i] = 0x28 488 i++ 489 i = encodeVarintChartCatalog(dAtA, i, uint64(m.Level)) 490 if len(m.Subsections) > 0 { 491 for _, msg := range m.Subsections { 492 dAtA[i] = 0x32 493 i++ 494 i = encodeVarintChartCatalog(dAtA, i, uint64(msg.Size())) 495 n, err := msg.MarshalTo(dAtA[i:]) 496 if err != nil { 497 return 0, err 498 } 499 i += n 500 } 501 } 502 if len(m.Charts) > 0 { 503 for _, msg := range m.Charts { 504 dAtA[i] = 0x3a 505 i++ 506 i = encodeVarintChartCatalog(dAtA, i, uint64(msg.Size())) 507 n, err := msg.MarshalTo(dAtA[i:]) 508 if err != nil { 509 return 0, err 510 } 511 i += n 512 } 513 } 514 return i, nil 515 } 516 517 func encodeVarintChartCatalog(dAtA []byte, offset int, v uint64) int { 518 for v >= 1<<7 { 519 dAtA[offset] = uint8(v&0x7f | 0x80) 520 v >>= 7 521 offset++ 522 } 523 dAtA[offset] = uint8(v) 524 return offset + 1 525 } 526 func (m *ChartMetric) Size() (n int) { 527 if m == nil { 528 return 0 529 } 530 var l int 531 _ = l 532 l = len(m.Name) 533 n += 1 + l + sovChartCatalog(uint64(l)) 534 l = len(m.Help) 535 n += 1 + l + sovChartCatalog(uint64(l)) 536 l = len(m.AxisLabel) 537 n += 1 + l + sovChartCatalog(uint64(l)) 538 n += 1 + sovChartCatalog(uint64(m.PreferredUnits)) 539 n += 1 + sovChartCatalog(uint64(m.MetricType)) 540 return n 541 } 542 543 func (m *IndividualChart) Size() (n int) { 544 if m == nil { 545 return 0 546 } 547 var l int 548 _ = l 549 l = len(m.Title) 550 n += 1 + l + sovChartCatalog(uint64(l)) 551 l = len(m.LongTitle) 552 n += 1 + l + sovChartCatalog(uint64(l)) 553 l = len(m.CollectionTitle) 554 n += 1 + l + sovChartCatalog(uint64(l)) 555 if m.Downsampler != nil { 556 n += 1 + sovChartCatalog(uint64(*m.Downsampler)) 557 } 558 if m.Aggregator != nil { 559 n += 1 + sovChartCatalog(uint64(*m.Aggregator)) 560 } 561 if m.Derivative != nil { 562 n += 1 + sovChartCatalog(uint64(*m.Derivative)) 563 } 564 n += 1 + sovChartCatalog(uint64(m.Units)) 565 l = len(m.AxisLabel) 566 n += 1 + l + sovChartCatalog(uint64(l)) 567 n += 2 568 if len(m.Metrics) > 0 { 569 for _, e := range m.Metrics { 570 l = e.Size() 571 n += 1 + l + sovChartCatalog(uint64(l)) 572 } 573 } 574 return n 575 } 576 577 func (m *ChartSection) Size() (n int) { 578 if m == nil { 579 return 0 580 } 581 var l int 582 _ = l 583 l = len(m.Title) 584 n += 1 + l + sovChartCatalog(uint64(l)) 585 l = len(m.LongTitle) 586 n += 1 + l + sovChartCatalog(uint64(l)) 587 l = len(m.CollectionTitle) 588 n += 1 + l + sovChartCatalog(uint64(l)) 589 l = len(m.Description) 590 n += 1 + l + sovChartCatalog(uint64(l)) 591 n += 1 + sovChartCatalog(uint64(m.Level)) 592 if len(m.Subsections) > 0 { 593 for _, e := range m.Subsections { 594 l = e.Size() 595 n += 1 + l + sovChartCatalog(uint64(l)) 596 } 597 } 598 if len(m.Charts) > 0 { 599 for _, e := range m.Charts { 600 l = e.Size() 601 n += 1 + l + sovChartCatalog(uint64(l)) 602 } 603 } 604 return n 605 } 606 607 func sovChartCatalog(x uint64) (n int) { 608 for { 609 n++ 610 x >>= 7 611 if x == 0 { 612 break 613 } 614 } 615 return n 616 } 617 func sozChartCatalog(x uint64) (n int) { 618 return sovChartCatalog(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 619 } 620 func (m *ChartMetric) Unmarshal(dAtA []byte) error { 621 var hasFields [1]uint64 622 l := len(dAtA) 623 iNdEx := 0 624 for iNdEx < l { 625 preIndex := iNdEx 626 var wire uint64 627 for shift := uint(0); ; shift += 7 { 628 if shift >= 64 { 629 return ErrIntOverflowChartCatalog 630 } 631 if iNdEx >= l { 632 return io.ErrUnexpectedEOF 633 } 634 b := dAtA[iNdEx] 635 iNdEx++ 636 wire |= (uint64(b) & 0x7F) << shift 637 if b < 0x80 { 638 break 639 } 640 } 641 fieldNum := int32(wire >> 3) 642 wireType := int(wire & 0x7) 643 if wireType == 4 { 644 return fmt.Errorf("proto: ChartMetric: wiretype end group for non-group") 645 } 646 if fieldNum <= 0 { 647 return fmt.Errorf("proto: ChartMetric: illegal tag %d (wire type %d)", fieldNum, wire) 648 } 649 switch fieldNum { 650 case 1: 651 if wireType != 2 { 652 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 653 } 654 var stringLen uint64 655 for shift := uint(0); ; shift += 7 { 656 if shift >= 64 { 657 return ErrIntOverflowChartCatalog 658 } 659 if iNdEx >= l { 660 return io.ErrUnexpectedEOF 661 } 662 b := dAtA[iNdEx] 663 iNdEx++ 664 stringLen |= (uint64(b) & 0x7F) << shift 665 if b < 0x80 { 666 break 667 } 668 } 669 intStringLen := int(stringLen) 670 if intStringLen < 0 { 671 return ErrInvalidLengthChartCatalog 672 } 673 postIndex := iNdEx + intStringLen 674 if postIndex > l { 675 return io.ErrUnexpectedEOF 676 } 677 m.Name = string(dAtA[iNdEx:postIndex]) 678 iNdEx = postIndex 679 hasFields[0] |= uint64(0x00000001) 680 case 2: 681 if wireType != 2 { 682 return fmt.Errorf("proto: wrong wireType = %d for field Help", wireType) 683 } 684 var stringLen uint64 685 for shift := uint(0); ; shift += 7 { 686 if shift >= 64 { 687 return ErrIntOverflowChartCatalog 688 } 689 if iNdEx >= l { 690 return io.ErrUnexpectedEOF 691 } 692 b := dAtA[iNdEx] 693 iNdEx++ 694 stringLen |= (uint64(b) & 0x7F) << shift 695 if b < 0x80 { 696 break 697 } 698 } 699 intStringLen := int(stringLen) 700 if intStringLen < 0 { 701 return ErrInvalidLengthChartCatalog 702 } 703 postIndex := iNdEx + intStringLen 704 if postIndex > l { 705 return io.ErrUnexpectedEOF 706 } 707 m.Help = string(dAtA[iNdEx:postIndex]) 708 iNdEx = postIndex 709 hasFields[0] |= uint64(0x00000002) 710 case 3: 711 if wireType != 2 { 712 return fmt.Errorf("proto: wrong wireType = %d for field AxisLabel", wireType) 713 } 714 var stringLen uint64 715 for shift := uint(0); ; shift += 7 { 716 if shift >= 64 { 717 return ErrIntOverflowChartCatalog 718 } 719 if iNdEx >= l { 720 return io.ErrUnexpectedEOF 721 } 722 b := dAtA[iNdEx] 723 iNdEx++ 724 stringLen |= (uint64(b) & 0x7F) << shift 725 if b < 0x80 { 726 break 727 } 728 } 729 intStringLen := int(stringLen) 730 if intStringLen < 0 { 731 return ErrInvalidLengthChartCatalog 732 } 733 postIndex := iNdEx + intStringLen 734 if postIndex > l { 735 return io.ErrUnexpectedEOF 736 } 737 m.AxisLabel = string(dAtA[iNdEx:postIndex]) 738 iNdEx = postIndex 739 hasFields[0] |= uint64(0x00000004) 740 case 4: 741 if wireType != 0 { 742 return fmt.Errorf("proto: wrong wireType = %d for field PreferredUnits", wireType) 743 } 744 m.PreferredUnits = 0 745 for shift := uint(0); ; shift += 7 { 746 if shift >= 64 { 747 return ErrIntOverflowChartCatalog 748 } 749 if iNdEx >= l { 750 return io.ErrUnexpectedEOF 751 } 752 b := dAtA[iNdEx] 753 iNdEx++ 754 m.PreferredUnits |= (AxisUnits(b) & 0x7F) << shift 755 if b < 0x80 { 756 break 757 } 758 } 759 hasFields[0] |= uint64(0x00000008) 760 case 5: 761 if wireType != 0 { 762 return fmt.Errorf("proto: wrong wireType = %d for field MetricType", wireType) 763 } 764 m.MetricType = 0 765 for shift := uint(0); ; shift += 7 { 766 if shift >= 64 { 767 return ErrIntOverflowChartCatalog 768 } 769 if iNdEx >= l { 770 return io.ErrUnexpectedEOF 771 } 772 b := dAtA[iNdEx] 773 iNdEx++ 774 m.MetricType |= (_go.MetricType(b) & 0x7F) << shift 775 if b < 0x80 { 776 break 777 } 778 } 779 default: 780 iNdEx = preIndex 781 skippy, err := skipChartCatalog(dAtA[iNdEx:]) 782 if err != nil { 783 return err 784 } 785 if skippy < 0 { 786 return ErrInvalidLengthChartCatalog 787 } 788 if (iNdEx + skippy) > l { 789 return io.ErrUnexpectedEOF 790 } 791 iNdEx += skippy 792 } 793 } 794 if hasFields[0]&uint64(0x00000001) == 0 { 795 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") 796 } 797 if hasFields[0]&uint64(0x00000002) == 0 { 798 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("help") 799 } 800 if hasFields[0]&uint64(0x00000004) == 0 { 801 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("axisLabel") 802 } 803 if hasFields[0]&uint64(0x00000008) == 0 { 804 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("preferredUnits") 805 } 806 807 if iNdEx > l { 808 return io.ErrUnexpectedEOF 809 } 810 return nil 811 } 812 func (m *IndividualChart) Unmarshal(dAtA []byte) error { 813 var hasFields [1]uint64 814 l := len(dAtA) 815 iNdEx := 0 816 for iNdEx < l { 817 preIndex := iNdEx 818 var wire uint64 819 for shift := uint(0); ; shift += 7 { 820 if shift >= 64 { 821 return ErrIntOverflowChartCatalog 822 } 823 if iNdEx >= l { 824 return io.ErrUnexpectedEOF 825 } 826 b := dAtA[iNdEx] 827 iNdEx++ 828 wire |= (uint64(b) & 0x7F) << shift 829 if b < 0x80 { 830 break 831 } 832 } 833 fieldNum := int32(wire >> 3) 834 wireType := int(wire & 0x7) 835 if wireType == 4 { 836 return fmt.Errorf("proto: IndividualChart: wiretype end group for non-group") 837 } 838 if fieldNum <= 0 { 839 return fmt.Errorf("proto: IndividualChart: illegal tag %d (wire type %d)", fieldNum, wire) 840 } 841 switch fieldNum { 842 case 1: 843 if wireType != 2 { 844 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 845 } 846 var stringLen uint64 847 for shift := uint(0); ; shift += 7 { 848 if shift >= 64 { 849 return ErrIntOverflowChartCatalog 850 } 851 if iNdEx >= l { 852 return io.ErrUnexpectedEOF 853 } 854 b := dAtA[iNdEx] 855 iNdEx++ 856 stringLen |= (uint64(b) & 0x7F) << shift 857 if b < 0x80 { 858 break 859 } 860 } 861 intStringLen := int(stringLen) 862 if intStringLen < 0 { 863 return ErrInvalidLengthChartCatalog 864 } 865 postIndex := iNdEx + intStringLen 866 if postIndex > l { 867 return io.ErrUnexpectedEOF 868 } 869 m.Title = string(dAtA[iNdEx:postIndex]) 870 iNdEx = postIndex 871 hasFields[0] |= uint64(0x00000001) 872 case 2: 873 if wireType != 2 { 874 return fmt.Errorf("proto: wrong wireType = %d for field LongTitle", wireType) 875 } 876 var stringLen uint64 877 for shift := uint(0); ; shift += 7 { 878 if shift >= 64 { 879 return ErrIntOverflowChartCatalog 880 } 881 if iNdEx >= l { 882 return io.ErrUnexpectedEOF 883 } 884 b := dAtA[iNdEx] 885 iNdEx++ 886 stringLen |= (uint64(b) & 0x7F) << shift 887 if b < 0x80 { 888 break 889 } 890 } 891 intStringLen := int(stringLen) 892 if intStringLen < 0 { 893 return ErrInvalidLengthChartCatalog 894 } 895 postIndex := iNdEx + intStringLen 896 if postIndex > l { 897 return io.ErrUnexpectedEOF 898 } 899 m.LongTitle = string(dAtA[iNdEx:postIndex]) 900 iNdEx = postIndex 901 hasFields[0] |= uint64(0x00000002) 902 case 3: 903 if wireType != 2 { 904 return fmt.Errorf("proto: wrong wireType = %d for field CollectionTitle", wireType) 905 } 906 var stringLen uint64 907 for shift := uint(0); ; shift += 7 { 908 if shift >= 64 { 909 return ErrIntOverflowChartCatalog 910 } 911 if iNdEx >= l { 912 return io.ErrUnexpectedEOF 913 } 914 b := dAtA[iNdEx] 915 iNdEx++ 916 stringLen |= (uint64(b) & 0x7F) << shift 917 if b < 0x80 { 918 break 919 } 920 } 921 intStringLen := int(stringLen) 922 if intStringLen < 0 { 923 return ErrInvalidLengthChartCatalog 924 } 925 postIndex := iNdEx + intStringLen 926 if postIndex > l { 927 return io.ErrUnexpectedEOF 928 } 929 m.CollectionTitle = string(dAtA[iNdEx:postIndex]) 930 iNdEx = postIndex 931 hasFields[0] |= uint64(0x00000004) 932 case 4: 933 if wireType != 0 { 934 return fmt.Errorf("proto: wrong wireType = %d for field Downsampler", wireType) 935 } 936 var v tspb.TimeSeriesQueryAggregator 937 for shift := uint(0); ; shift += 7 { 938 if shift >= 64 { 939 return ErrIntOverflowChartCatalog 940 } 941 if iNdEx >= l { 942 return io.ErrUnexpectedEOF 943 } 944 b := dAtA[iNdEx] 945 iNdEx++ 946 v |= (tspb.TimeSeriesQueryAggregator(b) & 0x7F) << shift 947 if b < 0x80 { 948 break 949 } 950 } 951 m.Downsampler = &v 952 hasFields[0] |= uint64(0x00000008) 953 case 5: 954 if wireType != 0 { 955 return fmt.Errorf("proto: wrong wireType = %d for field Aggregator", wireType) 956 } 957 var v tspb.TimeSeriesQueryAggregator 958 for shift := uint(0); ; shift += 7 { 959 if shift >= 64 { 960 return ErrIntOverflowChartCatalog 961 } 962 if iNdEx >= l { 963 return io.ErrUnexpectedEOF 964 } 965 b := dAtA[iNdEx] 966 iNdEx++ 967 v |= (tspb.TimeSeriesQueryAggregator(b) & 0x7F) << shift 968 if b < 0x80 { 969 break 970 } 971 } 972 m.Aggregator = &v 973 hasFields[0] |= uint64(0x00000010) 974 case 6: 975 if wireType != 0 { 976 return fmt.Errorf("proto: wrong wireType = %d for field Derivative", wireType) 977 } 978 var v tspb.TimeSeriesQueryDerivative 979 for shift := uint(0); ; shift += 7 { 980 if shift >= 64 { 981 return ErrIntOverflowChartCatalog 982 } 983 if iNdEx >= l { 984 return io.ErrUnexpectedEOF 985 } 986 b := dAtA[iNdEx] 987 iNdEx++ 988 v |= (tspb.TimeSeriesQueryDerivative(b) & 0x7F) << shift 989 if b < 0x80 { 990 break 991 } 992 } 993 m.Derivative = &v 994 hasFields[0] |= uint64(0x00000020) 995 case 7: 996 if wireType != 0 { 997 return fmt.Errorf("proto: wrong wireType = %d for field Units", wireType) 998 } 999 m.Units = 0 1000 for shift := uint(0); ; shift += 7 { 1001 if shift >= 64 { 1002 return ErrIntOverflowChartCatalog 1003 } 1004 if iNdEx >= l { 1005 return io.ErrUnexpectedEOF 1006 } 1007 b := dAtA[iNdEx] 1008 iNdEx++ 1009 m.Units |= (AxisUnits(b) & 0x7F) << shift 1010 if b < 0x80 { 1011 break 1012 } 1013 } 1014 hasFields[0] |= uint64(0x00000040) 1015 case 8: 1016 if wireType != 2 { 1017 return fmt.Errorf("proto: wrong wireType = %d for field AxisLabel", wireType) 1018 } 1019 var stringLen uint64 1020 for shift := uint(0); ; shift += 7 { 1021 if shift >= 64 { 1022 return ErrIntOverflowChartCatalog 1023 } 1024 if iNdEx >= l { 1025 return io.ErrUnexpectedEOF 1026 } 1027 b := dAtA[iNdEx] 1028 iNdEx++ 1029 stringLen |= (uint64(b) & 0x7F) << shift 1030 if b < 0x80 { 1031 break 1032 } 1033 } 1034 intStringLen := int(stringLen) 1035 if intStringLen < 0 { 1036 return ErrInvalidLengthChartCatalog 1037 } 1038 postIndex := iNdEx + intStringLen 1039 if postIndex > l { 1040 return io.ErrUnexpectedEOF 1041 } 1042 m.AxisLabel = string(dAtA[iNdEx:postIndex]) 1043 iNdEx = postIndex 1044 hasFields[0] |= uint64(0x00000080) 1045 case 9: 1046 if wireType != 0 { 1047 return fmt.Errorf("proto: wrong wireType = %d for field Percentiles", wireType) 1048 } 1049 var v int 1050 for shift := uint(0); ; shift += 7 { 1051 if shift >= 64 { 1052 return ErrIntOverflowChartCatalog 1053 } 1054 if iNdEx >= l { 1055 return io.ErrUnexpectedEOF 1056 } 1057 b := dAtA[iNdEx] 1058 iNdEx++ 1059 v |= (int(b) & 0x7F) << shift 1060 if b < 0x80 { 1061 break 1062 } 1063 } 1064 m.Percentiles = bool(v != 0) 1065 hasFields[0] |= uint64(0x00000100) 1066 case 10: 1067 if wireType != 2 { 1068 return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) 1069 } 1070 var msglen int 1071 for shift := uint(0); ; shift += 7 { 1072 if shift >= 64 { 1073 return ErrIntOverflowChartCatalog 1074 } 1075 if iNdEx >= l { 1076 return io.ErrUnexpectedEOF 1077 } 1078 b := dAtA[iNdEx] 1079 iNdEx++ 1080 msglen |= (int(b) & 0x7F) << shift 1081 if b < 0x80 { 1082 break 1083 } 1084 } 1085 if msglen < 0 { 1086 return ErrInvalidLengthChartCatalog 1087 } 1088 postIndex := iNdEx + msglen 1089 if postIndex > l { 1090 return io.ErrUnexpectedEOF 1091 } 1092 m.Metrics = append(m.Metrics, ChartMetric{}) 1093 if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1094 return err 1095 } 1096 iNdEx = postIndex 1097 default: 1098 iNdEx = preIndex 1099 skippy, err := skipChartCatalog(dAtA[iNdEx:]) 1100 if err != nil { 1101 return err 1102 } 1103 if skippy < 0 { 1104 return ErrInvalidLengthChartCatalog 1105 } 1106 if (iNdEx + skippy) > l { 1107 return io.ErrUnexpectedEOF 1108 } 1109 iNdEx += skippy 1110 } 1111 } 1112 if hasFields[0]&uint64(0x00000001) == 0 { 1113 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("title") 1114 } 1115 if hasFields[0]&uint64(0x00000002) == 0 { 1116 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("longTitle") 1117 } 1118 if hasFields[0]&uint64(0x00000004) == 0 { 1119 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("collectionTitle") 1120 } 1121 if hasFields[0]&uint64(0x00000008) == 0 { 1122 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("downsampler") 1123 } 1124 if hasFields[0]&uint64(0x00000010) == 0 { 1125 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("aggregator") 1126 } 1127 if hasFields[0]&uint64(0x00000020) == 0 { 1128 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("derivative") 1129 } 1130 if hasFields[0]&uint64(0x00000040) == 0 { 1131 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("units") 1132 } 1133 if hasFields[0]&uint64(0x00000080) == 0 { 1134 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("axisLabel") 1135 } 1136 if hasFields[0]&uint64(0x00000100) == 0 { 1137 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("percentiles") 1138 } 1139 1140 if iNdEx > l { 1141 return io.ErrUnexpectedEOF 1142 } 1143 return nil 1144 } 1145 func (m *ChartSection) Unmarshal(dAtA []byte) error { 1146 var hasFields [1]uint64 1147 l := len(dAtA) 1148 iNdEx := 0 1149 for iNdEx < l { 1150 preIndex := iNdEx 1151 var wire uint64 1152 for shift := uint(0); ; shift += 7 { 1153 if shift >= 64 { 1154 return ErrIntOverflowChartCatalog 1155 } 1156 if iNdEx >= l { 1157 return io.ErrUnexpectedEOF 1158 } 1159 b := dAtA[iNdEx] 1160 iNdEx++ 1161 wire |= (uint64(b) & 0x7F) << shift 1162 if b < 0x80 { 1163 break 1164 } 1165 } 1166 fieldNum := int32(wire >> 3) 1167 wireType := int(wire & 0x7) 1168 if wireType == 4 { 1169 return fmt.Errorf("proto: ChartSection: wiretype end group for non-group") 1170 } 1171 if fieldNum <= 0 { 1172 return fmt.Errorf("proto: ChartSection: illegal tag %d (wire type %d)", fieldNum, wire) 1173 } 1174 switch fieldNum { 1175 case 1: 1176 if wireType != 2 { 1177 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 1178 } 1179 var stringLen uint64 1180 for shift := uint(0); ; shift += 7 { 1181 if shift >= 64 { 1182 return ErrIntOverflowChartCatalog 1183 } 1184 if iNdEx >= l { 1185 return io.ErrUnexpectedEOF 1186 } 1187 b := dAtA[iNdEx] 1188 iNdEx++ 1189 stringLen |= (uint64(b) & 0x7F) << shift 1190 if b < 0x80 { 1191 break 1192 } 1193 } 1194 intStringLen := int(stringLen) 1195 if intStringLen < 0 { 1196 return ErrInvalidLengthChartCatalog 1197 } 1198 postIndex := iNdEx + intStringLen 1199 if postIndex > l { 1200 return io.ErrUnexpectedEOF 1201 } 1202 m.Title = string(dAtA[iNdEx:postIndex]) 1203 iNdEx = postIndex 1204 hasFields[0] |= uint64(0x00000001) 1205 case 2: 1206 if wireType != 2 { 1207 return fmt.Errorf("proto: wrong wireType = %d for field LongTitle", wireType) 1208 } 1209 var stringLen uint64 1210 for shift := uint(0); ; shift += 7 { 1211 if shift >= 64 { 1212 return ErrIntOverflowChartCatalog 1213 } 1214 if iNdEx >= l { 1215 return io.ErrUnexpectedEOF 1216 } 1217 b := dAtA[iNdEx] 1218 iNdEx++ 1219 stringLen |= (uint64(b) & 0x7F) << shift 1220 if b < 0x80 { 1221 break 1222 } 1223 } 1224 intStringLen := int(stringLen) 1225 if intStringLen < 0 { 1226 return ErrInvalidLengthChartCatalog 1227 } 1228 postIndex := iNdEx + intStringLen 1229 if postIndex > l { 1230 return io.ErrUnexpectedEOF 1231 } 1232 m.LongTitle = string(dAtA[iNdEx:postIndex]) 1233 iNdEx = postIndex 1234 hasFields[0] |= uint64(0x00000002) 1235 case 3: 1236 if wireType != 2 { 1237 return fmt.Errorf("proto: wrong wireType = %d for field CollectionTitle", wireType) 1238 } 1239 var stringLen uint64 1240 for shift := uint(0); ; shift += 7 { 1241 if shift >= 64 { 1242 return ErrIntOverflowChartCatalog 1243 } 1244 if iNdEx >= l { 1245 return io.ErrUnexpectedEOF 1246 } 1247 b := dAtA[iNdEx] 1248 iNdEx++ 1249 stringLen |= (uint64(b) & 0x7F) << shift 1250 if b < 0x80 { 1251 break 1252 } 1253 } 1254 intStringLen := int(stringLen) 1255 if intStringLen < 0 { 1256 return ErrInvalidLengthChartCatalog 1257 } 1258 postIndex := iNdEx + intStringLen 1259 if postIndex > l { 1260 return io.ErrUnexpectedEOF 1261 } 1262 m.CollectionTitle = string(dAtA[iNdEx:postIndex]) 1263 iNdEx = postIndex 1264 hasFields[0] |= uint64(0x00000004) 1265 case 4: 1266 if wireType != 2 { 1267 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 1268 } 1269 var stringLen uint64 1270 for shift := uint(0); ; shift += 7 { 1271 if shift >= 64 { 1272 return ErrIntOverflowChartCatalog 1273 } 1274 if iNdEx >= l { 1275 return io.ErrUnexpectedEOF 1276 } 1277 b := dAtA[iNdEx] 1278 iNdEx++ 1279 stringLen |= (uint64(b) & 0x7F) << shift 1280 if b < 0x80 { 1281 break 1282 } 1283 } 1284 intStringLen := int(stringLen) 1285 if intStringLen < 0 { 1286 return ErrInvalidLengthChartCatalog 1287 } 1288 postIndex := iNdEx + intStringLen 1289 if postIndex > l { 1290 return io.ErrUnexpectedEOF 1291 } 1292 m.Description = string(dAtA[iNdEx:postIndex]) 1293 iNdEx = postIndex 1294 hasFields[0] |= uint64(0x00000008) 1295 case 5: 1296 if wireType != 0 { 1297 return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) 1298 } 1299 m.Level = 0 1300 for shift := uint(0); ; shift += 7 { 1301 if shift >= 64 { 1302 return ErrIntOverflowChartCatalog 1303 } 1304 if iNdEx >= l { 1305 return io.ErrUnexpectedEOF 1306 } 1307 b := dAtA[iNdEx] 1308 iNdEx++ 1309 m.Level |= (int32(b) & 0x7F) << shift 1310 if b < 0x80 { 1311 break 1312 } 1313 } 1314 hasFields[0] |= uint64(0x00000010) 1315 case 6: 1316 if wireType != 2 { 1317 return fmt.Errorf("proto: wrong wireType = %d for field Subsections", wireType) 1318 } 1319 var msglen int 1320 for shift := uint(0); ; shift += 7 { 1321 if shift >= 64 { 1322 return ErrIntOverflowChartCatalog 1323 } 1324 if iNdEx >= l { 1325 return io.ErrUnexpectedEOF 1326 } 1327 b := dAtA[iNdEx] 1328 iNdEx++ 1329 msglen |= (int(b) & 0x7F) << shift 1330 if b < 0x80 { 1331 break 1332 } 1333 } 1334 if msglen < 0 { 1335 return ErrInvalidLengthChartCatalog 1336 } 1337 postIndex := iNdEx + msglen 1338 if postIndex > l { 1339 return io.ErrUnexpectedEOF 1340 } 1341 m.Subsections = append(m.Subsections, &ChartSection{}) 1342 if err := m.Subsections[len(m.Subsections)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1343 return err 1344 } 1345 iNdEx = postIndex 1346 case 7: 1347 if wireType != 2 { 1348 return fmt.Errorf("proto: wrong wireType = %d for field Charts", wireType) 1349 } 1350 var msglen int 1351 for shift := uint(0); ; shift += 7 { 1352 if shift >= 64 { 1353 return ErrIntOverflowChartCatalog 1354 } 1355 if iNdEx >= l { 1356 return io.ErrUnexpectedEOF 1357 } 1358 b := dAtA[iNdEx] 1359 iNdEx++ 1360 msglen |= (int(b) & 0x7F) << shift 1361 if b < 0x80 { 1362 break 1363 } 1364 } 1365 if msglen < 0 { 1366 return ErrInvalidLengthChartCatalog 1367 } 1368 postIndex := iNdEx + msglen 1369 if postIndex > l { 1370 return io.ErrUnexpectedEOF 1371 } 1372 m.Charts = append(m.Charts, &IndividualChart{}) 1373 if err := m.Charts[len(m.Charts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1374 return err 1375 } 1376 iNdEx = postIndex 1377 default: 1378 iNdEx = preIndex 1379 skippy, err := skipChartCatalog(dAtA[iNdEx:]) 1380 if err != nil { 1381 return err 1382 } 1383 if skippy < 0 { 1384 return ErrInvalidLengthChartCatalog 1385 } 1386 if (iNdEx + skippy) > l { 1387 return io.ErrUnexpectedEOF 1388 } 1389 iNdEx += skippy 1390 } 1391 } 1392 if hasFields[0]&uint64(0x00000001) == 0 { 1393 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("title") 1394 } 1395 if hasFields[0]&uint64(0x00000002) == 0 { 1396 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("longTitle") 1397 } 1398 if hasFields[0]&uint64(0x00000004) == 0 { 1399 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("collectionTitle") 1400 } 1401 if hasFields[0]&uint64(0x00000008) == 0 { 1402 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("description") 1403 } 1404 if hasFields[0]&uint64(0x00000010) == 0 { 1405 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("level") 1406 } 1407 1408 if iNdEx > l { 1409 return io.ErrUnexpectedEOF 1410 } 1411 return nil 1412 } 1413 func skipChartCatalog(dAtA []byte) (n int, err error) { 1414 l := len(dAtA) 1415 iNdEx := 0 1416 for iNdEx < l { 1417 var wire uint64 1418 for shift := uint(0); ; shift += 7 { 1419 if shift >= 64 { 1420 return 0, ErrIntOverflowChartCatalog 1421 } 1422 if iNdEx >= l { 1423 return 0, io.ErrUnexpectedEOF 1424 } 1425 b := dAtA[iNdEx] 1426 iNdEx++ 1427 wire |= (uint64(b) & 0x7F) << shift 1428 if b < 0x80 { 1429 break 1430 } 1431 } 1432 wireType := int(wire & 0x7) 1433 switch wireType { 1434 case 0: 1435 for shift := uint(0); ; shift += 7 { 1436 if shift >= 64 { 1437 return 0, ErrIntOverflowChartCatalog 1438 } 1439 if iNdEx >= l { 1440 return 0, io.ErrUnexpectedEOF 1441 } 1442 iNdEx++ 1443 if dAtA[iNdEx-1] < 0x80 { 1444 break 1445 } 1446 } 1447 return iNdEx, nil 1448 case 1: 1449 iNdEx += 8 1450 return iNdEx, nil 1451 case 2: 1452 var length int 1453 for shift := uint(0); ; shift += 7 { 1454 if shift >= 64 { 1455 return 0, ErrIntOverflowChartCatalog 1456 } 1457 if iNdEx >= l { 1458 return 0, io.ErrUnexpectedEOF 1459 } 1460 b := dAtA[iNdEx] 1461 iNdEx++ 1462 length |= (int(b) & 0x7F) << shift 1463 if b < 0x80 { 1464 break 1465 } 1466 } 1467 iNdEx += length 1468 if length < 0 { 1469 return 0, ErrInvalidLengthChartCatalog 1470 } 1471 return iNdEx, nil 1472 case 3: 1473 for { 1474 var innerWire uint64 1475 var start int = iNdEx 1476 for shift := uint(0); ; shift += 7 { 1477 if shift >= 64 { 1478 return 0, ErrIntOverflowChartCatalog 1479 } 1480 if iNdEx >= l { 1481 return 0, io.ErrUnexpectedEOF 1482 } 1483 b := dAtA[iNdEx] 1484 iNdEx++ 1485 innerWire |= (uint64(b) & 0x7F) << shift 1486 if b < 0x80 { 1487 break 1488 } 1489 } 1490 innerWireType := int(innerWire & 0x7) 1491 if innerWireType == 4 { 1492 break 1493 } 1494 next, err := skipChartCatalog(dAtA[start:]) 1495 if err != nil { 1496 return 0, err 1497 } 1498 iNdEx = start + next 1499 } 1500 return iNdEx, nil 1501 case 4: 1502 return iNdEx, nil 1503 case 5: 1504 iNdEx += 4 1505 return iNdEx, nil 1506 default: 1507 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1508 } 1509 } 1510 panic("unreachable") 1511 } 1512 1513 var ( 1514 ErrInvalidLengthChartCatalog = fmt.Errorf("proto: negative length found during unmarshaling") 1515 ErrIntOverflowChartCatalog = fmt.Errorf("proto: integer overflow") 1516 ) 1517 1518 func init() { 1519 proto.RegisterFile("ts/catalog/chart_catalog.proto", fileDescriptor_chart_catalog_38c5478e18a7ed60) 1520 } 1521 1522 var fileDescriptor_chart_catalog_38c5478e18a7ed60 = []byte{ 1523 // 726 bytes of a gzipped FileDescriptorProto 1524 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xc1, 0x6e, 0xda, 0x58, 1525 0x14, 0xb5, 0x0d, 0x04, 0xb8, 0x64, 0x88, 0xf5, 0x14, 0x69, 0xac, 0x8c, 0xe4, 0x30, 0x48, 0x89, 1526 0x98, 0x68, 0x64, 0xa4, 0x6c, 0x47, 0x23, 0x8d, 0x13, 0x18, 0x84, 0x14, 0x8c, 0x6a, 0x4c, 0xd4, 1527 0x66, 0x83, 0x8c, 0x79, 0x85, 0xa7, 0x1a, 0xdb, 0x7a, 0xef, 0x41, 0x93, 0xbf, 0xe8, 0xef, 0xf4, 1528 0x0b, 0x9a, 0x65, 0x96, 0x59, 0x55, 0x2d, 0xf9, 0x8d, 0x2e, 0x2a, 0x3f, 0x3b, 0xe0, 0x44, 0xa8, 1529 0x6a, 0xbb, 0xe8, 0xee, 0x72, 0xce, 0x3d, 0x47, 0xef, 0x9e, 0x7b, 0x0d, 0xe8, 0x9c, 0x35, 0x3d, 1530 0x97, 0xbb, 0x7e, 0x38, 0x6d, 0x7a, 0x33, 0x97, 0xf2, 0x51, 0xfa, 0xcb, 0x88, 0x68, 0xc8, 0x43, 1531 0xb4, 0xef, 0x85, 0xde, 0x1b, 0x1a, 0xba, 0xde, 0xcc, 0xe0, 0xcc, 0x48, 0xb9, 0x03, 0x8d, 0xb3, 1532 0x26, 0x67, 0xd1, 0xb8, 0xc9, 0xc9, 0x1c, 0x33, 0x4c, 0x09, 0x66, 0x49, 0xff, 0xc1, 0xfe, 0x34, 1533 0x9c, 0x86, 0xa2, 0x6c, 0xc6, 0x55, 0x8a, 0x1e, 0x45, 0x34, 0x9c, 0x63, 0x3e, 0xc3, 0x0b, 0xd6, 1534 0xf4, 0x7c, 0x82, 0x03, 0x3e, 0x9a, 0x87, 0x13, 0xec, 0x37, 0xe7, 0x98, 0x53, 0xe2, 0xa5, 0xe2, 1535 0xfa, 0x17, 0x19, 0x2a, 0xe7, 0xf1, 0x23, 0x7a, 0x02, 0x46, 0x1a, 0xe4, 0x03, 0x77, 0x8e, 0x35, 1536 0xb9, 0xa6, 0x34, 0xca, 0x67, 0xf9, 0xdb, 0x8f, 0x87, 0x92, 0x2d, 0x90, 0x98, 0x99, 0x61, 0x3f, 1537 0xd2, 0x94, 0x2c, 0x13, 0x23, 0xa8, 0x0e, 0x65, 0xf7, 0x9a, 0xb0, 0x0b, 0x77, 0x8c, 0x7d, 0x2d, 1538 0x97, 0xa1, 0x37, 0x30, 0xea, 0x41, 0x35, 0xa2, 0xf8, 0x35, 0xa6, 0x14, 0x4f, 0x86, 0x01, 0xe1, 1539 0x4c, 0xcb, 0xd7, 0x94, 0x46, 0xf5, 0xf4, 0xd0, 0xd8, 0x36, 0xad, 0x61, 0x5e, 0x13, 0x26, 0xda, 1540 0x52, 0xa7, 0x67, 0x62, 0xf4, 0x3f, 0x40, 0x32, 0x87, 0x73, 0x13, 0x61, 0xad, 0x50, 0x93, 0x1b, 1541 0xd5, 0xd3, 0x9a, 0x41, 0xc4, 0xf0, 0xe9, 0xd4, 0x46, 0x32, 0xb5, 0xd1, 0x5b, 0xf7, 0xa5, 0x5e, 1542 0x19, 0x65, 0xfd, 0x7d, 0x1e, 0xf6, 0xba, 0xc1, 0x84, 0x2c, 0xc9, 0x64, 0xe1, 0xfa, 0x22, 0x08, 1543 0x74, 0x00, 0x05, 0x4e, 0xb8, 0xff, 0x34, 0x83, 0x04, 0x8a, 0x47, 0xf5, 0xc3, 0x60, 0xea, 0x08, 1544 0x3e, 0x9b, 0xc4, 0x06, 0x46, 0x06, 0xec, 0x79, 0xa1, 0xef, 0x63, 0x8f, 0x93, 0x30, 0x48, 0x3a, 1545 0xb3, 0xa1, 0x3c, 0x27, 0x91, 0x05, 0x95, 0x49, 0xf8, 0x36, 0x60, 0xee, 0x3c, 0xf2, 0x31, 0x4d, 1546 0x73, 0xf9, 0xfb, 0x69, 0x2e, 0xf1, 0xe6, 0x0d, 0x87, 0xcc, 0xf1, 0x40, 0x6c, 0xfe, 0xc5, 0x02, 1547 0xd3, 0x1b, 0x73, 0x3a, 0xa5, 0x78, 0xea, 0xf2, 0x90, 0xda, 0x59, 0x03, 0x74, 0x01, 0xe0, 0xae, 1548 0x29, 0xad, 0xf0, 0x13, 0x76, 0x19, 0x7d, 0xec, 0x36, 0xc1, 0x94, 0x2c, 0x5d, 0x4e, 0x96, 0x58, 1549 0xdb, 0xf9, 0x5e, 0xb7, 0xd6, 0x5a, 0x63, 0x67, 0xf4, 0xe8, 0x1f, 0x28, 0x2c, 0xc4, 0xf6, 0x8b, 1550 0x3f, 0xb2, 0xfd, 0x44, 0xf3, 0xf4, 0xce, 0x4a, 0xdb, 0xef, 0xec, 0x18, 0x2a, 0x11, 0xa6, 0x1e, 1551 0x0e, 0x38, 0xf1, 0x31, 0xd3, 0xca, 0x35, 0xa5, 0x51, 0x4a, 0xbb, 0xb2, 0x04, 0x32, 0xa1, 0x98, 1552 0x7e, 0x08, 0x1a, 0xd4, 0x72, 0x8d, 0xca, 0xe9, 0x9f, 0xdb, 0x9f, 0x92, 0xf9, 0x36, 0x52, 0x9b, 1553 0x47, 0x5d, 0xfd, 0x83, 0x02, 0xbb, 0x82, 0x1e, 0x24, 0xdb, 0xfc, 0xe5, 0x87, 0x73, 0x0c, 0x95, 1554 0x09, 0x66, 0x1e, 0x25, 0x51, 0x8c, 0x89, 0xc3, 0x79, 0xec, 0xcd, 0x12, 0xf1, 0xbb, 0x7c, 0xbc, 1555 0xc4, 0xbe, 0xb8, 0x85, 0xc2, 0xe3, 0xbb, 0x04, 0x84, 0x5a, 0x50, 0x61, 0x8b, 0x31, 0x4b, 0x6c, 1556 0x99, 0xb6, 0x23, 0xb2, 0xa8, 0x7f, 0x23, 0x8b, 0x74, 0x58, 0x3b, 0x2b, 0x43, 0xff, 0xc2, 0x8e, 1557 0xf8, 0x27, 0x8b, 0xf7, 0x1a, 0x1b, 0x1c, 0x6d, 0x37, 0x78, 0xf6, 0xa5, 0xd9, 0xa9, 0xe8, 0xe4, 1558 0x3f, 0x28, 0xaf, 0x57, 0x8e, 0xf6, 0xa0, 0x32, 0xb4, 0x06, 0x6d, 0x67, 0x34, 0xb4, 0xba, 0xce, 1559 0x40, 0x95, 0x50, 0x19, 0x0a, 0xe7, 0xfd, 0xa1, 0xe5, 0xa8, 0x72, 0x5c, 0x9e, 0xbd, 0x72, 0xda, 1560 0x03, 0x55, 0x41, 0xbb, 0x50, 0x6a, 0x0d, 0x6d, 0xd3, 0xe9, 0xf6, 0x2d, 0x35, 0x77, 0xd2, 0x01, 1561 0xd4, 0x12, 0x13, 0x8f, 0xf1, 0xe6, 0x8e, 0xd1, 0x6f, 0x50, 0x4e, 0xac, 0xcc, 0x4e, 0x47, 0x95, 1562 0x50, 0x11, 0x72, 0xe6, 0x65, 0x47, 0x95, 0xe3, 0x62, 0x30, 0xec, 0xa9, 0x4a, 0x5c, 0xf4, 0xcc, 1563 0x97, 0x6a, 0x4e, 0x14, 0x5d, 0x4b, 0xcd, 0x9f, 0x5c, 0x6d, 0x8c, 0x36, 0x27, 0xbc, 0x31, 0x6a, 1564 0xb5, 0x6d, 0x55, 0x42, 0x25, 0xc8, 0x5b, 0x7d, 0xab, 0xad, 0xca, 0xa8, 0x0a, 0xd0, 0x6a, 0xdb, 1565 0xdd, 0x4b, 0xd3, 0xe9, 0x5e, 0xb6, 0x55, 0x05, 0xfd, 0x01, 0xbf, 0x5b, 0x7d, 0x6b, 0x64, 0xb5, 1566 0x3b, 0x02, 0x19, 0x65, 0xc8, 0xdc, 0xd9, 0x5f, 0xb7, 0x9f, 0x75, 0xe9, 0x76, 0xa5, 0xcb, 0x77, 1567 0x2b, 0x5d, 0xbe, 0x5f, 0xe9, 0xf2, 0xa7, 0x95, 0x2e, 0xbf, 0x7b, 0xd0, 0xa5, 0xbb, 0x07, 0x5d, 1568 0xba, 0x7f, 0xd0, 0xa5, 0xab, 0x62, 0x9a, 0xd4, 0xd7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xca, 0x5c, 1569 0x31, 0x24, 0x24, 0x06, 0x00, 0x00, 1570 }