Найбільше вузьке місце до запуску: агент заводився INSERT-ом у базу, а токен вписувався в командний рядок руками. Поставити зонд у клієнта було неможливо. core.agent_enrollments тримає sha256 одноразового токена; сам токен повертається рівно один раз. Видача під FOR UPDATE в одній транзакції: два агенти з однієї скопійованої команди інакше створили б два зонди з одного запрошення. Відповідь на «немає», «згоріло» і «використано» однакова — розрізняти їх означає підказувати тому, хто підбирає токени. Токен зонда їде окремим полем agent_token, а не в certificate: сертифікат відповідає на інше питання й живе за іншим циклом. Агент зберігає посвідчення в /etc/netpulse/agent.json з правами 0600, через тимчасовий файл і перейменування — обрив живлення посеред запису інакше лишив би половину токена. Знайдено живим прогоном: реєстрація не проходила автентифікацію, бо інтерсептор стоїть на всьому сервері, а не на окремому сервісі — мій же коментар стверджував протилежне. І запуск із самим посвідченням падав: validate() вимагав -agent-id, не знаючи про файл. Сторінка зондів: команда встановлення з токеном, відкликання запрошень, керування модулями й лімітами, видалення. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1073 lines
34 KiB
Go
1073 lines
34 KiB
Go
// =====================================================================
|
||
// NetPulse :: common.proto
|
||
// Спільні типи для всіх сервісів контракту агент↔сервер.
|
||
// =====================================================================
|
||
|
||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||
// versions:
|
||
// protoc-gen-go v1.36.12
|
||
// protoc (unknown)
|
||
// source: netpulse/v1/common.proto
|
||
|
||
package netpulsev1
|
||
|
||
import (
|
||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||
durationpb "google.golang.org/protobuf/types/known/durationpb"
|
||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||
reflect "reflect"
|
||
sync "sync"
|
||
unsafe "unsafe"
|
||
)
|
||
|
||
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)
|
||
)
|
||
|
||
// Статус об'єкта. Дзеркалить inv.device_status у БД.
|
||
type Status int32
|
||
|
||
const (
|
||
Status_STATUS_UNSPECIFIED Status = 0
|
||
Status_STATUS_UP Status = 1
|
||
Status_STATUS_DOWN Status = 2
|
||
Status_STATUS_WARNING Status = 3
|
||
Status_STATUS_UNKNOWN Status = 4
|
||
Status_STATUS_MAINTENANCE Status = 5
|
||
)
|
||
|
||
// Enum value maps for Status.
|
||
var (
|
||
Status_name = map[int32]string{
|
||
0: "STATUS_UNSPECIFIED",
|
||
1: "STATUS_UP",
|
||
2: "STATUS_DOWN",
|
||
3: "STATUS_WARNING",
|
||
4: "STATUS_UNKNOWN",
|
||
5: "STATUS_MAINTENANCE",
|
||
}
|
||
Status_value = map[string]int32{
|
||
"STATUS_UNSPECIFIED": 0,
|
||
"STATUS_UP": 1,
|
||
"STATUS_DOWN": 2,
|
||
"STATUS_WARNING": 3,
|
||
"STATUS_UNKNOWN": 4,
|
||
"STATUS_MAINTENANCE": 5,
|
||
}
|
||
)
|
||
|
||
func (x Status) Enum() *Status {
|
||
p := new(Status)
|
||
*p = x
|
||
return p
|
||
}
|
||
|
||
func (x Status) String() string {
|
||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||
}
|
||
|
||
func (Status) Descriptor() protoreflect.EnumDescriptor {
|
||
return file_netpulse_v1_common_proto_enumTypes[0].Descriptor()
|
||
}
|
||
|
||
func (Status) Type() protoreflect.EnumType {
|
||
return &file_netpulse_v1_common_proto_enumTypes[0]
|
||
}
|
||
|
||
func (x Status) Number() protoreflect.EnumNumber {
|
||
return protoreflect.EnumNumber(x)
|
||
}
|
||
|
||
// Deprecated: Use Status.Descriptor instead.
|
||
func (Status) EnumDescriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_common_proto_rawDescGZIP(), []int{0}
|
||
}
|
||
|
||
// Транспорт підключення до пристрою. Дзеркалить inv.credential_proto.
|
||
type Transport int32
|
||
|
||
const (
|
||
Transport_TRANSPORT_UNSPECIFIED Transport = 0
|
||
Transport_TRANSPORT_SSH Transport = 1
|
||
Transport_TRANSPORT_TELNET Transport = 2
|
||
Transport_TRANSPORT_SNMP_V2C Transport = 3
|
||
Transport_TRANSPORT_SNMP_V3 Transport = 4
|
||
Transport_TRANSPORT_HTTP Transport = 5
|
||
Transport_TRANSPORT_HTTPS Transport = 6
|
||
Transport_TRANSPORT_API Transport = 7
|
||
Transport_TRANSPORT_MODBUS Transport = 8
|
||
)
|
||
|
||
// Enum value maps for Transport.
|
||
var (
|
||
Transport_name = map[int32]string{
|
||
0: "TRANSPORT_UNSPECIFIED",
|
||
1: "TRANSPORT_SSH",
|
||
2: "TRANSPORT_TELNET",
|
||
3: "TRANSPORT_SNMP_V2C",
|
||
4: "TRANSPORT_SNMP_V3",
|
||
5: "TRANSPORT_HTTP",
|
||
6: "TRANSPORT_HTTPS",
|
||
7: "TRANSPORT_API",
|
||
8: "TRANSPORT_MODBUS",
|
||
}
|
||
Transport_value = map[string]int32{
|
||
"TRANSPORT_UNSPECIFIED": 0,
|
||
"TRANSPORT_SSH": 1,
|
||
"TRANSPORT_TELNET": 2,
|
||
"TRANSPORT_SNMP_V2C": 3,
|
||
"TRANSPORT_SNMP_V3": 4,
|
||
"TRANSPORT_HTTP": 5,
|
||
"TRANSPORT_HTTPS": 6,
|
||
"TRANSPORT_API": 7,
|
||
"TRANSPORT_MODBUS": 8,
|
||
}
|
||
)
|
||
|
||
func (x Transport) Enum() *Transport {
|
||
p := new(Transport)
|
||
*p = x
|
||
return p
|
||
}
|
||
|
||
func (x Transport) String() string {
|
||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||
}
|
||
|
||
func (Transport) Descriptor() protoreflect.EnumDescriptor {
|
||
return file_netpulse_v1_common_proto_enumTypes[1].Descriptor()
|
||
}
|
||
|
||
func (Transport) Type() protoreflect.EnumType {
|
||
return &file_netpulse_v1_common_proto_enumTypes[1]
|
||
}
|
||
|
||
func (x Transport) Number() protoreflect.EnumNumber {
|
||
return protoreflect.EnumNumber(x)
|
||
}
|
||
|
||
// Deprecated: Use Transport.Descriptor instead.
|
||
func (Transport) EnumDescriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_common_proto_rawDescGZIP(), []int{1}
|
||
}
|
||
|
||
// Протокол автовиявлення сусідів. Дзеркалить topo.discovery_proto.
|
||
type DiscoveryProto int32
|
||
|
||
const (
|
||
DiscoveryProto_DISCOVERY_PROTO_UNSPECIFIED DiscoveryProto = 0
|
||
DiscoveryProto_DISCOVERY_PROTO_LLDP DiscoveryProto = 1
|
||
DiscoveryProto_DISCOVERY_PROTO_CDP DiscoveryProto = 2
|
||
DiscoveryProto_DISCOVERY_PROTO_ARP DiscoveryProto = 3
|
||
DiscoveryProto_DISCOVERY_PROTO_FDB DiscoveryProto = 4
|
||
DiscoveryProto_DISCOVERY_PROTO_STP DiscoveryProto = 5
|
||
DiscoveryProto_DISCOVERY_PROTO_ROUTING DiscoveryProto = 6
|
||
DiscoveryProto_DISCOVERY_PROTO_SNMP_TOPO DiscoveryProto = 7
|
||
)
|
||
|
||
// Enum value maps for DiscoveryProto.
|
||
var (
|
||
DiscoveryProto_name = map[int32]string{
|
||
0: "DISCOVERY_PROTO_UNSPECIFIED",
|
||
1: "DISCOVERY_PROTO_LLDP",
|
||
2: "DISCOVERY_PROTO_CDP",
|
||
3: "DISCOVERY_PROTO_ARP",
|
||
4: "DISCOVERY_PROTO_FDB",
|
||
5: "DISCOVERY_PROTO_STP",
|
||
6: "DISCOVERY_PROTO_ROUTING",
|
||
7: "DISCOVERY_PROTO_SNMP_TOPO",
|
||
}
|
||
DiscoveryProto_value = map[string]int32{
|
||
"DISCOVERY_PROTO_UNSPECIFIED": 0,
|
||
"DISCOVERY_PROTO_LLDP": 1,
|
||
"DISCOVERY_PROTO_CDP": 2,
|
||
"DISCOVERY_PROTO_ARP": 3,
|
||
"DISCOVERY_PROTO_FDB": 4,
|
||
"DISCOVERY_PROTO_STP": 5,
|
||
"DISCOVERY_PROTO_ROUTING": 6,
|
||
"DISCOVERY_PROTO_SNMP_TOPO": 7,
|
||
}
|
||
)
|
||
|
||
func (x DiscoveryProto) Enum() *DiscoveryProto {
|
||
p := new(DiscoveryProto)
|
||
*p = x
|
||
return p
|
||
}
|
||
|
||
func (x DiscoveryProto) String() string {
|
||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||
}
|
||
|
||
func (DiscoveryProto) Descriptor() protoreflect.EnumDescriptor {
|
||
return file_netpulse_v1_common_proto_enumTypes[2].Descriptor()
|
||
}
|
||
|
||
func (DiscoveryProto) Type() protoreflect.EnumType {
|
||
return &file_netpulse_v1_common_proto_enumTypes[2]
|
||
}
|
||
|
||
func (x DiscoveryProto) Number() protoreflect.EnumNumber {
|
||
return protoreflect.EnumNumber(x)
|
||
}
|
||
|
||
// Deprecated: Use DiscoveryProto.Descriptor instead.
|
||
func (DiscoveryProto) EnumDescriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_common_proto_rawDescGZIP(), []int{2}
|
||
}
|
||
|
||
type SnmpV3Options_SecurityLevel int32
|
||
|
||
const (
|
||
SnmpV3Options_SECURITY_LEVEL_UNSPECIFIED SnmpV3Options_SecurityLevel = 0
|
||
SnmpV3Options_SECURITY_LEVEL_NO_AUTH_NO_PRIV SnmpV3Options_SecurityLevel = 1
|
||
SnmpV3Options_SECURITY_LEVEL_AUTH_NO_PRIV SnmpV3Options_SecurityLevel = 2
|
||
SnmpV3Options_SECURITY_LEVEL_AUTH_PRIV SnmpV3Options_SecurityLevel = 3
|
||
)
|
||
|
||
// Enum value maps for SnmpV3Options_SecurityLevel.
|
||
var (
|
||
SnmpV3Options_SecurityLevel_name = map[int32]string{
|
||
0: "SECURITY_LEVEL_UNSPECIFIED",
|
||
1: "SECURITY_LEVEL_NO_AUTH_NO_PRIV",
|
||
2: "SECURITY_LEVEL_AUTH_NO_PRIV",
|
||
3: "SECURITY_LEVEL_AUTH_PRIV",
|
||
}
|
||
SnmpV3Options_SecurityLevel_value = map[string]int32{
|
||
"SECURITY_LEVEL_UNSPECIFIED": 0,
|
||
"SECURITY_LEVEL_NO_AUTH_NO_PRIV": 1,
|
||
"SECURITY_LEVEL_AUTH_NO_PRIV": 2,
|
||
"SECURITY_LEVEL_AUTH_PRIV": 3,
|
||
}
|
||
)
|
||
|
||
func (x SnmpV3Options_SecurityLevel) Enum() *SnmpV3Options_SecurityLevel {
|
||
p := new(SnmpV3Options_SecurityLevel)
|
||
*p = x
|
||
return p
|
||
}
|
||
|
||
func (x SnmpV3Options_SecurityLevel) String() string {
|
||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||
}
|
||
|
||
func (SnmpV3Options_SecurityLevel) Descriptor() protoreflect.EnumDescriptor {
|
||
return file_netpulse_v1_common_proto_enumTypes[3].Descriptor()
|
||
}
|
||
|
||
func (SnmpV3Options_SecurityLevel) Type() protoreflect.EnumType {
|
||
return &file_netpulse_v1_common_proto_enumTypes[3]
|
||
}
|
||
|
||
func (x SnmpV3Options_SecurityLevel) Number() protoreflect.EnumNumber {
|
||
return protoreflect.EnumNumber(x)
|
||
}
|
||
|
||
// Deprecated: Use SnmpV3Options_SecurityLevel.Descriptor instead.
|
||
func (SnmpV3Options_SecurityLevel) EnumDescriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_common_proto_rawDescGZIP(), []int{3, 0}
|
||
}
|
||
|
||
// Помилка виконання. Свідомо не gRPC-статус: одна задача може впасти,
|
||
// поки решта потоку жива, тому помилки їдуть у корисному навантаженні.
|
||
type Error struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
// Стабільний машинний код: "timeout", "auth_failed", "unreachable",
|
||
// "snmp_no_such_object", "prompt_mismatch", "permission_denied".
|
||
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
|
||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||
// Чи має сенс повторювати. Сервер вирішує, чи планувати retry.
|
||
Retryable bool `protobuf:"varint,3,opt,name=retryable,proto3" json:"retryable,omitempty"`
|
||
Details map[string]string `protobuf:"bytes,4,rep,name=details,proto3" json:"details,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *Error) Reset() {
|
||
*x = Error{}
|
||
mi := &file_netpulse_v1_common_proto_msgTypes[0]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *Error) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*Error) ProtoMessage() {}
|
||
|
||
func (x *Error) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_common_proto_msgTypes[0]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use Error.ProtoReflect.Descriptor instead.
|
||
func (*Error) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_common_proto_rawDescGZIP(), []int{0}
|
||
}
|
||
|
||
func (x *Error) GetCode() string {
|
||
if x != nil {
|
||
return x.Code
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Error) GetMessage() string {
|
||
if x != nil {
|
||
return x.Message
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Error) GetRetryable() bool {
|
||
if x != nil {
|
||
return x.Retryable
|
||
}
|
||
return false
|
||
}
|
||
|
||
func (x *Error) GetDetails() map[string]string {
|
||
if x != nil {
|
||
return x.Details
|
||
}
|
||
return nil
|
||
}
|
||
|
||
// Мінімальний опис пристрою, потрібний агенту для опитування.
|
||
// Агент не має жодного уявлення про тенанти, тарифи чи мапи —
|
||
// це навмисно: зонд знає лише "куди йти і як".
|
||
type DeviceTarget struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
|
||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||
// Адреса опитування: IP або FQDN.
|
||
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
|
||
// Ідентифікатори для кореляції автовиявлення (topo.neighbors).
|
||
ChassisId string `protobuf:"bytes,4,opt,name=chassis_id,json=chassisId,proto3" json:"chassis_id,omitempty"`
|
||
SystemName string `protobuf:"bytes,5,opt,name=system_name,json=systemName,proto3" json:"system_name,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *DeviceTarget) Reset() {
|
||
*x = DeviceTarget{}
|
||
mi := &file_netpulse_v1_common_proto_msgTypes[1]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *DeviceTarget) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*DeviceTarget) ProtoMessage() {}
|
||
|
||
func (x *DeviceTarget) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_common_proto_msgTypes[1]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use DeviceTarget.ProtoReflect.Descriptor instead.
|
||
func (*DeviceTarget) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_common_proto_rawDescGZIP(), []int{1}
|
||
}
|
||
|
||
func (x *DeviceTarget) GetDeviceId() string {
|
||
if x != nil {
|
||
return x.DeviceId
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *DeviceTarget) GetName() string {
|
||
if x != nil {
|
||
return x.Name
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *DeviceTarget) GetAddress() string {
|
||
if x != nil {
|
||
return x.Address
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *DeviceTarget) GetChassisId() string {
|
||
if x != nil {
|
||
return x.ChassisId
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *DeviceTarget) GetSystemName() string {
|
||
if x != nil {
|
||
return x.SystemName
|
||
}
|
||
return ""
|
||
}
|
||
|
||
// Облікові дані. Приходять із сервера вже РОЗШИФРОВАНИМИ.
|
||
//
|
||
// БЕЗПЕКА:
|
||
// - передаються виключно всередині mTLS-каналу;
|
||
// - агент тримає їх лише в пам'яті, ніколи не пише на диск і не логує;
|
||
// - мають TTL (expires_at) — після спливу агент зобов'язаний запитати
|
||
// новий комплект, а старий занулити.
|
||
type Credential struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
CredentialId string `protobuf:"bytes,1,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"`
|
||
Transport Transport `protobuf:"varint,2,opt,name=transport,proto3,enum=netpulse.v1.Transport" json:"transport,omitempty"`
|
||
Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
|
||
Port uint32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
|
||
// Types that are valid to be assigned to Secret:
|
||
//
|
||
// *Credential_Password
|
||
// *Credential_PrivateKey
|
||
// *Credential_Community
|
||
// *Credential_Token
|
||
Secret isCredential_Secret `protobuf_oneof:"secret"`
|
||
// Enable/privileged-пароль (Cisco-подібні).
|
||
EnablePassword string `protobuf:"bytes,9,opt,name=enable_password,json=enablePassword,proto3" json:"enable_password,omitempty"`
|
||
// Параметри SNMPv3.
|
||
SnmpV3 *SnmpV3Options `protobuf:"bytes,10,opt,name=snmp_v3,json=snmpV3,proto3" json:"snmp_v3,omitempty"`
|
||
ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *Credential) Reset() {
|
||
*x = Credential{}
|
||
mi := &file_netpulse_v1_common_proto_msgTypes[2]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *Credential) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*Credential) ProtoMessage() {}
|
||
|
||
func (x *Credential) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_common_proto_msgTypes[2]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use Credential.ProtoReflect.Descriptor instead.
|
||
func (*Credential) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_common_proto_rawDescGZIP(), []int{2}
|
||
}
|
||
|
||
func (x *Credential) GetCredentialId() string {
|
||
if x != nil {
|
||
return x.CredentialId
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Credential) GetTransport() Transport {
|
||
if x != nil {
|
||
return x.Transport
|
||
}
|
||
return Transport_TRANSPORT_UNSPECIFIED
|
||
}
|
||
|
||
func (x *Credential) GetUsername() string {
|
||
if x != nil {
|
||
return x.Username
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Credential) GetPort() uint32 {
|
||
if x != nil {
|
||
return x.Port
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *Credential) GetSecret() isCredential_Secret {
|
||
if x != nil {
|
||
return x.Secret
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Credential) GetPassword() string {
|
||
if x != nil {
|
||
if x, ok := x.Secret.(*Credential_Password); ok {
|
||
return x.Password
|
||
}
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Credential) GetPrivateKey() []byte {
|
||
if x != nil {
|
||
if x, ok := x.Secret.(*Credential_PrivateKey); ok {
|
||
return x.PrivateKey
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Credential) GetCommunity() string {
|
||
if x != nil {
|
||
if x, ok := x.Secret.(*Credential_Community); ok {
|
||
return x.Community
|
||
}
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Credential) GetToken() string {
|
||
if x != nil {
|
||
if x, ok := x.Secret.(*Credential_Token); ok {
|
||
return x.Token
|
||
}
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Credential) GetEnablePassword() string {
|
||
if x != nil {
|
||
return x.EnablePassword
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Credential) GetSnmpV3() *SnmpV3Options {
|
||
if x != nil {
|
||
return x.SnmpV3
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Credential) GetExpiresAt() *timestamppb.Timestamp {
|
||
if x != nil {
|
||
return x.ExpiresAt
|
||
}
|
||
return nil
|
||
}
|
||
|
||
type isCredential_Secret interface {
|
||
isCredential_Secret()
|
||
}
|
||
|
||
type Credential_Password struct {
|
||
Password string `protobuf:"bytes,5,opt,name=password,proto3,oneof"`
|
||
}
|
||
|
||
type Credential_PrivateKey struct {
|
||
PrivateKey []byte `protobuf:"bytes,6,opt,name=private_key,json=privateKey,proto3,oneof"`
|
||
}
|
||
|
||
type Credential_Community struct {
|
||
Community string `protobuf:"bytes,7,opt,name=community,proto3,oneof"` // SNMP v2c
|
||
}
|
||
|
||
type Credential_Token struct {
|
||
Token string `protobuf:"bytes,8,opt,name=token,proto3,oneof"` // HTTP/API
|
||
}
|
||
|
||
func (*Credential_Password) isCredential_Secret() {}
|
||
|
||
func (*Credential_PrivateKey) isCredential_Secret() {}
|
||
|
||
func (*Credential_Community) isCredential_Secret() {}
|
||
|
||
func (*Credential_Token) isCredential_Secret() {}
|
||
|
||
type SnmpV3Options struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
Level SnmpV3Options_SecurityLevel `protobuf:"varint,1,opt,name=level,proto3,enum=netpulse.v1.SnmpV3Options_SecurityLevel" json:"level,omitempty"`
|
||
AuthProtocol string `protobuf:"bytes,2,opt,name=auth_protocol,json=authProtocol,proto3" json:"auth_protocol,omitempty"` // MD5 | SHA | SHA224 | SHA256 | SHA384 | SHA512
|
||
AuthPassword string `protobuf:"bytes,3,opt,name=auth_password,json=authPassword,proto3" json:"auth_password,omitempty"`
|
||
PrivProtocol string `protobuf:"bytes,4,opt,name=priv_protocol,json=privProtocol,proto3" json:"priv_protocol,omitempty"` // DES | AES | AES192 | AES256
|
||
PrivPassword string `protobuf:"bytes,5,opt,name=priv_password,json=privPassword,proto3" json:"priv_password,omitempty"`
|
||
ContextName string `protobuf:"bytes,6,opt,name=context_name,json=contextName,proto3" json:"context_name,omitempty"`
|
||
SecurityName string `protobuf:"bytes,7,opt,name=security_name,json=securityName,proto3" json:"security_name,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *SnmpV3Options) Reset() {
|
||
*x = SnmpV3Options{}
|
||
mi := &file_netpulse_v1_common_proto_msgTypes[3]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *SnmpV3Options) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*SnmpV3Options) ProtoMessage() {}
|
||
|
||
func (x *SnmpV3Options) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_common_proto_msgTypes[3]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use SnmpV3Options.ProtoReflect.Descriptor instead.
|
||
func (*SnmpV3Options) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_common_proto_rawDescGZIP(), []int{3}
|
||
}
|
||
|
||
func (x *SnmpV3Options) GetLevel() SnmpV3Options_SecurityLevel {
|
||
if x != nil {
|
||
return x.Level
|
||
}
|
||
return SnmpV3Options_SECURITY_LEVEL_UNSPECIFIED
|
||
}
|
||
|
||
func (x *SnmpV3Options) GetAuthProtocol() string {
|
||
if x != nil {
|
||
return x.AuthProtocol
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *SnmpV3Options) GetAuthPassword() string {
|
||
if x != nil {
|
||
return x.AuthPassword
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *SnmpV3Options) GetPrivProtocol() string {
|
||
if x != nil {
|
||
return x.PrivProtocol
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *SnmpV3Options) GetPrivPassword() string {
|
||
if x != nil {
|
||
return x.PrivPassword
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *SnmpV3Options) GetContextName() string {
|
||
if x != nil {
|
||
return x.ContextName
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *SnmpV3Options) GetSecurityName() string {
|
||
if x != nil {
|
||
return x.SecurityName
|
||
}
|
||
return ""
|
||
}
|
||
|
||
// Опис версії агента — для сумісності й самооновлення.
|
||
type AgentBuild struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // 1.4.2
|
||
Commit string `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"`
|
||
Os string `protobuf:"bytes,3,opt,name=os,proto3" json:"os,omitempty"` // linux | windows | darwin
|
||
Arch string `protobuf:"bytes,4,opt,name=arch,proto3" json:"arch,omitempty"` // amd64 | arm64
|
||
GoVersion string `protobuf:"bytes,5,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"`
|
||
// Модулі, вкомпільовані в цей бінарник (не обов'язково активні).
|
||
CompiledModules []string `protobuf:"bytes,6,rep,name=compiled_modules,json=compiledModules,proto3" json:"compiled_modules,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *AgentBuild) Reset() {
|
||
*x = AgentBuild{}
|
||
mi := &file_netpulse_v1_common_proto_msgTypes[4]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *AgentBuild) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*AgentBuild) ProtoMessage() {}
|
||
|
||
func (x *AgentBuild) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_common_proto_msgTypes[4]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use AgentBuild.ProtoReflect.Descriptor instead.
|
||
func (*AgentBuild) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_common_proto_rawDescGZIP(), []int{4}
|
||
}
|
||
|
||
func (x *AgentBuild) GetVersion() string {
|
||
if x != nil {
|
||
return x.Version
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *AgentBuild) GetCommit() string {
|
||
if x != nil {
|
||
return x.Commit
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *AgentBuild) GetOs() string {
|
||
if x != nil {
|
||
return x.Os
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *AgentBuild) GetArch() string {
|
||
if x != nil {
|
||
return x.Arch
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *AgentBuild) GetGoVersion() string {
|
||
if x != nil {
|
||
return x.GoVersion
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *AgentBuild) GetCompiledModules() []string {
|
||
if x != nil {
|
||
return x.CompiledModules
|
||
}
|
||
return nil
|
||
}
|
||
|
||
// Самометрики агента. Лягають у ts.agent_health.
|
||
type AgentHealth struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
CpuPct float32 `protobuf:"fixed32,1,opt,name=cpu_pct,json=cpuPct,proto3" json:"cpu_pct,omitempty"`
|
||
RssBytes uint64 `protobuf:"varint,2,opt,name=rss_bytes,json=rssBytes,proto3" json:"rss_bytes,omitempty"` // цільовий бюджет: < 30 МБ
|
||
Goroutines uint32 `protobuf:"varint,3,opt,name=goroutines,proto3" json:"goroutines,omitempty"`
|
||
QueueDepth uint32 `protobuf:"varint,4,opt,name=queue_depth,json=queueDepth,proto3" json:"queue_depth,omitempty"` // скільки результатів чекає на відправку
|
||
ChecksPerSec float32 `protobuf:"fixed32,5,opt,name=checks_per_sec,json=checksPerSec,proto3" json:"checks_per_sec,omitempty"`
|
||
ErrorsPerMin float32 `protobuf:"fixed32,6,opt,name=errors_per_min,json=errorsPerMin,proto3" json:"errors_per_min,omitempty"`
|
||
// Скільки семплів довелося викинути через переповнення буфера.
|
||
// Ненульове значення — привід підняти алерт на самого агента.
|
||
DroppedSamples uint64 `protobuf:"varint,7,opt,name=dropped_samples,json=droppedSamples,proto3" json:"dropped_samples,omitempty"`
|
||
Uptime *durationpb.Duration `protobuf:"bytes,8,opt,name=uptime,proto3" json:"uptime,omitempty"`
|
||
// Розсинхронізація годинника з сервером; агент рахує її з Welcome.server_time.
|
||
ClockSkew *durationpb.Duration `protobuf:"bytes,9,opt,name=clock_skew,json=clockSkew,proto3" json:"clock_skew,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *AgentHealth) Reset() {
|
||
*x = AgentHealth{}
|
||
mi := &file_netpulse_v1_common_proto_msgTypes[5]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *AgentHealth) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*AgentHealth) ProtoMessage() {}
|
||
|
||
func (x *AgentHealth) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_common_proto_msgTypes[5]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use AgentHealth.ProtoReflect.Descriptor instead.
|
||
func (*AgentHealth) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_common_proto_rawDescGZIP(), []int{5}
|
||
}
|
||
|
||
func (x *AgentHealth) GetCpuPct() float32 {
|
||
if x != nil {
|
||
return x.CpuPct
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *AgentHealth) GetRssBytes() uint64 {
|
||
if x != nil {
|
||
return x.RssBytes
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *AgentHealth) GetGoroutines() uint32 {
|
||
if x != nil {
|
||
return x.Goroutines
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *AgentHealth) GetQueueDepth() uint32 {
|
||
if x != nil {
|
||
return x.QueueDepth
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *AgentHealth) GetChecksPerSec() float32 {
|
||
if x != nil {
|
||
return x.ChecksPerSec
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *AgentHealth) GetErrorsPerMin() float32 {
|
||
if x != nil {
|
||
return x.ErrorsPerMin
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *AgentHealth) GetDroppedSamples() uint64 {
|
||
if x != nil {
|
||
return x.DroppedSamples
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *AgentHealth) GetUptime() *durationpb.Duration {
|
||
if x != nil {
|
||
return x.Uptime
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *AgentHealth) GetClockSkew() *durationpb.Duration {
|
||
if x != nil {
|
||
return x.ClockSkew
|
||
}
|
||
return nil
|
||
}
|
||
|
||
var File_netpulse_v1_common_proto protoreflect.FileDescriptor
|
||
|
||
const file_netpulse_v1_common_proto_rawDesc = "" +
|
||
"\n" +
|
||
"\x18netpulse/v1/common.proto\x12\vnetpulse.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xca\x01\n" +
|
||
"\x05Error\x12\x12\n" +
|
||
"\x04code\x18\x01 \x01(\tR\x04code\x12\x18\n" +
|
||
"\amessage\x18\x02 \x01(\tR\amessage\x12\x1c\n" +
|
||
"\tretryable\x18\x03 \x01(\bR\tretryable\x129\n" +
|
||
"\adetails\x18\x04 \x03(\v2\x1f.netpulse.v1.Error.DetailsEntryR\adetails\x1a:\n" +
|
||
"\fDetailsEntry\x12\x10\n" +
|
||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x99\x01\n" +
|
||
"\fDeviceTarget\x12\x1b\n" +
|
||
"\tdevice_id\x18\x01 \x01(\tR\bdeviceId\x12\x12\n" +
|
||
"\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n" +
|
||
"\aaddress\x18\x03 \x01(\tR\aaddress\x12\x1d\n" +
|
||
"\n" +
|
||
"chassis_id\x18\x04 \x01(\tR\tchassisId\x12\x1f\n" +
|
||
"\vsystem_name\x18\x05 \x01(\tR\n" +
|
||
"systemName\"\xb3\x03\n" +
|
||
"\n" +
|
||
"Credential\x12#\n" +
|
||
"\rcredential_id\x18\x01 \x01(\tR\fcredentialId\x124\n" +
|
||
"\ttransport\x18\x02 \x01(\x0e2\x16.netpulse.v1.TransportR\ttransport\x12\x1a\n" +
|
||
"\busername\x18\x03 \x01(\tR\busername\x12\x12\n" +
|
||
"\x04port\x18\x04 \x01(\rR\x04port\x12\x1c\n" +
|
||
"\bpassword\x18\x05 \x01(\tH\x00R\bpassword\x12!\n" +
|
||
"\vprivate_key\x18\x06 \x01(\fH\x00R\n" +
|
||
"privateKey\x12\x1e\n" +
|
||
"\tcommunity\x18\a \x01(\tH\x00R\tcommunity\x12\x16\n" +
|
||
"\x05token\x18\b \x01(\tH\x00R\x05token\x12'\n" +
|
||
"\x0fenable_password\x18\t \x01(\tR\x0eenablePassword\x123\n" +
|
||
"\asnmp_v3\x18\n" +
|
||
" \x01(\v2\x1a.netpulse.v1.SnmpV3OptionsR\x06snmpV3\x129\n" +
|
||
"\n" +
|
||
"expires_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAtB\b\n" +
|
||
"\x06secret\"\xc0\x03\n" +
|
||
"\rSnmpV3Options\x12>\n" +
|
||
"\x05level\x18\x01 \x01(\x0e2(.netpulse.v1.SnmpV3Options.SecurityLevelR\x05level\x12#\n" +
|
||
"\rauth_protocol\x18\x02 \x01(\tR\fauthProtocol\x12#\n" +
|
||
"\rauth_password\x18\x03 \x01(\tR\fauthPassword\x12#\n" +
|
||
"\rpriv_protocol\x18\x04 \x01(\tR\fprivProtocol\x12#\n" +
|
||
"\rpriv_password\x18\x05 \x01(\tR\fprivPassword\x12!\n" +
|
||
"\fcontext_name\x18\x06 \x01(\tR\vcontextName\x12#\n" +
|
||
"\rsecurity_name\x18\a \x01(\tR\fsecurityName\"\x92\x01\n" +
|
||
"\rSecurityLevel\x12\x1e\n" +
|
||
"\x1aSECURITY_LEVEL_UNSPECIFIED\x10\x00\x12\"\n" +
|
||
"\x1eSECURITY_LEVEL_NO_AUTH_NO_PRIV\x10\x01\x12\x1f\n" +
|
||
"\x1bSECURITY_LEVEL_AUTH_NO_PRIV\x10\x02\x12\x1c\n" +
|
||
"\x18SECURITY_LEVEL_AUTH_PRIV\x10\x03\"\xac\x01\n" +
|
||
"\n" +
|
||
"AgentBuild\x12\x18\n" +
|
||
"\aversion\x18\x01 \x01(\tR\aversion\x12\x16\n" +
|
||
"\x06commit\x18\x02 \x01(\tR\x06commit\x12\x0e\n" +
|
||
"\x02os\x18\x03 \x01(\tR\x02os\x12\x12\n" +
|
||
"\x04arch\x18\x04 \x01(\tR\x04arch\x12\x1d\n" +
|
||
"\n" +
|
||
"go_version\x18\x05 \x01(\tR\tgoVersion\x12)\n" +
|
||
"\x10compiled_modules\x18\x06 \x03(\tR\x0fcompiledModules\"\xe6\x02\n" +
|
||
"\vAgentHealth\x12\x17\n" +
|
||
"\acpu_pct\x18\x01 \x01(\x02R\x06cpuPct\x12\x1b\n" +
|
||
"\trss_bytes\x18\x02 \x01(\x04R\brssBytes\x12\x1e\n" +
|
||
"\n" +
|
||
"goroutines\x18\x03 \x01(\rR\n" +
|
||
"goroutines\x12\x1f\n" +
|
||
"\vqueue_depth\x18\x04 \x01(\rR\n" +
|
||
"queueDepth\x12$\n" +
|
||
"\x0echecks_per_sec\x18\x05 \x01(\x02R\fchecksPerSec\x12$\n" +
|
||
"\x0eerrors_per_min\x18\x06 \x01(\x02R\ferrorsPerMin\x12'\n" +
|
||
"\x0fdropped_samples\x18\a \x01(\x04R\x0edroppedSamples\x121\n" +
|
||
"\x06uptime\x18\b \x01(\v2\x19.google.protobuf.DurationR\x06uptime\x128\n" +
|
||
"\n" +
|
||
"clock_skew\x18\t \x01(\v2\x19.google.protobuf.DurationR\tclockSkew*\x80\x01\n" +
|
||
"\x06Status\x12\x16\n" +
|
||
"\x12STATUS_UNSPECIFIED\x10\x00\x12\r\n" +
|
||
"\tSTATUS_UP\x10\x01\x12\x0f\n" +
|
||
"\vSTATUS_DOWN\x10\x02\x12\x12\n" +
|
||
"\x0eSTATUS_WARNING\x10\x03\x12\x12\n" +
|
||
"\x0eSTATUS_UNKNOWN\x10\x04\x12\x16\n" +
|
||
"\x12STATUS_MAINTENANCE\x10\x05*\xd0\x01\n" +
|
||
"\tTransport\x12\x19\n" +
|
||
"\x15TRANSPORT_UNSPECIFIED\x10\x00\x12\x11\n" +
|
||
"\rTRANSPORT_SSH\x10\x01\x12\x14\n" +
|
||
"\x10TRANSPORT_TELNET\x10\x02\x12\x16\n" +
|
||
"\x12TRANSPORT_SNMP_V2C\x10\x03\x12\x15\n" +
|
||
"\x11TRANSPORT_SNMP_V3\x10\x04\x12\x12\n" +
|
||
"\x0eTRANSPORT_HTTP\x10\x05\x12\x13\n" +
|
||
"\x0fTRANSPORT_HTTPS\x10\x06\x12\x11\n" +
|
||
"\rTRANSPORT_API\x10\a\x12\x14\n" +
|
||
"\x10TRANSPORT_MODBUS\x10\b*\xeb\x01\n" +
|
||
"\x0eDiscoveryProto\x12\x1f\n" +
|
||
"\x1bDISCOVERY_PROTO_UNSPECIFIED\x10\x00\x12\x18\n" +
|
||
"\x14DISCOVERY_PROTO_LLDP\x10\x01\x12\x17\n" +
|
||
"\x13DISCOVERY_PROTO_CDP\x10\x02\x12\x17\n" +
|
||
"\x13DISCOVERY_PROTO_ARP\x10\x03\x12\x17\n" +
|
||
"\x13DISCOVERY_PROTO_FDB\x10\x04\x12\x17\n" +
|
||
"\x13DISCOVERY_PROTO_STP\x10\x05\x12\x1b\n" +
|
||
"\x17DISCOVERY_PROTO_ROUTING\x10\x06\x12\x1d\n" +
|
||
"\x19DISCOVERY_PROTO_SNMP_TOPO\x10\aB\xa7\x01\n" +
|
||
"\x0fcom.netpulse.v1B\vCommonProtoP\x01Z:github.com/netpulse/netpulse/gen/go/netpulse/v1;netpulsev1\xa2\x02\x03NXX\xaa\x02\vNetpulse.V1\xca\x02\vNetpulse\\V1\xe2\x02\x17Netpulse\\V1\\GPBMetadata\xea\x02\fNetpulse::V1b\x06proto3"
|
||
|
||
var (
|
||
file_netpulse_v1_common_proto_rawDescOnce sync.Once
|
||
file_netpulse_v1_common_proto_rawDescData []byte
|
||
)
|
||
|
||
func file_netpulse_v1_common_proto_rawDescGZIP() []byte {
|
||
file_netpulse_v1_common_proto_rawDescOnce.Do(func() {
|
||
file_netpulse_v1_common_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_netpulse_v1_common_proto_rawDesc), len(file_netpulse_v1_common_proto_rawDesc)))
|
||
})
|
||
return file_netpulse_v1_common_proto_rawDescData
|
||
}
|
||
|
||
var file_netpulse_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
|
||
var file_netpulse_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||
var file_netpulse_v1_common_proto_goTypes = []any{
|
||
(Status)(0), // 0: netpulse.v1.Status
|
||
(Transport)(0), // 1: netpulse.v1.Transport
|
||
(DiscoveryProto)(0), // 2: netpulse.v1.DiscoveryProto
|
||
(SnmpV3Options_SecurityLevel)(0), // 3: netpulse.v1.SnmpV3Options.SecurityLevel
|
||
(*Error)(nil), // 4: netpulse.v1.Error
|
||
(*DeviceTarget)(nil), // 5: netpulse.v1.DeviceTarget
|
||
(*Credential)(nil), // 6: netpulse.v1.Credential
|
||
(*SnmpV3Options)(nil), // 7: netpulse.v1.SnmpV3Options
|
||
(*AgentBuild)(nil), // 8: netpulse.v1.AgentBuild
|
||
(*AgentHealth)(nil), // 9: netpulse.v1.AgentHealth
|
||
nil, // 10: netpulse.v1.Error.DetailsEntry
|
||
(*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp
|
||
(*durationpb.Duration)(nil), // 12: google.protobuf.Duration
|
||
}
|
||
var file_netpulse_v1_common_proto_depIdxs = []int32{
|
||
10, // 0: netpulse.v1.Error.details:type_name -> netpulse.v1.Error.DetailsEntry
|
||
1, // 1: netpulse.v1.Credential.transport:type_name -> netpulse.v1.Transport
|
||
7, // 2: netpulse.v1.Credential.snmp_v3:type_name -> netpulse.v1.SnmpV3Options
|
||
11, // 3: netpulse.v1.Credential.expires_at:type_name -> google.protobuf.Timestamp
|
||
3, // 4: netpulse.v1.SnmpV3Options.level:type_name -> netpulse.v1.SnmpV3Options.SecurityLevel
|
||
12, // 5: netpulse.v1.AgentHealth.uptime:type_name -> google.protobuf.Duration
|
||
12, // 6: netpulse.v1.AgentHealth.clock_skew:type_name -> google.protobuf.Duration
|
||
7, // [7:7] is the sub-list for method output_type
|
||
7, // [7:7] is the sub-list for method input_type
|
||
7, // [7:7] is the sub-list for extension type_name
|
||
7, // [7:7] is the sub-list for extension extendee
|
||
0, // [0:7] is the sub-list for field type_name
|
||
}
|
||
|
||
func init() { file_netpulse_v1_common_proto_init() }
|
||
func file_netpulse_v1_common_proto_init() {
|
||
if File_netpulse_v1_common_proto != nil {
|
||
return
|
||
}
|
||
file_netpulse_v1_common_proto_msgTypes[2].OneofWrappers = []any{
|
||
(*Credential_Password)(nil),
|
||
(*Credential_PrivateKey)(nil),
|
||
(*Credential_Community)(nil),
|
||
(*Credential_Token)(nil),
|
||
}
|
||
type x struct{}
|
||
out := protoimpl.TypeBuilder{
|
||
File: protoimpl.DescBuilder{
|
||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_netpulse_v1_common_proto_rawDesc), len(file_netpulse_v1_common_proto_rawDesc)),
|
||
NumEnums: 4,
|
||
NumMessages: 7,
|
||
NumExtensions: 0,
|
||
NumServices: 0,
|
||
},
|
||
GoTypes: file_netpulse_v1_common_proto_goTypes,
|
||
DependencyIndexes: file_netpulse_v1_common_proto_depIdxs,
|
||
EnumInfos: file_netpulse_v1_common_proto_enumTypes,
|
||
MessageInfos: file_netpulse_v1_common_proto_msgTypes,
|
||
}.Build()
|
||
File_netpulse_v1_common_proto = out.File
|
||
file_netpulse_v1_common_proto_goTypes = nil
|
||
file_netpulse_v1_common_proto_depIdxs = nil
|
||
}
|