mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-11-10 16:31:24 +00:00
1310 lines
32 KiB
Go
1310 lines
32 KiB
Go
// The MIT License
|
|
//
|
|
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
|
|
//
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
// of this software and associated documentation files (the "Software"), to deal
|
|
// in the Software without restriction, including without limitation the rights
|
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
// copies of the Software, and to permit persons to whom the Software is
|
|
// furnished to do so, subject to the following conditions:
|
|
//
|
|
// The above copyright notice and this permission notice shall be included in
|
|
// all copies or substantial portions of the Software.
|
|
//
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
// THE SOFTWARE.
|
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: temporal/api/version/v1/message.proto
|
|
|
|
package version
|
|
|
|
import (
|
|
fmt "fmt"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
reflect "reflect"
|
|
strings "strings"
|
|
time "time"
|
|
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
_ "github.com/gogo/protobuf/types"
|
|
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
|
v1 "go.temporal.io/api/enums/v1"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
var _ = time.Kitchen
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// ReleaseInfo contains information about specific version of temporal.
|
|
type ReleaseInfo struct {
|
|
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
|
|
ReleaseTime *time.Time `protobuf:"bytes,2,opt,name=release_time,json=releaseTime,proto3,stdtime" json:"release_time,omitempty"`
|
|
Notes string `protobuf:"bytes,3,opt,name=notes,proto3" json:"notes,omitempty"`
|
|
}
|
|
|
|
func (m *ReleaseInfo) Reset() { *m = ReleaseInfo{} }
|
|
func (*ReleaseInfo) ProtoMessage() {}
|
|
func (*ReleaseInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_48bb9b63ea24e063, []int{0}
|
|
}
|
|
func (m *ReleaseInfo) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ReleaseInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ReleaseInfo.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ReleaseInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ReleaseInfo.Merge(m, src)
|
|
}
|
|
func (m *ReleaseInfo) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ReleaseInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ReleaseInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ReleaseInfo proto.InternalMessageInfo
|
|
|
|
func (m *ReleaseInfo) GetVersion() string {
|
|
if m != nil {
|
|
return m.Version
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ReleaseInfo) GetReleaseTime() *time.Time {
|
|
if m != nil {
|
|
return m.ReleaseTime
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ReleaseInfo) GetNotes() string {
|
|
if m != nil {
|
|
return m.Notes
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// Alert contains notification and severity.
|
|
type Alert struct {
|
|
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
|
|
Severity v1.Severity `protobuf:"varint,2,opt,name=severity,proto3,enum=temporal.api.enums.v1.Severity" json:"severity,omitempty"`
|
|
}
|
|
|
|
func (m *Alert) Reset() { *m = Alert{} }
|
|
func (*Alert) ProtoMessage() {}
|
|
func (*Alert) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_48bb9b63ea24e063, []int{1}
|
|
}
|
|
func (m *Alert) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Alert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Alert.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Alert) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Alert.Merge(m, src)
|
|
}
|
|
func (m *Alert) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Alert) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Alert.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Alert proto.InternalMessageInfo
|
|
|
|
func (m *Alert) GetMessage() string {
|
|
if m != nil {
|
|
return m.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Alert) GetSeverity() v1.Severity {
|
|
if m != nil {
|
|
return m.Severity
|
|
}
|
|
return v1.SEVERITY_UNSPECIFIED
|
|
}
|
|
|
|
// VersionInfo contains details about current and recommended release versions as well as alerts and upgrade instructions.
|
|
type VersionInfo struct {
|
|
Current *ReleaseInfo `protobuf:"bytes,1,opt,name=current,proto3" json:"current,omitempty"`
|
|
Recommended *ReleaseInfo `protobuf:"bytes,2,opt,name=recommended,proto3" json:"recommended,omitempty"`
|
|
Instructions string `protobuf:"bytes,3,opt,name=instructions,proto3" json:"instructions,omitempty"`
|
|
Alerts []*Alert `protobuf:"bytes,4,rep,name=alerts,proto3" json:"alerts,omitempty"`
|
|
LastUpdateTime *time.Time `protobuf:"bytes,5,opt,name=last_update_time,json=lastUpdateTime,proto3,stdtime" json:"last_update_time,omitempty"`
|
|
}
|
|
|
|
func (m *VersionInfo) Reset() { *m = VersionInfo{} }
|
|
func (*VersionInfo) ProtoMessage() {}
|
|
func (*VersionInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_48bb9b63ea24e063, []int{2}
|
|
}
|
|
func (m *VersionInfo) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *VersionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_VersionInfo.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *VersionInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_VersionInfo.Merge(m, src)
|
|
}
|
|
func (m *VersionInfo) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *VersionInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_VersionInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_VersionInfo proto.InternalMessageInfo
|
|
|
|
func (m *VersionInfo) GetCurrent() *ReleaseInfo {
|
|
if m != nil {
|
|
return m.Current
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *VersionInfo) GetRecommended() *ReleaseInfo {
|
|
if m != nil {
|
|
return m.Recommended
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *VersionInfo) GetInstructions() string {
|
|
if m != nil {
|
|
return m.Instructions
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *VersionInfo) GetAlerts() []*Alert {
|
|
if m != nil {
|
|
return m.Alerts
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *VersionInfo) GetLastUpdateTime() *time.Time {
|
|
if m != nil {
|
|
return m.LastUpdateTime
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*ReleaseInfo)(nil), "temporal.api.version.v1.ReleaseInfo")
|
|
proto.RegisterType((*Alert)(nil), "temporal.api.version.v1.Alert")
|
|
proto.RegisterType((*VersionInfo)(nil), "temporal.api.version.v1.VersionInfo")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("temporal/api/version/v1/message.proto", fileDescriptor_48bb9b63ea24e063)
|
|
}
|
|
|
|
var fileDescriptor_48bb9b63ea24e063 = []byte{
|
|
// 508 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x41, 0x6b, 0x13, 0x41,
|
|
0x14, 0xde, 0x49, 0x9b, 0x56, 0x67, 0x43, 0x91, 0x45, 0x68, 0xc8, 0x61, 0x12, 0x83, 0x85, 0x9c,
|
|
0x66, 0x49, 0x04, 0x0f, 0x5b, 0x10, 0x12, 0x41, 0x50, 0x10, 0xca, 0x5a, 0x73, 0xf0, 0x60, 0xd9,
|
|
0x26, 0xaf, 0xcb, 0x40, 0x76, 0x66, 0x99, 0x99, 0x04, 0xbc, 0x89, 0xbf, 0xa0, 0x3f, 0x43, 0xfc,
|
|
0x0f, 0x7a, 0xf6, 0x98, 0x63, 0x6f, 0x9a, 0xcd, 0x45, 0x3c, 0xf5, 0x27, 0xc8, 0xcc, 0xce, 0x4a,
|
|
0x52, 0x08, 0xf4, 0xb6, 0xef, 0xbd, 0xef, 0x9b, 0xf7, 0xbd, 0xef, 0x63, 0xf1, 0x89, 0x86, 0x2c,
|
|
0x17, 0x32, 0x99, 0x85, 0x49, 0xce, 0xc2, 0x05, 0x48, 0xc5, 0x04, 0x0f, 0x17, 0xfd, 0x30, 0x03,
|
|
0xa5, 0x92, 0x14, 0x68, 0x2e, 0x85, 0x16, 0xc1, 0x71, 0x05, 0xa3, 0x49, 0xce, 0xa8, 0x83, 0xd1,
|
|
0x45, 0xbf, 0xd5, 0x4e, 0x85, 0x48, 0x67, 0x10, 0x5a, 0xd8, 0xe5, 0xfc, 0x2a, 0xd4, 0x2c, 0x03,
|
|
0xa5, 0x93, 0x2c, 0x2f, 0x99, 0xad, 0x27, 0x53, 0xc8, 0x81, 0x4f, 0x81, 0x4f, 0x18, 0xa8, 0x30,
|
|
0x15, 0xa9, 0xb0, 0x7d, 0xfb, 0xe5, 0x20, 0xdd, 0x2d, 0x0d, 0xc0, 0xe7, 0x99, 0x32, 0x0a, 0x26,
|
|
0x22, 0xcb, 0x04, 0x2f, 0x31, 0xdd, 0x2f, 0x08, 0xfb, 0x31, 0xcc, 0x20, 0x51, 0xf0, 0x9a, 0x5f,
|
|
0x89, 0xa0, 0x89, 0x0f, 0x9d, 0x8a, 0x26, 0xea, 0xa0, 0xde, 0xc3, 0xb8, 0x2a, 0x83, 0x97, 0xb8,
|
|
0x21, 0x4b, 0xe0, 0x85, 0xd1, 0xd2, 0xac, 0x75, 0x50, 0xcf, 0x1f, 0xb4, 0x68, 0x29, 0x94, 0x56,
|
|
0x42, 0xe9, 0x79, 0x25, 0x74, 0xb4, 0x7f, 0xfd, 0xab, 0x8d, 0x62, 0xdf, 0xb1, 0x4c, 0x3f, 0x78,
|
|
0x8c, 0xeb, 0x5c, 0x68, 0x50, 0xcd, 0x3d, 0xfb, 0x78, 0x59, 0x74, 0x3f, 0xe2, 0xfa, 0x70, 0x06,
|
|
0x52, 0x9b, 0xed, 0xce, 0x9f, 0x6a, 0xbb, 0x2b, 0x83, 0x53, 0xfc, 0x40, 0xc1, 0x02, 0x24, 0xd3,
|
|
0x9f, 0xec, 0xe6, 0xa3, 0x41, 0x9b, 0x6e, 0x79, 0x67, 0xcf, 0xa3, 0x8b, 0x3e, 0x7d, 0xe7, 0x60,
|
|
0xf1, 0x7f, 0x42, 0xf7, 0x7b, 0x0d, 0xfb, 0xe3, 0xf2, 0x0c, 0x7b, 0xe4, 0x0b, 0x7c, 0x38, 0x99,
|
|
0x4b, 0x09, 0x5c, 0xdb, 0x35, 0xfe, 0xe0, 0x29, 0xdd, 0x91, 0x03, 0xdd, 0xf0, 0x26, 0xae, 0x48,
|
|
0xc1, 0x2b, 0xec, 0x4b, 0x30, 0x36, 0x9a, 0x00, 0xa6, 0xce, 0x89, 0xfb, 0xbd, 0xb1, 0x49, 0x0c,
|
|
0xba, 0xb8, 0xc1, 0xb8, 0xd2, 0x72, 0x3e, 0xd1, 0x4c, 0xf0, 0xca, 0x94, 0xad, 0x5e, 0xf0, 0x1c,
|
|
0x1f, 0x24, 0xc6, 0x1b, 0xd5, 0xdc, 0xef, 0xec, 0xf5, 0xfc, 0x01, 0xd9, 0xb9, 0xc6, 0x5a, 0x18,
|
|
0x3b, 0x74, 0xf0, 0x06, 0x3f, 0x9a, 0x25, 0x4a, 0x5f, 0xcc, 0xf3, 0x69, 0xa2, 0x5d, 0x64, 0xf5,
|
|
0x7b, 0x46, 0x76, 0x64, 0x98, 0xef, 0x2d, 0xd1, 0x8c, 0x46, 0x3f, 0xd0, 0x72, 0x45, 0xbc, 0x9b,
|
|
0x15, 0xf1, 0x6e, 0x57, 0x04, 0x7d, 0x2e, 0x08, 0xfa, 0x5a, 0x10, 0xf4, 0xb3, 0x20, 0x68, 0x59,
|
|
0x10, 0xf4, 0xbb, 0x20, 0xe8, 0x4f, 0x41, 0xbc, 0xdb, 0x82, 0xa0, 0xeb, 0x35, 0xf1, 0x96, 0x6b,
|
|
0xe2, 0xdd, 0xac, 0x89, 0x87, 0x5b, 0x4c, 0xec, 0x12, 0x3b, 0x6a, 0xbc, 0x2d, 0x83, 0x3d, 0x33,
|
|
0x1a, 0xce, 0xd0, 0x87, 0x93, 0x74, 0x03, 0xcb, 0xc4, 0x9d, 0xbf, 0xe6, 0xd4, 0x7d, 0x7e, 0xab,
|
|
0x1d, 0x9f, 0x57, 0xa0, 0x61, 0xce, 0xa8, 0x0b, 0x95, 0x8e, 0xfb, 0x7f, 0x6b, 0xad, 0x6a, 0x12,
|
|
0x45, 0xc3, 0x9c, 0x45, 0x91, 0x9b, 0x45, 0xd1, 0xb8, 0x7f, 0x79, 0x60, 0x4f, 0x7d, 0xf6, 0x2f,
|
|
0x00, 0x00, 0xff, 0xff, 0x91, 0x14, 0x67, 0x92, 0x96, 0x03, 0x00, 0x00,
|
|
}
|
|
|
|
func (this *ReleaseInfo) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*ReleaseInfo)
|
|
if !ok {
|
|
that2, ok := that.(ReleaseInfo)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.Version != that1.Version {
|
|
return false
|
|
}
|
|
if that1.ReleaseTime == nil {
|
|
if this.ReleaseTime != nil {
|
|
return false
|
|
}
|
|
} else if !this.ReleaseTime.Equal(*that1.ReleaseTime) {
|
|
return false
|
|
}
|
|
if this.Notes != that1.Notes {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *Alert) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*Alert)
|
|
if !ok {
|
|
that2, ok := that.(Alert)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.Message != that1.Message {
|
|
return false
|
|
}
|
|
if this.Severity != that1.Severity {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *VersionInfo) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*VersionInfo)
|
|
if !ok {
|
|
that2, ok := that.(VersionInfo)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if !this.Current.Equal(that1.Current) {
|
|
return false
|
|
}
|
|
if !this.Recommended.Equal(that1.Recommended) {
|
|
return false
|
|
}
|
|
if this.Instructions != that1.Instructions {
|
|
return false
|
|
}
|
|
if len(this.Alerts) != len(that1.Alerts) {
|
|
return false
|
|
}
|
|
for i := range this.Alerts {
|
|
if !this.Alerts[i].Equal(that1.Alerts[i]) {
|
|
return false
|
|
}
|
|
}
|
|
if that1.LastUpdateTime == nil {
|
|
if this.LastUpdateTime != nil {
|
|
return false
|
|
}
|
|
} else if !this.LastUpdateTime.Equal(*that1.LastUpdateTime) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *ReleaseInfo) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 7)
|
|
s = append(s, "&version.ReleaseInfo{")
|
|
s = append(s, "Version: "+fmt.Sprintf("%#v", this.Version)+",\n")
|
|
s = append(s, "ReleaseTime: "+fmt.Sprintf("%#v", this.ReleaseTime)+",\n")
|
|
s = append(s, "Notes: "+fmt.Sprintf("%#v", this.Notes)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *Alert) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 6)
|
|
s = append(s, "&version.Alert{")
|
|
s = append(s, "Message: "+fmt.Sprintf("%#v", this.Message)+",\n")
|
|
s = append(s, "Severity: "+fmt.Sprintf("%#v", this.Severity)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *VersionInfo) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 9)
|
|
s = append(s, "&version.VersionInfo{")
|
|
if this.Current != nil {
|
|
s = append(s, "Current: "+fmt.Sprintf("%#v", this.Current)+",\n")
|
|
}
|
|
if this.Recommended != nil {
|
|
s = append(s, "Recommended: "+fmt.Sprintf("%#v", this.Recommended)+",\n")
|
|
}
|
|
s = append(s, "Instructions: "+fmt.Sprintf("%#v", this.Instructions)+",\n")
|
|
if this.Alerts != nil {
|
|
s = append(s, "Alerts: "+fmt.Sprintf("%#v", this.Alerts)+",\n")
|
|
}
|
|
s = append(s, "LastUpdateTime: "+fmt.Sprintf("%#v", this.LastUpdateTime)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func valueToGoStringMessage(v interface{}, typ string) string {
|
|
rv := reflect.ValueOf(v)
|
|
if rv.IsNil() {
|
|
return "nil"
|
|
}
|
|
pv := reflect.Indirect(rv).Interface()
|
|
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
|
}
|
|
func (m *ReleaseInfo) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ReleaseInfo) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ReleaseInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Notes) > 0 {
|
|
i -= len(m.Notes)
|
|
copy(dAtA[i:], m.Notes)
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Notes)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.ReleaseTime != nil {
|
|
n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.ReleaseTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.ReleaseTime):])
|
|
if err1 != nil {
|
|
return 0, err1
|
|
}
|
|
i -= n1
|
|
i = encodeVarintMessage(dAtA, i, uint64(n1))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Version) > 0 {
|
|
i -= len(m.Version)
|
|
copy(dAtA[i:], m.Version)
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Version)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Alert) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Alert) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Alert) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Severity != 0 {
|
|
i = encodeVarintMessage(dAtA, i, uint64(m.Severity))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if len(m.Message) > 0 {
|
|
i -= len(m.Message)
|
|
copy(dAtA[i:], m.Message)
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Message)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *VersionInfo) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *VersionInfo) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *VersionInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.LastUpdateTime != nil {
|
|
n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.LastUpdateTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.LastUpdateTime):])
|
|
if err2 != nil {
|
|
return 0, err2
|
|
}
|
|
i -= n2
|
|
i = encodeVarintMessage(dAtA, i, uint64(n2))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
if len(m.Alerts) > 0 {
|
|
for iNdEx := len(m.Alerts) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Alerts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMessage(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
}
|
|
if len(m.Instructions) > 0 {
|
|
i -= len(m.Instructions)
|
|
copy(dAtA[i:], m.Instructions)
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Instructions)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.Recommended != nil {
|
|
{
|
|
size, err := m.Recommended.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMessage(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Current != nil {
|
|
{
|
|
size, err := m.Current.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMessage(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintMessage(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovMessage(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *ReleaseInfo) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Version)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
if m.ReleaseTime != nil {
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.ReleaseTime)
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
l = len(m.Notes)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Alert) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Message)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
if m.Severity != 0 {
|
|
n += 1 + sovMessage(uint64(m.Severity))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *VersionInfo) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Current != nil {
|
|
l = m.Current.Size()
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
if m.Recommended != nil {
|
|
l = m.Recommended.Size()
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
l = len(m.Instructions)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
if len(m.Alerts) > 0 {
|
|
for _, e := range m.Alerts {
|
|
l = e.Size()
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
}
|
|
if m.LastUpdateTime != nil {
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.LastUpdateTime)
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovMessage(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozMessage(x uint64) (n int) {
|
|
return sovMessage(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (this *ReleaseInfo) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&ReleaseInfo{`,
|
|
`Version:` + fmt.Sprintf("%v", this.Version) + `,`,
|
|
`ReleaseTime:` + strings.Replace(fmt.Sprintf("%v", this.ReleaseTime), "Timestamp", "types.Timestamp", 1) + `,`,
|
|
`Notes:` + fmt.Sprintf("%v", this.Notes) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *Alert) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&Alert{`,
|
|
`Message:` + fmt.Sprintf("%v", this.Message) + `,`,
|
|
`Severity:` + fmt.Sprintf("%v", this.Severity) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *VersionInfo) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
repeatedStringForAlerts := "[]*Alert{"
|
|
for _, f := range this.Alerts {
|
|
repeatedStringForAlerts += strings.Replace(f.String(), "Alert", "Alert", 1) + ","
|
|
}
|
|
repeatedStringForAlerts += "}"
|
|
s := strings.Join([]string{`&VersionInfo{`,
|
|
`Current:` + strings.Replace(this.Current.String(), "ReleaseInfo", "ReleaseInfo", 1) + `,`,
|
|
`Recommended:` + strings.Replace(this.Recommended.String(), "ReleaseInfo", "ReleaseInfo", 1) + `,`,
|
|
`Instructions:` + fmt.Sprintf("%v", this.Instructions) + `,`,
|
|
`Alerts:` + repeatedStringForAlerts + `,`,
|
|
`LastUpdateTime:` + strings.Replace(fmt.Sprintf("%v", this.LastUpdateTime), "Timestamp", "types.Timestamp", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func valueToStringMessage(v interface{}) string {
|
|
rv := reflect.ValueOf(v)
|
|
if rv.IsNil() {
|
|
return "nil"
|
|
}
|
|
pv := reflect.Indirect(rv).Interface()
|
|
return fmt.Sprintf("*%v", pv)
|
|
}
|
|
func (m *ReleaseInfo) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ReleaseInfo: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ReleaseInfo: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Version = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ReleaseTime", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.ReleaseTime == nil {
|
|
m.ReleaseTime = new(time.Time)
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.ReleaseTime, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Notes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Notes = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMessage(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Alert) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Alert: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Alert: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Message = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Severity", wireType)
|
|
}
|
|
m.Severity = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Severity |= v1.Severity(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMessage(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *VersionInfo) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: VersionInfo: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: VersionInfo: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Current", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Current == nil {
|
|
m.Current = &ReleaseInfo{}
|
|
}
|
|
if err := m.Current.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Recommended", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Recommended == nil {
|
|
m.Recommended = &ReleaseInfo{}
|
|
}
|
|
if err := m.Recommended.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Instructions", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Instructions = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Alerts", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Alerts = append(m.Alerts, &Alert{})
|
|
if err := m.Alerts[len(m.Alerts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.LastUpdateTime == nil {
|
|
m.LastUpdateTime = new(time.Time)
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.LastUpdateTime, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMessage(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipMessage(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthMessage
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupMessage
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthMessage
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group")
|
|
)
|