1064 lines
26 KiB
Go
1064 lines
26 KiB
Go
// Code generated by protoc-gen-gogo.
|
|
// source: nflog.proto
|
|
// DO NOT EDIT!
|
|
|
|
/*
|
|
Package nflogpb is a generated protocol buffer package.
|
|
|
|
It is generated from these files:
|
|
nflog.proto
|
|
|
|
It has these top-level messages:
|
|
Receiver
|
|
Entry
|
|
MeshEntry
|
|
*/
|
|
package nflogpb
|
|
|
|
import proto "github.com/gogo/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
import time "time"
|
|
|
|
import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
|
|
|
import io "io"
|
|
|
|
// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type Receiver struct {
|
|
// Configured name of the receiver group.
|
|
GroupName string `protobuf:"bytes,1,opt,name=group_name,json=groupName,proto3" json:"group_name,omitempty"`
|
|
// Name of the integration of the receiver.
|
|
Integration string `protobuf:"bytes,2,opt,name=integration,proto3" json:"integration,omitempty"`
|
|
// Index of the receiver with respect to the integration.
|
|
// Every integration in a group may have 0..N configurations.
|
|
Idx uint32 `protobuf:"varint,3,opt,name=idx,proto3" json:"idx,omitempty"`
|
|
}
|
|
|
|
func (m *Receiver) Reset() { *m = Receiver{} }
|
|
func (m *Receiver) String() string { return proto.CompactTextString(m) }
|
|
func (*Receiver) ProtoMessage() {}
|
|
func (*Receiver) Descriptor() ([]byte, []int) { return fileDescriptorNflog, []int{0} }
|
|
|
|
// Entry holds information about a successful notification
|
|
// sent to a receiver.
|
|
type Entry struct {
|
|
// The key identifying the dispatching group.
|
|
GroupKey []byte `protobuf:"bytes,1,opt,name=group_key,json=groupKey,proto3" json:"group_key,omitempty"`
|
|
// The receiver that was notified.
|
|
Receiver *Receiver `protobuf:"bytes,2,opt,name=receiver" json:"receiver,omitempty"`
|
|
// Hash over the state of the group at notification time.
|
|
// Deprecated in favor of FiringAlerts field, but kept for compatibility.
|
|
GroupHash []byte `protobuf:"bytes,3,opt,name=group_hash,json=groupHash,proto3" json:"group_hash,omitempty"`
|
|
// Whether the notification was about a resolved alert.
|
|
// Deprecated in favor of ResolvedAlerts field, but kept for compatibility.
|
|
Resolved bool `protobuf:"varint,4,opt,name=resolved,proto3" json:"resolved,omitempty"`
|
|
// Timestamp of the succeeding notification.
|
|
Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,stdtime" json:"timestamp"`
|
|
// FiringAlerts list of hashes of firing alerts at the last notification time.
|
|
FiringAlerts []uint64 `protobuf:"varint,6,rep,packed,name=firing_alerts,json=firingAlerts" json:"firing_alerts,omitempty"`
|
|
// ResolvedAlerts list of hashes of resolved alerts at the last notification time.
|
|
ResolvedAlerts []uint64 `protobuf:"varint,7,rep,packed,name=resolved_alerts,json=resolvedAlerts" json:"resolved_alerts,omitempty"`
|
|
}
|
|
|
|
func (m *Entry) Reset() { *m = Entry{} }
|
|
func (m *Entry) String() string { return proto.CompactTextString(m) }
|
|
func (*Entry) ProtoMessage() {}
|
|
func (*Entry) Descriptor() ([]byte, []int) { return fileDescriptorNflog, []int{1} }
|
|
|
|
// MeshEntry is a wrapper message to communicate a notify log
|
|
// entry through a mesh network.
|
|
type MeshEntry struct {
|
|
// The original raw notify log entry.
|
|
Entry *Entry `protobuf:"bytes,1,opt,name=entry" json:"entry,omitempty"`
|
|
// A timestamp indicating when the mesh peer should evict
|
|
// the log entry from its state.
|
|
ExpiresAt time.Time `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,stdtime" json:"expires_at"`
|
|
}
|
|
|
|
func (m *MeshEntry) Reset() { *m = MeshEntry{} }
|
|
func (m *MeshEntry) String() string { return proto.CompactTextString(m) }
|
|
func (*MeshEntry) ProtoMessage() {}
|
|
func (*MeshEntry) Descriptor() ([]byte, []int) { return fileDescriptorNflog, []int{2} }
|
|
|
|
func init() {
|
|
proto.RegisterType((*Receiver)(nil), "nflogpb.Receiver")
|
|
proto.RegisterType((*Entry)(nil), "nflogpb.Entry")
|
|
proto.RegisterType((*MeshEntry)(nil), "nflogpb.MeshEntry")
|
|
}
|
|
func (m *Receiver) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Receiver) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.GroupName) > 0 {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintNflog(dAtA, i, uint64(len(m.GroupName)))
|
|
i += copy(dAtA[i:], m.GroupName)
|
|
}
|
|
if len(m.Integration) > 0 {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintNflog(dAtA, i, uint64(len(m.Integration)))
|
|
i += copy(dAtA[i:], m.Integration)
|
|
}
|
|
if m.Idx != 0 {
|
|
dAtA[i] = 0x18
|
|
i++
|
|
i = encodeVarintNflog(dAtA, i, uint64(m.Idx))
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *Entry) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Entry) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.GroupKey) > 0 {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintNflog(dAtA, i, uint64(len(m.GroupKey)))
|
|
i += copy(dAtA[i:], m.GroupKey)
|
|
}
|
|
if m.Receiver != nil {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintNflog(dAtA, i, uint64(m.Receiver.Size()))
|
|
n1, err := m.Receiver.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n1
|
|
}
|
|
if len(m.GroupHash) > 0 {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintNflog(dAtA, i, uint64(len(m.GroupHash)))
|
|
i += copy(dAtA[i:], m.GroupHash)
|
|
}
|
|
if m.Resolved {
|
|
dAtA[i] = 0x20
|
|
i++
|
|
if m.Resolved {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i++
|
|
}
|
|
dAtA[i] = 0x2a
|
|
i++
|
|
i = encodeVarintNflog(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)))
|
|
n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n2
|
|
if len(m.FiringAlerts) > 0 {
|
|
dAtA4 := make([]byte, len(m.FiringAlerts)*10)
|
|
var j3 int
|
|
for _, num := range m.FiringAlerts {
|
|
for num >= 1<<7 {
|
|
dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j3++
|
|
}
|
|
dAtA4[j3] = uint8(num)
|
|
j3++
|
|
}
|
|
dAtA[i] = 0x32
|
|
i++
|
|
i = encodeVarintNflog(dAtA, i, uint64(j3))
|
|
i += copy(dAtA[i:], dAtA4[:j3])
|
|
}
|
|
if len(m.ResolvedAlerts) > 0 {
|
|
dAtA6 := make([]byte, len(m.ResolvedAlerts)*10)
|
|
var j5 int
|
|
for _, num := range m.ResolvedAlerts {
|
|
for num >= 1<<7 {
|
|
dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j5++
|
|
}
|
|
dAtA6[j5] = uint8(num)
|
|
j5++
|
|
}
|
|
dAtA[i] = 0x3a
|
|
i++
|
|
i = encodeVarintNflog(dAtA, i, uint64(j5))
|
|
i += copy(dAtA[i:], dAtA6[:j5])
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *MeshEntry) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *MeshEntry) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Entry != nil {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintNflog(dAtA, i, uint64(m.Entry.Size()))
|
|
n7, err := m.Entry.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n7
|
|
}
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintNflog(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiresAt)))
|
|
n8, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpiresAt, dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n8
|
|
return i, nil
|
|
}
|
|
|
|
func encodeFixed64Nflog(dAtA []byte, offset int, v uint64) int {
|
|
dAtA[offset] = uint8(v)
|
|
dAtA[offset+1] = uint8(v >> 8)
|
|
dAtA[offset+2] = uint8(v >> 16)
|
|
dAtA[offset+3] = uint8(v >> 24)
|
|
dAtA[offset+4] = uint8(v >> 32)
|
|
dAtA[offset+5] = uint8(v >> 40)
|
|
dAtA[offset+6] = uint8(v >> 48)
|
|
dAtA[offset+7] = uint8(v >> 56)
|
|
return offset + 8
|
|
}
|
|
func encodeFixed32Nflog(dAtA []byte, offset int, v uint32) int {
|
|
dAtA[offset] = uint8(v)
|
|
dAtA[offset+1] = uint8(v >> 8)
|
|
dAtA[offset+2] = uint8(v >> 16)
|
|
dAtA[offset+3] = uint8(v >> 24)
|
|
return offset + 4
|
|
}
|
|
func encodeVarintNflog(dAtA []byte, offset int, v uint64) int {
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return offset + 1
|
|
}
|
|
func (m *Receiver) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.GroupName)
|
|
if l > 0 {
|
|
n += 1 + l + sovNflog(uint64(l))
|
|
}
|
|
l = len(m.Integration)
|
|
if l > 0 {
|
|
n += 1 + l + sovNflog(uint64(l))
|
|
}
|
|
if m.Idx != 0 {
|
|
n += 1 + sovNflog(uint64(m.Idx))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Entry) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.GroupKey)
|
|
if l > 0 {
|
|
n += 1 + l + sovNflog(uint64(l))
|
|
}
|
|
if m.Receiver != nil {
|
|
l = m.Receiver.Size()
|
|
n += 1 + l + sovNflog(uint64(l))
|
|
}
|
|
l = len(m.GroupHash)
|
|
if l > 0 {
|
|
n += 1 + l + sovNflog(uint64(l))
|
|
}
|
|
if m.Resolved {
|
|
n += 2
|
|
}
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)
|
|
n += 1 + l + sovNflog(uint64(l))
|
|
if len(m.FiringAlerts) > 0 {
|
|
l = 0
|
|
for _, e := range m.FiringAlerts {
|
|
l += sovNflog(uint64(e))
|
|
}
|
|
n += 1 + sovNflog(uint64(l)) + l
|
|
}
|
|
if len(m.ResolvedAlerts) > 0 {
|
|
l = 0
|
|
for _, e := range m.ResolvedAlerts {
|
|
l += sovNflog(uint64(e))
|
|
}
|
|
n += 1 + sovNflog(uint64(l)) + l
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *MeshEntry) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Entry != nil {
|
|
l = m.Entry.Size()
|
|
n += 1 + l + sovNflog(uint64(l))
|
|
}
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiresAt)
|
|
n += 1 + l + sovNflog(uint64(l))
|
|
return n
|
|
}
|
|
|
|
func sovNflog(x uint64) (n int) {
|
|
for {
|
|
n++
|
|
x >>= 7
|
|
if x == 0 {
|
|
break
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
func sozNflog(x uint64) (n int) {
|
|
return sovNflog(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *Receiver) 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 ErrIntOverflowNflog
|
|
}
|
|
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: Receiver: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Receiver: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GroupName", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
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 ErrInvalidLengthNflog
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.GroupName = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Integration", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
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 ErrInvalidLengthNflog
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Integration = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Idx", wireType)
|
|
}
|
|
m.Idx = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Idx |= (uint32(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipNflog(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthNflog
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Entry) 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 ErrIntOverflowNflog
|
|
}
|
|
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: Entry: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Entry: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GroupKey", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthNflog
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.GroupKey = append(m.GroupKey[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.GroupKey == nil {
|
|
m.GroupKey = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthNflog
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Receiver == nil {
|
|
m.Receiver = &Receiver{}
|
|
}
|
|
if err := m.Receiver.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GroupHash", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthNflog
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.GroupHash = append(m.GroupHash[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.GroupHash == nil {
|
|
m.GroupHash = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Resolved", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Resolved = bool(v != 0)
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthNflog
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType == 0 {
|
|
var v uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.FiringAlerts = append(m.FiringAlerts, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthNflog
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.FiringAlerts = append(m.FiringAlerts, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field FiringAlerts", wireType)
|
|
}
|
|
case 7:
|
|
if wireType == 0 {
|
|
var v uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.ResolvedAlerts = append(m.ResolvedAlerts, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthNflog
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.ResolvedAlerts = append(m.ResolvedAlerts, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ResolvedAlerts", wireType)
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipNflog(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthNflog
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *MeshEntry) 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 ErrIntOverflowNflog
|
|
}
|
|
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: MeshEntry: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: MeshEntry: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Entry", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthNflog
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Entry == nil {
|
|
m.Entry = &Entry{}
|
|
}
|
|
if err := m.Entry.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthNflog
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExpiresAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipNflog(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthNflog
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipNflog(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowNflog
|
|
}
|
|
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, ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 1:
|
|
iNdEx += 8
|
|
return iNdEx, nil
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
iNdEx += length
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthNflog
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowNflog
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
innerWire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
innerWireType := int(innerWire & 0x7)
|
|
if innerWireType == 4 {
|
|
break
|
|
}
|
|
next, err := skipNflog(dAtA[start:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
iNdEx = start + next
|
|
}
|
|
return iNdEx, nil
|
|
case 4:
|
|
return iNdEx, nil
|
|
case 5:
|
|
iNdEx += 4
|
|
return iNdEx, nil
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthNflog = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowNflog = fmt.Errorf("proto: integer overflow")
|
|
)
|
|
|
|
func init() { proto.RegisterFile("nflog.proto", fileDescriptorNflog) }
|
|
|
|
var fileDescriptorNflog = []byte{
|
|
// 385 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xcf, 0x6e, 0xd3, 0x40,
|
|
0x10, 0xc6, 0xbb, 0x4d, 0xd3, 0xda, 0xe3, 0xb4, 0x94, 0x15, 0x07, 0xcb, 0x08, 0xc7, 0x0a, 0x48,
|
|
0xf8, 0x82, 0x23, 0x95, 0x27, 0x68, 0x10, 0x12, 0x12, 0x82, 0xc3, 0x8a, 0x2b, 0xb2, 0x36, 0x74,
|
|
0xb2, 0x5e, 0x61,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