代码拉取完成,页面将自动刷新
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: entity.proto
package v2
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import bytes "bytes"
import github_com_golang_protobuf_proto "github.com/golang/protobuf/proto"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
// Entity is the Entity supplying the event. The default Entity for any
// Event is the running Agent process--if the Event is sent by an Agent.
type Entity struct {
EntityClass string `protobuf:"bytes,1,opt,name=entity_class,json=entityClass,proto3" json:"entity_class"`
System System `protobuf:"bytes,3,opt,name=system" json:"system"`
Subscriptions []string `protobuf:"bytes,4,rep,name=subscriptions" json:"subscriptions"`
LastSeen int64 `protobuf:"varint,5,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen"`
Deregister bool `protobuf:"varint,6,opt,name=deregister,proto3" json:"deregister"`
Deregistration Deregistration `protobuf:"bytes,7,opt,name=deregistration" json:"deregistration"`
User string `protobuf:"bytes,11,opt,name=user,proto3" json:"user,omitempty"`
// ExtendedAttributes store serialized arbitrary JSON-encoded data
ExtendedAttributes []byte `protobuf:"bytes,12,opt,name=extended_attributes,json=extendedAttributes,proto3" json:"-"`
// Redact contains the fields to redact on the agent
Redact []string `protobuf:"bytes,13,rep,name=redact" json:"redact,omitempty"`
// Metadata contains the name, namespace, labels and annotations of the entity
ObjectMeta `protobuf:"bytes,14,opt,name=metadata,embedded=metadata" json:"metadata,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Entity) Reset() { *m = Entity{} }
func (m *Entity) String() string { return proto.CompactTextString(m) }
func (*Entity) ProtoMessage() {}
func (*Entity) Descriptor() ([]byte, []int) {
return fileDescriptor_entity_6fba41ca3d52301e, []int{0}
}
func (m *Entity) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Entity.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Entity) XXX_Merge(src proto.Message) {
xxx_messageInfo_Entity.Merge(dst, src)
}
func (m *Entity) XXX_Size() int {
return m.Size()
}
func (m *Entity) XXX_DiscardUnknown() {
xxx_messageInfo_Entity.DiscardUnknown(m)
}
var xxx_messageInfo_Entity proto.InternalMessageInfo
// System contains information about the system that the Agent process
// is running on, used for additional Entity context.
type System struct {
Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
OS string `protobuf:"bytes,2,opt,name=os,proto3" json:"os,omitempty"`
Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
PlatformFamily string `protobuf:"bytes,4,opt,name=platform_family,json=platformFamily,proto3" json:"platform_family,omitempty"`
PlatformVersion string `protobuf:"bytes,5,opt,name=platform_version,json=platformVersion,proto3" json:"platform_version,omitempty"`
Network Network `protobuf:"bytes,6,opt,name=network" json:"network"`
Arch string `protobuf:"bytes,7,opt,name=arch,proto3" json:"arch,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *System) Reset() { *m = System{} }
func (m *System) String() string { return proto.CompactTextString(m) }
func (*System) ProtoMessage() {}
func (*System) Descriptor() ([]byte, []int) {
return fileDescriptor_entity_6fba41ca3d52301e, []int{1}
}
func (m *System) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *System) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_System.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *System) XXX_Merge(src proto.Message) {
xxx_messageInfo_System.Merge(dst, src)
}
func (m *System) XXX_Size() int {
return m.Size()
}
func (m *System) XXX_DiscardUnknown() {
xxx_messageInfo_System.DiscardUnknown(m)
}
var xxx_messageInfo_System proto.InternalMessageInfo
func (m *System) GetHostname() string {
if m != nil {
return m.Hostname
}
return ""
}
func (m *System) GetOS() string {
if m != nil {
return m.OS
}
return ""
}
func (m *System) GetPlatform() string {
if m != nil {
return m.Platform
}
return ""
}
func (m *System) GetPlatformFamily() string {
if m != nil {
return m.PlatformFamily
}
return ""
}
func (m *System) GetPlatformVersion() string {
if m != nil {
return m.PlatformVersion
}
return ""
}
func (m *System) GetNetwork() Network {
if m != nil {
return m.Network
}
return Network{}
}
func (m *System) GetArch() string {
if m != nil {
return m.Arch
}
return ""
}
// Network contains information about the system network interfaces
// that the Agent process is running on, used for additional Entity
// context.
type Network struct {
Interfaces []NetworkInterface `protobuf:"bytes,1,rep,name=interfaces" json:"interfaces"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Network) Reset() { *m = Network{} }
func (m *Network) String() string { return proto.CompactTextString(m) }
func (*Network) ProtoMessage() {}
func (*Network) Descriptor() ([]byte, []int) {
return fileDescriptor_entity_6fba41ca3d52301e, []int{2}
}
func (m *Network) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Network) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Network.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Network) XXX_Merge(src proto.Message) {
xxx_messageInfo_Network.Merge(dst, src)
}
func (m *Network) XXX_Size() int {
return m.Size()
}
func (m *Network) XXX_DiscardUnknown() {
xxx_messageInfo_Network.DiscardUnknown(m)
}
var xxx_messageInfo_Network proto.InternalMessageInfo
func (m *Network) GetInterfaces() []NetworkInterface {
if m != nil {
return m.Interfaces
}
return nil
}
// NetworkInterface contains information about a system network
// interface.
type NetworkInterface struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
MAC string `protobuf:"bytes,2,opt,name=mac,proto3" json:"mac,omitempty"`
Addresses []string `protobuf:"bytes,3,rep,name=addresses" json:"addresses"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NetworkInterface) Reset() { *m = NetworkInterface{} }
func (m *NetworkInterface) String() string { return proto.CompactTextString(m) }
func (*NetworkInterface) ProtoMessage() {}
func (*NetworkInterface) Descriptor() ([]byte, []int) {
return fileDescriptor_entity_6fba41ca3d52301e, []int{3}
}
func (m *NetworkInterface) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *NetworkInterface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_NetworkInterface.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *NetworkInterface) XXX_Merge(src proto.Message) {
xxx_messageInfo_NetworkInterface.Merge(dst, src)
}
func (m *NetworkInterface) XXX_Size() int {
return m.Size()
}
func (m *NetworkInterface) XXX_DiscardUnknown() {
xxx_messageInfo_NetworkInterface.DiscardUnknown(m)
}
var xxx_messageInfo_NetworkInterface proto.InternalMessageInfo
func (m *NetworkInterface) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *NetworkInterface) GetMAC() string {
if m != nil {
return m.MAC
}
return ""
}
func (m *NetworkInterface) GetAddresses() []string {
if m != nil {
return m.Addresses
}
return nil
}
// Deregistration contains configuration for Sensu entity de-registration.
type Deregistration struct {
Handler string `protobuf:"bytes,1,opt,name=handler,proto3" json:"handler,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Deregistration) Reset() { *m = Deregistration{} }
func (m *Deregistration) String() string { return proto.CompactTextString(m) }
func (*Deregistration) ProtoMessage() {}
func (*Deregistration) Descriptor() ([]byte, []int) {
return fileDescriptor_entity_6fba41ca3d52301e, []int{4}
}
func (m *Deregistration) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Deregistration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Deregistration.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Deregistration) XXX_Merge(src proto.Message) {
xxx_messageInfo_Deregistration.Merge(dst, src)
}
func (m *Deregistration) XXX_Size() int {
return m.Size()
}
func (m *Deregistration) XXX_DiscardUnknown() {
xxx_messageInfo_Deregistration.DiscardUnknown(m)
}
var xxx_messageInfo_Deregistration proto.InternalMessageInfo
func (m *Deregistration) GetHandler() string {
if m != nil {
return m.Handler
}
return ""
}
func init() {
proto.RegisterType((*Entity)(nil), "sensu.core.v2.Entity")
proto.RegisterType((*System)(nil), "sensu.core.v2.System")
proto.RegisterType((*Network)(nil), "sensu.core.v2.Network")
proto.RegisterType((*NetworkInterface)(nil), "sensu.core.v2.NetworkInterface")
proto.RegisterType((*Deregistration)(nil), "sensu.core.v2.Deregistration")
}
func (this *Entity) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Entity)
if !ok {
that2, ok := that.(Entity)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.EntityClass != that1.EntityClass {
return false
}
if !this.System.Equal(&that1.System) {
return false
}
if len(this.Subscriptions) != len(that1.Subscriptions) {
return false
}
for i := range this.Subscriptions {
if this.Subscriptions[i] != that1.Subscriptions[i] {
return false
}
}
if this.LastSeen != that1.LastSeen {
return false
}
if this.Deregister != that1.Deregister {
return false
}
if !this.Deregistration.Equal(&that1.Deregistration) {
return false
}
if this.User != that1.User {
return false
}
if !bytes.Equal(this.ExtendedAttributes, that1.ExtendedAttributes) {
return false
}
if len(this.Redact) != len(that1.Redact) {
return false
}
for i := range this.Redact {
if this.Redact[i] != that1.Redact[i] {
return false
}
}
if !this.ObjectMeta.Equal(&that1.ObjectMeta) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *System) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*System)
if !ok {
that2, ok := that.(System)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Hostname != that1.Hostname {
return false
}
if this.OS != that1.OS {
return false
}
if this.Platform != that1.Platform {
return false
}
if this.PlatformFamily != that1.PlatformFamily {
return false
}
if this.PlatformVersion != that1.PlatformVersion {
return false
}
if !this.Network.Equal(&that1.Network) {
return false
}
if this.Arch != that1.Arch {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Network) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Network)
if !ok {
that2, ok := that.(Network)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if len(this.Interfaces) != len(that1.Interfaces) {
return false
}
for i := range this.Interfaces {
if !this.Interfaces[i].Equal(&that1.Interfaces[i]) {
return false
}
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *NetworkInterface) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*NetworkInterface)
if !ok {
that2, ok := that.(NetworkInterface)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Name != that1.Name {
return false
}
if this.MAC != that1.MAC {
return false
}
if len(this.Addresses) != len(that1.Addresses) {
return false
}
for i := range this.Addresses {
if this.Addresses[i] != that1.Addresses[i] {
return false
}
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Deregistration) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Deregistration)
if !ok {
that2, ok := that.(Deregistration)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Handler != that1.Handler {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
type EntityFace interface {
Proto() github_com_golang_protobuf_proto.Message
GetEntityClass() string
GetSystem() System
GetSubscriptions() []string
GetLastSeen() int64
GetDeregister() bool
GetDeregistration() Deregistration
GetUser() string
GetExtendedAttributes() []byte
GetRedact() []string
GetObjectMeta() ObjectMeta
}
func (this *Entity) Proto() github_com_golang_protobuf_proto.Message {
return this
}
func (this *Entity) TestProto() github_com_golang_protobuf_proto.Message {
return NewEntityFromFace(this)
}
func (this *Entity) GetEntityClass() string {
return this.EntityClass
}
func (this *Entity) GetSystem() System {
return this.System
}
func (this *Entity) GetSubscriptions() []string {
return this.Subscriptions
}
func (this *Entity) GetLastSeen() int64 {
return this.LastSeen
}
func (this *Entity) GetDeregister() bool {
return this.Deregister
}
func (this *Entity) GetDeregistration() Deregistration {
return this.Deregistration
}
func (this *Entity) GetUser() string {
return this.User
}
func (this *Entity) GetExtendedAttributes() []byte {
return this.ExtendedAttributes
}
func (this *Entity) GetRedact() []string {
return this.Redact
}
func (this *Entity) GetObjectMeta() ObjectMeta {
return this.ObjectMeta
}
func NewEntityFromFace(that EntityFace) *Entity {
this := &Entity{}
this.EntityClass = that.GetEntityClass()
this.System = that.GetSystem()
this.Subscriptions = that.GetSubscriptions()
this.LastSeen = that.GetLastSeen()
this.Deregister = that.GetDeregister()
this.Deregistration = that.GetDeregistration()
this.User = that.GetUser()
this.ExtendedAttributes = that.GetExtendedAttributes()
this.Redact = that.GetRedact()
this.ObjectMeta = that.GetObjectMeta()
return this
}
func (m *Entity) 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 *Entity) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.EntityClass) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintEntity(dAtA, i, uint64(len(m.EntityClass)))
i += copy(dAtA[i:], m.EntityClass)
}
dAtA[i] = 0x1a
i++
i = encodeVarintEntity(dAtA, i, uint64(m.System.Size()))
n1, err := m.System.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n1
if len(m.Subscriptions) > 0 {
for _, s := range m.Subscriptions {
dAtA[i] = 0x22
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
if m.LastSeen != 0 {
dAtA[i] = 0x28
i++
i = encodeVarintEntity(dAtA, i, uint64(m.LastSeen))
}
if m.Deregister {
dAtA[i] = 0x30
i++
if m.Deregister {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
dAtA[i] = 0x3a
i++
i = encodeVarintEntity(dAtA, i, uint64(m.Deregistration.Size()))
n2, err := m.Deregistration.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n2
if len(m.User) > 0 {
dAtA[i] = 0x5a
i++
i = encodeVarintEntity(dAtA, i, uint64(len(m.User)))
i += copy(dAtA[i:], m.User)
}
if len(m.ExtendedAttributes) > 0 {
dAtA[i] = 0x62
i++
i = encodeVarintEntity(dAtA, i, uint64(len(m.ExtendedAttributes)))
i += copy(dAtA[i:], m.ExtendedAttributes)
}
if len(m.Redact) > 0 {
for _, s := range m.Redact {
dAtA[i] = 0x6a
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
dAtA[i] = 0x72
i++
i = encodeVarintEntity(dAtA, i, uint64(m.ObjectMeta.Size()))
n3, err := m.ObjectMeta.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n3
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *System) 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 *System) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Hostname) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintEntity(dAtA, i, uint64(len(m.Hostname)))
i += copy(dAtA[i:], m.Hostname)
}
if len(m.OS) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintEntity(dAtA, i, uint64(len(m.OS)))
i += copy(dAtA[i:], m.OS)
}
if len(m.Platform) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintEntity(dAtA, i, uint64(len(m.Platform)))
i += copy(dAtA[i:], m.Platform)
}
if len(m.PlatformFamily) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintEntity(dAtA, i, uint64(len(m.PlatformFamily)))
i += copy(dAtA[i:], m.PlatformFamily)
}
if len(m.PlatformVersion) > 0 {
dAtA[i] = 0x2a
i++
i = encodeVarintEntity(dAtA, i, uint64(len(m.PlatformVersion)))
i += copy(dAtA[i:], m.PlatformVersion)
}
dAtA[i] = 0x32
i++
i = encodeVarintEntity(dAtA, i, uint64(m.Network.Size()))
n4, err := m.Network.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n4
if len(m.Arch) > 0 {
dAtA[i] = 0x3a
i++
i = encodeVarintEntity(dAtA, i, uint64(len(m.Arch)))
i += copy(dAtA[i:], m.Arch)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Network) 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 *Network) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Interfaces) > 0 {
for _, msg := range m.Interfaces {
dAtA[i] = 0xa
i++
i = encodeVarintEntity(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *NetworkInterface) 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 *NetworkInterface) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Name) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintEntity(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
if len(m.MAC) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintEntity(dAtA, i, uint64(len(m.MAC)))
i += copy(dAtA[i:], m.MAC)
}
if len(m.Addresses) > 0 {
for _, s := range m.Addresses {
dAtA[i] = 0x1a
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Deregistration) 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 *Deregistration) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Handler) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintEntity(dAtA, i, uint64(len(m.Handler)))
i += copy(dAtA[i:], m.Handler)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeVarintEntity(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 NewPopulatedEntity(r randyEntity, easy bool) *Entity {
this := &Entity{}
this.EntityClass = string(randStringEntity(r))
v1 := NewPopulatedSystem(r, easy)
this.System = *v1
v2 := r.Intn(10)
this.Subscriptions = make([]string, v2)
for i := 0; i < v2; i++ {
this.Subscriptions[i] = string(randStringEntity(r))
}
this.LastSeen = int64(r.Int63())
if r.Intn(2) == 0 {
this.LastSeen *= -1
}
this.Deregister = bool(bool(r.Intn(2) == 0))
v3 := NewPopulatedDeregistration(r, easy)
this.Deregistration = *v3
this.User = string(randStringEntity(r))
v4 := r.Intn(100)
this.ExtendedAttributes = make([]byte, v4)
for i := 0; i < v4; i++ {
this.ExtendedAttributes[i] = byte(r.Intn(256))
}
v5 := r.Intn(10)
this.Redact = make([]string, v5)
for i := 0; i < v5; i++ {
this.Redact[i] = string(randStringEntity(r))
}
v6 := NewPopulatedObjectMeta(r, easy)
this.ObjectMeta = *v6
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedEntity(r, 15)
}
return this
}
func NewPopulatedSystem(r randyEntity, easy bool) *System {
this := &System{}
this.Hostname = string(randStringEntity(r))
this.OS = string(randStringEntity(r))
this.Platform = string(randStringEntity(r))
this.PlatformFamily = string(randStringEntity(r))
this.PlatformVersion = string(randStringEntity(r))
v7 := NewPopulatedNetwork(r, easy)
this.Network = *v7
this.Arch = string(randStringEntity(r))
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedEntity(r, 8)
}
return this
}
func NewPopulatedNetwork(r randyEntity, easy bool) *Network {
this := &Network{}
if r.Intn(10) != 0 {
v8 := r.Intn(5)
this.Interfaces = make([]NetworkInterface, v8)
for i := 0; i < v8; i++ {
v9 := NewPopulatedNetworkInterface(r, easy)
this.Interfaces[i] = *v9
}
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedEntity(r, 2)
}
return this
}
func NewPopulatedNetworkInterface(r randyEntity, easy bool) *NetworkInterface {
this := &NetworkInterface{}
this.Name = string(randStringEntity(r))
this.MAC = string(randStringEntity(r))
v10 := r.Intn(10)
this.Addresses = make([]string, v10)
for i := 0; i < v10; i++ {
this.Addresses[i] = string(randStringEntity(r))
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedEntity(r, 4)
}
return this
}
func NewPopulatedDeregistration(r randyEntity, easy bool) *Deregistration {
this := &Deregistration{}
this.Handler = string(randStringEntity(r))
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedEntity(r, 2)
}
return this
}
type randyEntity interface {
Float32() float32
Float64() float64
Int63() int64
Int31() int32
Uint32() uint32
Intn(n int) int
}
func randUTF8RuneEntity(r randyEntity) rune {
ru := r.Intn(62)
if ru < 10 {
return rune(ru + 48)
} else if ru < 36 {
return rune(ru + 55)
}
return rune(ru + 61)
}
func randStringEntity(r randyEntity) string {
v11 := r.Intn(100)
tmps := make([]rune, v11)
for i := 0; i < v11; i++ {
tmps[i] = randUTF8RuneEntity(r)
}
return string(tmps)
}
func randUnrecognizedEntity(r randyEntity, maxFieldNumber int) (dAtA []byte) {
l := r.Intn(5)
for i := 0; i < l; i++ {
wire := r.Intn(4)
if wire == 3 {
wire = 5
}
fieldNumber := maxFieldNumber + r.Intn(100)
dAtA = randFieldEntity(dAtA, r, fieldNumber, wire)
}
return dAtA
}
func randFieldEntity(dAtA []byte, r randyEntity, fieldNumber int, wire int) []byte {
key := uint32(fieldNumber)<<3 | uint32(wire)
switch wire {
case 0:
dAtA = encodeVarintPopulateEntity(dAtA, uint64(key))
v12 := r.Int63()
if r.Intn(2) == 0 {
v12 *= -1
}
dAtA = encodeVarintPopulateEntity(dAtA, uint64(v12))
case 1:
dAtA = encodeVarintPopulateEntity(dAtA, uint64(key))
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
case 2:
dAtA = encodeVarintPopulateEntity(dAtA, uint64(key))
ll := r.Intn(100)
dAtA = encodeVarintPopulateEntity(dAtA, uint64(ll))
for j := 0; j < ll; j++ {
dAtA = append(dAtA, byte(r.Intn(256)))
}
default:
dAtA = encodeVarintPopulateEntity(dAtA, uint64(key))
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
}
return dAtA
}
func encodeVarintPopulateEntity(dAtA []byte, v uint64) []byte {
for v >= 1<<7 {
dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
v >>= 7
}
dAtA = append(dAtA, uint8(v))
return dAtA
}
func (m *Entity) Size() (n int) {
var l int
_ = l
l = len(m.EntityClass)
if l > 0 {
n += 1 + l + sovEntity(uint64(l))
}
l = m.System.Size()
n += 1 + l + sovEntity(uint64(l))
if len(m.Subscriptions) > 0 {
for _, s := range m.Subscriptions {
l = len(s)
n += 1 + l + sovEntity(uint64(l))
}
}
if m.LastSeen != 0 {
n += 1 + sovEntity(uint64(m.LastSeen))
}
if m.Deregister {
n += 2
}
l = m.Deregistration.Size()
n += 1 + l + sovEntity(uint64(l))
l = len(m.User)
if l > 0 {
n += 1 + l + sovEntity(uint64(l))
}
l = len(m.ExtendedAttributes)
if l > 0 {
n += 1 + l + sovEntity(uint64(l))
}
if len(m.Redact) > 0 {
for _, s := range m.Redact {
l = len(s)
n += 1 + l + sovEntity(uint64(l))
}
}
l = m.ObjectMeta.Size()
n += 1 + l + sovEntity(uint64(l))
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *System) Size() (n int) {
var l int
_ = l
l = len(m.Hostname)
if l > 0 {
n += 1 + l + sovEntity(uint64(l))
}
l = len(m.OS)
if l > 0 {
n += 1 + l + sovEntity(uint64(l))
}
l = len(m.Platform)
if l > 0 {
n += 1 + l + sovEntity(uint64(l))
}
l = len(m.PlatformFamily)
if l > 0 {
n += 1 + l + sovEntity(uint64(l))
}
l = len(m.PlatformVersion)
if l > 0 {
n += 1 + l + sovEntity(uint64(l))
}
l = m.Network.Size()
n += 1 + l + sovEntity(uint64(l))
l = len(m.Arch)
if l > 0 {
n += 1 + l + sovEntity(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Network) Size() (n int) {
var l int
_ = l
if len(m.Interfaces) > 0 {
for _, e := range m.Interfaces {
l = e.Size()
n += 1 + l + sovEntity(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *NetworkInterface) Size() (n int) {
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovEntity(uint64(l))
}
l = len(m.MAC)
if l > 0 {
n += 1 + l + sovEntity(uint64(l))
}
if len(m.Addresses) > 0 {
for _, s := range m.Addresses {
l = len(s)
n += 1 + l + sovEntity(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Deregistration) Size() (n int) {
var l int
_ = l
l = len(m.Handler)
if l > 0 {
n += 1 + l + sovEntity(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovEntity(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozEntity(x uint64) (n int) {
return sovEntity(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Entity) 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 ErrIntOverflowEntity
}
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: Entity: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Entity: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EntityClass", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.EntityClass = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field System", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthEntity
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.System.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Subscriptions", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Subscriptions = append(m.Subscriptions, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field LastSeen", wireType)
}
m.LastSeen = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.LastSeen |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Deregister", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Deregister = bool(v != 0)
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Deregistration", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthEntity
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Deregistration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 11:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.User = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 12:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ExtendedAttributes", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthEntity
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ExtendedAttributes = append(m.ExtendedAttributes[:0], dAtA[iNdEx:postIndex]...)
if m.ExtendedAttributes == nil {
m.ExtendedAttributes = []byte{}
}
iNdEx = postIndex
case 13:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Redact", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Redact = append(m.Redact, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 14:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthEntity
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipEntity(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthEntity
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *System) 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 ErrIntOverflowEntity
}
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: System: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: System: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Hostname = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field OS", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.OS = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Platform = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PlatformFamily", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PlatformFamily = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PlatformVersion", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PlatformVersion = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthEntity
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Network.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Arch", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Arch = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipEntity(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthEntity
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Network) 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 ErrIntOverflowEntity
}
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: Network: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Network: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Interfaces", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthEntity
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Interfaces = append(m.Interfaces, NetworkInterface{})
if err := m.Interfaces[len(m.Interfaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipEntity(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthEntity
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NetworkInterface) 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 ErrIntOverflowEntity
}
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: NetworkInterface: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NetworkInterface: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MAC", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.MAC = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipEntity(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthEntity
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Deregistration) 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 ErrIntOverflowEntity
}
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: Deregistration: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Deregistration: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Handler", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEntity
}
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 ErrInvalidLengthEntity
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Handler = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipEntity(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthEntity
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipEntity(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, ErrIntOverflowEntity
}
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, ErrIntOverflowEntity
}
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, ErrIntOverflowEntity
}
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, ErrInvalidLengthEntity
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowEntity
}
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 := skipEntity(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 (
ErrInvalidLengthEntity = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowEntity = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("entity.proto", fileDescriptor_entity_6fba41ca3d52301e) }
var fileDescriptor_entity_6fba41ca3d52301e = []byte{
// 670 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0xee, 0x26, 0x69, 0x7e, 0x36, 0x4d, 0x28, 0x8b, 0xa8, 0xb6, 0x95, 0xb0, 0xa3, 0x5c, 0x08,
0x85, 0xa6, 0x52, 0x2a, 0x15, 0x89, 0x5b, 0x5d, 0x40, 0x42, 0xa8, 0x54, 0xda, 0x08, 0x0e, 0x1c,
0x88, 0x36, 0xf6, 0x24, 0x31, 0xc4, 0x76, 0xb4, 0xbb, 0x29, 0xe4, 0x0d, 0x78, 0x04, 0xb8, 0xf5,
0xd8, 0x47, 0xe0, 0x11, 0x7a, 0xec, 0x13, 0x58, 0x10, 0x6e, 0x79, 0x82, 0x1e, 0xd1, 0xae, 0xe3,
0x34, 0x89, 0xb8, 0x7d, 0xdf, 0xe7, 0x6f, 0x76, 0x66, 0x67, 0x66, 0x8d, 0xb7, 0x20, 0x54, 0xbe,
0x9a, 0x34, 0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x9b, 0x7f, 0xc7, 0xd1,
0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa7, 0x42, 0x55, 0x9a, 0x95, 0x04, 0x00, 0x00,
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。