mirror of
https://github.com/siderolabs/discovery-service.git
synced 2025-03-14 09:55:08 +00:00
Move the entrypoint logic into its own package, so it can be imported from other projects. Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
1065 lines
24 KiB
Go
1065 lines
24 KiB
Go
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
|
|
// protoc-gen-go-vtproto version: v0.6.0
|
|
// source: storage/discovery.proto
|
|
|
|
package storagepb
|
|
|
|
import (
|
|
fmt "fmt"
|
|
io "io"
|
|
|
|
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
|
|
timestamppb1 "github.com/planetscale/vtprotobuf/types/known/timestamppb"
|
|
proto "google.golang.org/protobuf/proto"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
func (m *StateSnapshot) CloneVT() *StateSnapshot {
|
|
if m == nil {
|
|
return (*StateSnapshot)(nil)
|
|
}
|
|
r := new(StateSnapshot)
|
|
if rhs := m.Clusters; rhs != nil {
|
|
tmpContainer := make([]*ClusterSnapshot, len(rhs))
|
|
for k, v := range rhs {
|
|
tmpContainer[k] = v.CloneVT()
|
|
}
|
|
r.Clusters = tmpContainer
|
|
}
|
|
if len(m.unknownFields) > 0 {
|
|
r.unknownFields = make([]byte, len(m.unknownFields))
|
|
copy(r.unknownFields, m.unknownFields)
|
|
}
|
|
return r
|
|
}
|
|
|
|
func (m *StateSnapshot) CloneMessageVT() proto.Message {
|
|
return m.CloneVT()
|
|
}
|
|
|
|
func (m *ClusterSnapshot) CloneVT() *ClusterSnapshot {
|
|
if m == nil {
|
|
return (*ClusterSnapshot)(nil)
|
|
}
|
|
r := new(ClusterSnapshot)
|
|
r.Id = m.Id
|
|
if rhs := m.Affiliates; rhs != nil {
|
|
tmpContainer := make([]*AffiliateSnapshot, len(rhs))
|
|
for k, v := range rhs {
|
|
tmpContainer[k] = v.CloneVT()
|
|
}
|
|
r.Affiliates = tmpContainer
|
|
}
|
|
if len(m.unknownFields) > 0 {
|
|
r.unknownFields = make([]byte, len(m.unknownFields))
|
|
copy(r.unknownFields, m.unknownFields)
|
|
}
|
|
return r
|
|
}
|
|
|
|
func (m *ClusterSnapshot) CloneMessageVT() proto.Message {
|
|
return m.CloneVT()
|
|
}
|
|
|
|
func (m *AffiliateSnapshot) CloneVT() *AffiliateSnapshot {
|
|
if m == nil {
|
|
return (*AffiliateSnapshot)(nil)
|
|
}
|
|
r := new(AffiliateSnapshot)
|
|
r.Id = m.Id
|
|
r.Expiration = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Expiration).CloneVT())
|
|
if rhs := m.Data; rhs != nil {
|
|
tmpBytes := make([]byte, len(rhs))
|
|
copy(tmpBytes, rhs)
|
|
r.Data = tmpBytes
|
|
}
|
|
if rhs := m.Endpoints; rhs != nil {
|
|
tmpContainer := make([]*EndpointSnapshot, len(rhs))
|
|
for k, v := range rhs {
|
|
tmpContainer[k] = v.CloneVT()
|
|
}
|
|
r.Endpoints = tmpContainer
|
|
}
|
|
if len(m.unknownFields) > 0 {
|
|
r.unknownFields = make([]byte, len(m.unknownFields))
|
|
copy(r.unknownFields, m.unknownFields)
|
|
}
|
|
return r
|
|
}
|
|
|
|
func (m *AffiliateSnapshot) CloneMessageVT() proto.Message {
|
|
return m.CloneVT()
|
|
}
|
|
|
|
func (m *EndpointSnapshot) CloneVT() *EndpointSnapshot {
|
|
if m == nil {
|
|
return (*EndpointSnapshot)(nil)
|
|
}
|
|
r := new(EndpointSnapshot)
|
|
r.Expiration = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Expiration).CloneVT())
|
|
if rhs := m.Data; rhs != nil {
|
|
tmpBytes := make([]byte, len(rhs))
|
|
copy(tmpBytes, rhs)
|
|
r.Data = tmpBytes
|
|
}
|
|
if len(m.unknownFields) > 0 {
|
|
r.unknownFields = make([]byte, len(m.unknownFields))
|
|
copy(r.unknownFields, m.unknownFields)
|
|
}
|
|
return r
|
|
}
|
|
|
|
func (m *EndpointSnapshot) CloneMessageVT() proto.Message {
|
|
return m.CloneVT()
|
|
}
|
|
|
|
func (this *StateSnapshot) EqualVT(that *StateSnapshot) bool {
|
|
if this == that {
|
|
return true
|
|
} else if this == nil || that == nil {
|
|
return false
|
|
}
|
|
if len(this.Clusters) != len(that.Clusters) {
|
|
return false
|
|
}
|
|
for i, vx := range this.Clusters {
|
|
vy := that.Clusters[i]
|
|
if p, q := vx, vy; p != q {
|
|
if p == nil {
|
|
p = &ClusterSnapshot{}
|
|
}
|
|
if q == nil {
|
|
q = &ClusterSnapshot{}
|
|
}
|
|
if !p.EqualVT(q) {
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
return string(this.unknownFields) == string(that.unknownFields)
|
|
}
|
|
|
|
func (this *StateSnapshot) EqualMessageVT(thatMsg proto.Message) bool {
|
|
that, ok := thatMsg.(*StateSnapshot)
|
|
if !ok {
|
|
return false
|
|
}
|
|
return this.EqualVT(that)
|
|
}
|
|
func (this *ClusterSnapshot) EqualVT(that *ClusterSnapshot) bool {
|
|
if this == that {
|
|
return true
|
|
} else if this == nil || that == nil {
|
|
return false
|
|
}
|
|
if this.Id != that.Id {
|
|
return false
|
|
}
|
|
if len(this.Affiliates) != len(that.Affiliates) {
|
|
return false
|
|
}
|
|
for i, vx := range this.Affiliates {
|
|
vy := that.Affiliates[i]
|
|
if p, q := vx, vy; p != q {
|
|
if p == nil {
|
|
p = &AffiliateSnapshot{}
|
|
}
|
|
if q == nil {
|
|
q = &AffiliateSnapshot{}
|
|
}
|
|
if !p.EqualVT(q) {
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
return string(this.unknownFields) == string(that.unknownFields)
|
|
}
|
|
|
|
func (this *ClusterSnapshot) EqualMessageVT(thatMsg proto.Message) bool {
|
|
that, ok := thatMsg.(*ClusterSnapshot)
|
|
if !ok {
|
|
return false
|
|
}
|
|
return this.EqualVT(that)
|
|
}
|
|
func (this *AffiliateSnapshot) EqualVT(that *AffiliateSnapshot) bool {
|
|
if this == that {
|
|
return true
|
|
} else if this == nil || that == nil {
|
|
return false
|
|
}
|
|
if this.Id != that.Id {
|
|
return false
|
|
}
|
|
if !(*timestamppb1.Timestamp)(this.Expiration).EqualVT((*timestamppb1.Timestamp)(that.Expiration)) {
|
|
return false
|
|
}
|
|
if string(this.Data) != string(that.Data) {
|
|
return false
|
|
}
|
|
if len(this.Endpoints) != len(that.Endpoints) {
|
|
return false
|
|
}
|
|
for i, vx := range this.Endpoints {
|
|
vy := that.Endpoints[i]
|
|
if p, q := vx, vy; p != q {
|
|
if p == nil {
|
|
p = &EndpointSnapshot{}
|
|
}
|
|
if q == nil {
|
|
q = &EndpointSnapshot{}
|
|
}
|
|
if !p.EqualVT(q) {
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
return string(this.unknownFields) == string(that.unknownFields)
|
|
}
|
|
|
|
func (this *AffiliateSnapshot) EqualMessageVT(thatMsg proto.Message) bool {
|
|
that, ok := thatMsg.(*AffiliateSnapshot)
|
|
if !ok {
|
|
return false
|
|
}
|
|
return this.EqualVT(that)
|
|
}
|
|
func (this *EndpointSnapshot) EqualVT(that *EndpointSnapshot) bool {
|
|
if this == that {
|
|
return true
|
|
} else if this == nil || that == nil {
|
|
return false
|
|
}
|
|
if !(*timestamppb1.Timestamp)(this.Expiration).EqualVT((*timestamppb1.Timestamp)(that.Expiration)) {
|
|
return false
|
|
}
|
|
if string(this.Data) != string(that.Data) {
|
|
return false
|
|
}
|
|
return string(this.unknownFields) == string(that.unknownFields)
|
|
}
|
|
|
|
func (this *EndpointSnapshot) EqualMessageVT(thatMsg proto.Message) bool {
|
|
that, ok := thatMsg.(*EndpointSnapshot)
|
|
if !ok {
|
|
return false
|
|
}
|
|
return this.EqualVT(that)
|
|
}
|
|
func (m *StateSnapshot) MarshalVT() (dAtA []byte, err error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
size := m.SizeVT()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *StateSnapshot) MarshalToVT(dAtA []byte) (int, error) {
|
|
size := m.SizeVT()
|
|
return m.MarshalToSizedBufferVT(dAtA[:size])
|
|
}
|
|
|
|
func (m *StateSnapshot) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
|
if m == nil {
|
|
return 0, nil
|
|
}
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.unknownFields != nil {
|
|
i -= len(m.unknownFields)
|
|
copy(dAtA[i:], m.unknownFields)
|
|
}
|
|
if len(m.Clusters) > 0 {
|
|
for iNdEx := len(m.Clusters) - 1; iNdEx >= 0; iNdEx-- {
|
|
size, err := m.Clusters[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ClusterSnapshot) MarshalVT() (dAtA []byte, err error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
size := m.SizeVT()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ClusterSnapshot) MarshalToVT(dAtA []byte) (int, error) {
|
|
size := m.SizeVT()
|
|
return m.MarshalToSizedBufferVT(dAtA[:size])
|
|
}
|
|
|
|
func (m *ClusterSnapshot) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
|
if m == nil {
|
|
return 0, nil
|
|
}
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.unknownFields != nil {
|
|
i -= len(m.unknownFields)
|
|
copy(dAtA[i:], m.unknownFields)
|
|
}
|
|
if len(m.Affiliates) > 0 {
|
|
for iNdEx := len(m.Affiliates) - 1; iNdEx >= 0; iNdEx-- {
|
|
size, err := m.Affiliates[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
}
|
|
if len(m.Id) > 0 {
|
|
i -= len(m.Id)
|
|
copy(dAtA[i:], m.Id)
|
|
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *AffiliateSnapshot) MarshalVT() (dAtA []byte, err error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
size := m.SizeVT()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *AffiliateSnapshot) MarshalToVT(dAtA []byte) (int, error) {
|
|
size := m.SizeVT()
|
|
return m.MarshalToSizedBufferVT(dAtA[:size])
|
|
}
|
|
|
|
func (m *AffiliateSnapshot) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
|
if m == nil {
|
|
return 0, nil
|
|
}
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.unknownFields != nil {
|
|
i -= len(m.unknownFields)
|
|
copy(dAtA[i:], m.unknownFields)
|
|
}
|
|
if len(m.Endpoints) > 0 {
|
|
for iNdEx := len(m.Endpoints) - 1; iNdEx >= 0; iNdEx-- {
|
|
size, err := m.Endpoints[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
}
|
|
if len(m.Data) > 0 {
|
|
i -= len(m.Data)
|
|
copy(dAtA[i:], m.Data)
|
|
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.Expiration != nil {
|
|
size, err := (*timestamppb1.Timestamp)(m.Expiration).MarshalToSizedBufferVT(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Id) > 0 {
|
|
i -= len(m.Id)
|
|
copy(dAtA[i:], m.Id)
|
|
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *EndpointSnapshot) MarshalVT() (dAtA []byte, err error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
size := m.SizeVT()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *EndpointSnapshot) MarshalToVT(dAtA []byte) (int, error) {
|
|
size := m.SizeVT()
|
|
return m.MarshalToSizedBufferVT(dAtA[:size])
|
|
}
|
|
|
|
func (m *EndpointSnapshot) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
|
if m == nil {
|
|
return 0, nil
|
|
}
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.unknownFields != nil {
|
|
i -= len(m.unknownFields)
|
|
copy(dAtA[i:], m.unknownFields)
|
|
}
|
|
if len(m.Data) > 0 {
|
|
i -= len(m.Data)
|
|
copy(dAtA[i:], m.Data)
|
|
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Expiration != nil {
|
|
size, err := (*timestamppb1.Timestamp)(m.Expiration).MarshalToSizedBufferVT(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *StateSnapshot) SizeVT() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Clusters) > 0 {
|
|
for _, e := range m.Clusters {
|
|
l = e.SizeVT()
|
|
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
|
}
|
|
}
|
|
n += len(m.unknownFields)
|
|
return n
|
|
}
|
|
|
|
func (m *ClusterSnapshot) SizeVT() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Id)
|
|
if l > 0 {
|
|
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
|
}
|
|
if len(m.Affiliates) > 0 {
|
|
for _, e := range m.Affiliates {
|
|
l = e.SizeVT()
|
|
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
|
}
|
|
}
|
|
n += len(m.unknownFields)
|
|
return n
|
|
}
|
|
|
|
func (m *AffiliateSnapshot) SizeVT() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Id)
|
|
if l > 0 {
|
|
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
|
}
|
|
if m.Expiration != nil {
|
|
l = (*timestamppb1.Timestamp)(m.Expiration).SizeVT()
|
|
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
|
}
|
|
l = len(m.Data)
|
|
if l > 0 {
|
|
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
|
}
|
|
if len(m.Endpoints) > 0 {
|
|
for _, e := range m.Endpoints {
|
|
l = e.SizeVT()
|
|
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
|
}
|
|
}
|
|
n += len(m.unknownFields)
|
|
return n
|
|
}
|
|
|
|
func (m *EndpointSnapshot) SizeVT() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Expiration != nil {
|
|
l = (*timestamppb1.Timestamp)(m.Expiration).SizeVT()
|
|
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
|
}
|
|
l = len(m.Data)
|
|
if l > 0 {
|
|
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
|
|
}
|
|
n += len(m.unknownFields)
|
|
return n
|
|
}
|
|
|
|
func (m *StateSnapshot) UnmarshalVT(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 protohelpers.ErrIntOverflow
|
|
}
|
|
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: StateSnapshot: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: StateSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Clusters", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protohelpers.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Clusters = append(m.Clusters, &ClusterSnapshot{})
|
|
if err := m.Clusters[len(m.Clusters)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ClusterSnapshot) UnmarshalVT(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 protohelpers.ErrIntOverflow
|
|
}
|
|
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: ClusterSnapshot: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ClusterSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protohelpers.ErrIntOverflow
|
|
}
|
|
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 protohelpers.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Affiliates", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protohelpers.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Affiliates = append(m.Affiliates, &AffiliateSnapshot{})
|
|
if err := m.Affiliates[len(m.Affiliates)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *AffiliateSnapshot) UnmarshalVT(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 protohelpers.ErrIntOverflow
|
|
}
|
|
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: AffiliateSnapshot: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: AffiliateSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protohelpers.ErrIntOverflow
|
|
}
|
|
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 protohelpers.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protohelpers.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Expiration == nil {
|
|
m.Expiration = ×tamppb.Timestamp{}
|
|
}
|
|
if err := (*timestamppb1.Timestamp)(m.Expiration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protohelpers.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Data == nil {
|
|
m.Data = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Endpoints", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protohelpers.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Endpoints = append(m.Endpoints, &EndpointSnapshot{})
|
|
if err := m.Endpoints[len(m.Endpoints)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *EndpointSnapshot) UnmarshalVT(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 protohelpers.ErrIntOverflow
|
|
}
|
|
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: EndpointSnapshot: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: EndpointSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protohelpers.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Expiration == nil {
|
|
m.Expiration = ×tamppb.Timestamp{}
|
|
}
|
|
if err := (*timestamppb1.Timestamp)(m.Expiration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protohelpers.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Data == nil {
|
|
m.Data = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protohelpers.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|