Documentation ¶
Overview ¶
Code generated, do not edit
Code generated, do not edit ¶
Code generated, do not edit ¶
Code generated, do not edit ¶
Code generated, do not edit
Index ¶
- Variables
- func NewLDAPClient(cfg Config, logger log.Logger) (*ldap.Conn, error)
- func PublicKeyFile(file string) ssh.AuthMethod
- func RegisterInventoryServer(s grpc.ServiceRegistrar, srv InventoryServer)
- func SSHAgent() ssh.AuthMethod
- type Config
- type Empty
- type IOTDevice
- func (*IOTDevice) Descriptor() ([]byte, []int)deprecated
- func (x *IOTDevice) GetDeviceDiscovery() *iot.DeviceDiscovery
- func (x *IOTDevice) GetName() string
- func (x *IOTDevice) GetNetworkId() *NetworkID
- func (*IOTDevice) ProtoMessage()
- func (x *IOTDevice) ProtoReflect() protoreflect.Message
- func (x *IOTDevice) Reset()
- func (x *IOTDevice) String() string
- type IOTZone
- func (*IOTZone) Descriptor() ([]byte, []int)deprecated
- func (x *IOTZone) GetDescription() string
- func (x *IOTZone) GetDn() string
- func (x *IOTZone) GetName() string
- func (*IOTZone) ProtoMessage()
- func (x *IOTZone) ProtoReflect() protoreflect.Message
- func (x *IOTZone) Reset()
- func (x *IOTZone) String() string
- type Inet6Network
- func (*Inet6Network) Descriptor() ([]byte, []int)deprecated
- func (x *Inet6Network) GetDn() string
- func (x *Inet6Network) GetGateway() string
- func (x *Inet6Network) GetName() string
- func (x *Inet6Network) GetPrefix() string
- func (*Inet6Network) ProtoMessage()
- func (x *Inet6Network) ProtoReflect() protoreflect.Message
- func (x *Inet6Network) Reset()
- func (x *Inet6Network) String() string
- type InetNetwork
- func (*InetNetwork) Descriptor() ([]byte, []int)deprecated
- func (x *InetNetwork) GetDn() string
- func (x *InetNetwork) GetDynamicRange() string
- func (x *InetNetwork) GetGateway() string
- func (x *InetNetwork) GetName() string
- func (x *InetNetwork) GetPrefix() string
- func (*InetNetwork) ProtoMessage()
- func (x *InetNetwork) ProtoReflect() protoreflect.Message
- func (x *InetNetwork) Reset()
- func (x *InetNetwork) String() string
- type Inventory
- type InventoryClient
- type InventoryInteractive
- type InventoryServer
- type Inventory_ListNetworkHostsClient
- type Inventory_ListNetworkHostsServer
- type Inventory_ListNetworkIDsClient
- type Inventory_ListNetworkIDsServer
- type Inventory_ListZigbeeDevicesClient
- type Inventory_ListZigbeeDevicesServer
- type L3Network
- func (*L3Network) Descriptor() ([]byte, []int)deprecated
- func (x *L3Network) GetDescription() string
- func (x *L3Network) GetDn() string
- func (x *L3Network) GetDomain() string
- func (x *L3Network) GetInet6Network() []*Inet6Network
- func (x *L3Network) GetInetNetwork() []*InetNetwork
- func (x *L3Network) GetName() string
- func (x *L3Network) GetNtpServers() []string
- func (x *L3Network) GetSoa() string
- func (*L3Network) ProtoMessage()
- func (x *L3Network) ProtoReflect() protoreflect.Message
- func (x *L3Network) Reset()
- func (x *L3Network) String() string
- type LDAPConfig
- type LDAPInventory
- func (i *LDAPInventory) CreateIOTZone(ctx context.Context, x *IOTZone) (*IOTZone, error)
- func (i *LDAPInventory) CreateInet6Network(ctx context.Context, x *Inet6Network) (*Inet6Network, error)
- func (i *LDAPInventory) CreateInetNetwork(ctx context.Context, x *InetNetwork) (*InetNetwork, error)
- func (i *LDAPInventory) CreateL3Network(ctx context.Context, x *L3Network) (*L3Network, error)
- func (i *LDAPInventory) CreateNetworkHost(ctx context.Context, x *NetworkHost) (*NetworkHost, error)
- func (i *LDAPInventory) CreateNetworkID(ctx context.Context, x *NetworkID) (*NetworkID, error)
- func (i *LDAPInventory) CreateZigbeeDevice(ctx context.Context, x *ZigbeeDevice) (*ZigbeeDevice, error)
- func (i *LDAPInventory) FetchIOTZone(ctx context.Context, name string) (*IOTZone, error)
- func (i *LDAPInventory) FetchInet6Network(ctx context.Context, name string) (*Inet6Network, error)
- func (i *LDAPInventory) FetchInetNetwork(ctx context.Context, name string) (*InetNetwork, error)
- func (i *LDAPInventory) FetchL3Network(ctx context.Context, name string) (*L3Network, error)
- func (i *LDAPInventory) FetchNetworkHost(ctx context.Context, name string) (*NetworkHost, error)
- func (i *LDAPInventory) FetchNetworkID(ctx context.Context, name string) (*NetworkID, error)
- func (i *LDAPInventory) FetchZigbeeDevice(ctx context.Context, name string) (*ZigbeeDevice, error)
- func (i *LDAPInventory) ListIOTZones(ctx context.Context) ([]IOTZone, error)
- func (i *LDAPInventory) ListInet6Networks(ctx context.Context) ([]Inet6Network, error)
- func (i *LDAPInventory) ListInetNetworks(ctx context.Context) ([]InetNetwork, error)
- func (i *LDAPInventory) ListL3Networks(ctx context.Context) ([]L3Network, error)
- func (i *LDAPInventory) ListNetworkHosts(ctx context.Context) ([]NetworkHost, error)
- func (i *LDAPInventory) ListNetworkIDs(ctx context.Context) ([]NetworkID, error)
- func (i *LDAPInventory) ListZigbeeDevices(ctx context.Context) ([]ZigbeeDevice, error)
- func (i *LDAPInventory) SetAttribute(ctx context.Context, dn, attributeName, attributeValue string, replace bool) error
- func (i *LDAPInventory) Stop()
- func (i *LDAPInventory) UpdateIOTZone(ctx context.Context, x *IOTZone) (*IOTZone, error)
- func (i *LDAPInventory) UpdateInet6Network(ctx context.Context, x *Inet6Network) (*Inet6Network, error)
- func (i *LDAPInventory) UpdateInetNetwork(ctx context.Context, x *InetNetwork) (*InetNetwork, error)
- func (i *LDAPInventory) UpdateL3Network(ctx context.Context, x *L3Network) (*L3Network, error)
- func (i *LDAPInventory) UpdateNetworkHost(ctx context.Context, x *NetworkHost) (*NetworkHost, error)
- func (i *LDAPInventory) UpdateNetworkID(ctx context.Context, x *NetworkID) (*NetworkID, error)
- func (i *LDAPInventory) UpdateTimestamp(ctx context.Context, dn string, object string) error
- func (i *LDAPInventory) UpdateZigbeeDevice(ctx context.Context, x *ZigbeeDevice) (*ZigbeeDevice, error)
- type MockInventory
- func (i *MockInventory) CreateIOTZone(_ context.Context, x *IOTZone) (*IOTZone, error)
- func (i *MockInventory) CreateInet6Network(_ context.Context, x *Inet6Network) (*Inet6Network, error)
- func (i *MockInventory) CreateInetNetwork(_ context.Context, x *InetNetwork) (*InetNetwork, error)
- func (i *MockInventory) CreateL3Network(_ context.Context, x *L3Network) (*L3Network, error)
- func (i *MockInventory) CreateNetworkHost(_ context.Context, x *NetworkHost) (*NetworkHost, error)
- func (i *MockInventory) CreateNetworkID(_ context.Context, x *NetworkID) (*NetworkID, error)
- func (i *MockInventory) CreateZigbeeDevice(_ context.Context, x *ZigbeeDevice) (*ZigbeeDevice, error)
- func (i *MockInventory) FetchIOTZone(_ context.Context, name string) (*IOTZone, error)
- func (i *MockInventory) FetchInet6Network(_ context.Context, name string) (*Inet6Network, error)
- func (i *MockInventory) FetchInetNetwork(_ context.Context, name string) (*InetNetwork, error)
- func (i *MockInventory) FetchL3Network(_ context.Context, name string) (*L3Network, error)
- func (i *MockInventory) FetchNetworkHost(_ context.Context, name string) (*NetworkHost, error)
- func (i *MockInventory) FetchNetworkID(_ context.Context, name string) (*NetworkID, error)
- func (i *MockInventory) FetchZigbeeDevice(_ context.Context, name string) (*ZigbeeDevice, error)
- func (i *MockInventory) ListIOTZones(_ context.Context) ([]IOTZone, error)
- func (i *MockInventory) ListInet6Networks(_ context.Context) ([]Inet6Network, error)
- func (i *MockInventory) ListInetNetworks(_ context.Context) ([]InetNetwork, error)
- func (i *MockInventory) ListL3Networks(_ context.Context) ([]L3Network, error)
- func (i *MockInventory) ListNetworkHosts(_ context.Context) ([]NetworkHost, error)
- func (i *MockInventory) ListNetworkIDs(_ context.Context) ([]NetworkID, error)
- func (i *MockInventory) ListZigbeeDevices(_ context.Context) ([]ZigbeeDevice, error)
- func (i *MockInventory) UpdateIOTZone(_ context.Context, x *IOTZone) (*IOTZone, error)
- func (i *MockInventory) UpdateInet6Network(_ context.Context, x *Inet6Network) (*Inet6Network, error)
- func (i *MockInventory) UpdateInetNetwork(_ context.Context, x *InetNetwork) (*InetNetwork, error)
- func (i *MockInventory) UpdateL3Network(_ context.Context, x *L3Network) (*L3Network, error)
- func (i *MockInventory) UpdateNetworkHost(_ context.Context, x *NetworkHost) (*NetworkHost, error)
- func (i *MockInventory) UpdateNetworkID(_ context.Context, x *NetworkID) (*NetworkID, error)
- func (i *MockInventory) UpdateTimestamp(context.Context, string, string) error
- func (i *MockInventory) UpdateZigbeeDevice(_ context.Context, x *ZigbeeDevice) (*ZigbeeDevice, error)
- type NetworkHost
- func (*NetworkHost) Descriptor() ([]byte, []int)deprecated
- func (x *NetworkHost) GetDescription() string
- func (x *NetworkHost) GetDn() string
- func (x *NetworkHost) GetDomain() string
- func (x *NetworkHost) GetGroup() string
- func (x *NetworkHost) GetInet6Address() []string
- func (x *NetworkHost) GetInetAddress() []string
- func (x *NetworkHost) GetLastSeen() *timestamppb.Timestamp
- func (x *NetworkHost) GetMacAddress() []string
- func (x *NetworkHost) GetName() string
- func (x *NetworkHost) GetOperatingSystem() string
- func (x *NetworkHost) GetPlatform() string
- func (x *NetworkHost) GetRole() string
- func (x *NetworkHost) GetType() string
- func (x *NetworkHost) GetWatch() bool
- func (*NetworkHost) ProtoMessage()
- func (x *NetworkHost) ProtoReflect() protoreflect.Message
- func (x *NetworkHost) Reset()
- func (x *NetworkHost) String() string
- type NetworkID
- func (*NetworkID) Descriptor() ([]byte, []int)deprecated
- func (x *NetworkID) GetDn() string
- func (x *NetworkID) GetIpAddress() []string
- func (x *NetworkID) GetLastSeen() *timestamppb.Timestamp
- func (x *NetworkID) GetMacAddress() []string
- func (x *NetworkID) GetName() string
- func (x *NetworkID) GetReportingSource() []string
- func (x *NetworkID) GetReportingSourceInterface() []string
- func (*NetworkID) ProtoMessage()
- func (x *NetworkID) ProtoReflect() protoreflect.Message
- func (x *NetworkID) Reset()
- func (x *NetworkID) String() string
- type Server
- type UnimplementedInventoryServer
- func (UnimplementedInventoryServer) ListNetworkHosts(*Empty, Inventory_ListNetworkHostsServer) error
- func (UnimplementedInventoryServer) ListNetworkIDs(*Empty, Inventory_ListNetworkIDsServer) error
- func (UnimplementedInventoryServer) ListZigbeeDevices(*Empty, Inventory_ListZigbeeDevicesServer) error
- type UnsafeInventoryServer
- type ZigbeeDevice
- func (*ZigbeeDevice) Descriptor() ([]byte, []int)deprecated
- func (x *ZigbeeDevice) GetDateCode() string
- func (x *ZigbeeDevice) GetDescription() string
- func (x *ZigbeeDevice) GetDn() string
- func (x *ZigbeeDevice) GetIotZone() string
- func (x *ZigbeeDevice) GetLastSeen() *timestamppb.Timestamp
- func (x *ZigbeeDevice) GetManufacturerName() string
- func (x *ZigbeeDevice) GetModel() string
- func (x *ZigbeeDevice) GetModelId() string
- func (x *ZigbeeDevice) GetName() string
- func (x *ZigbeeDevice) GetPowerSource() string
- func (x *ZigbeeDevice) GetSoftwareBuildId() string
- func (x *ZigbeeDevice) GetType() string
- func (x *ZigbeeDevice) GetVendor() string
- func (*ZigbeeDevice) ProtoMessage()
- func (x *ZigbeeDevice) ProtoReflect() protoreflect.Message
- func (x *ZigbeeDevice) Reset()
- func (x *ZigbeeDevice) String() string
Constants ¶
This section is empty.
Variables ¶
var File_modules_inventory_inventory_proto protoreflect.FileDescriptor
var Inventory_ServiceDesc = grpc.ServiceDesc{ ServiceName: "inventory.Inventory", HandlerType: (*InventoryServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "ListNetworkHosts", Handler: _Inventory_ListNetworkHosts_Handler, ServerStreams: true, }, { StreamName: "ListNetworkIDs", Handler: _Inventory_ListNetworkIDs_Handler, ServerStreams: true, }, { StreamName: "ListZigbeeDevices", Handler: _Inventory_ListZigbeeDevices_Handler, ServerStreams: true, }, }, Metadata: "modules/inventory/inventory.proto", }
Inventory_ServiceDesc is the grpc.ServiceDesc for Inventory service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func NewLDAPClient ¶
NewLDAPClient constructs an LDAP client to return.
func PublicKeyFile ¶
func PublicKeyFile(file string) ssh.AuthMethod
PublicKeyFile builds the AuthMethod for SSH.
func RegisterInventoryServer ¶
func RegisterInventoryServer(s grpc.ServiceRegistrar, srv InventoryServer)
Types ¶
type Config ¶
type Config struct {
LDAP LDAPConfig `yaml:"ldap,omitempty"`
}
Config is the client configuration for LDAP.
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type IOTDevice ¶
type IOTDevice struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` DeviceDiscovery *iot.DeviceDiscovery `protobuf:"bytes,2,opt,name=device_discovery,json=deviceDiscovery,proto3" json:"device_discovery,omitempty"` NetworkId *NetworkID `protobuf:"bytes,3,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` // contains filtered or unexported fields }
func (*IOTDevice) Descriptor
deprecated
func (*IOTDevice) GetDeviceDiscovery ¶
func (x *IOTDevice) GetDeviceDiscovery() *iot.DeviceDiscovery
func (*IOTDevice) GetNetworkId ¶
func (*IOTDevice) ProtoMessage ¶
func (*IOTDevice) ProtoMessage()
func (*IOTDevice) ProtoReflect ¶
func (x *IOTDevice) ProtoReflect() protoreflect.Message
type IOTZone ¶
type IOTZone struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Dn string `protobuf:"bytes,3,opt,name=dn,proto3" json:"dn,omitempty"` // contains filtered or unexported fields }
func (*IOTZone) Descriptor
deprecated
func (*IOTZone) GetDescription ¶
func (*IOTZone) ProtoMessage ¶
func (*IOTZone) ProtoMessage()
func (*IOTZone) ProtoReflect ¶
func (x *IOTZone) ProtoReflect() protoreflect.Message
type Inet6Network ¶
type Inet6Network struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"` Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` Dn string `protobuf:"bytes,4,opt,name=dn,proto3" json:"dn,omitempty"` // contains filtered or unexported fields }
func (*Inet6Network) Descriptor
deprecated
func (*Inet6Network) Descriptor() ([]byte, []int)
Deprecated: Use Inet6Network.ProtoReflect.Descriptor instead.
func (*Inet6Network) GetDn ¶
func (x *Inet6Network) GetDn() string
func (*Inet6Network) GetGateway ¶
func (x *Inet6Network) GetGateway() string
func (*Inet6Network) GetName ¶
func (x *Inet6Network) GetName() string
func (*Inet6Network) GetPrefix ¶
func (x *Inet6Network) GetPrefix() string
func (*Inet6Network) ProtoMessage ¶
func (*Inet6Network) ProtoMessage()
func (*Inet6Network) ProtoReflect ¶
func (x *Inet6Network) ProtoReflect() protoreflect.Message
func (*Inet6Network) Reset ¶
func (x *Inet6Network) Reset()
func (*Inet6Network) String ¶
func (x *Inet6Network) String() string
type InetNetwork ¶
type InetNetwork struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"` Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` DynamicRange string `protobuf:"bytes,4,opt,name=dynamic_range,json=dynamicRange,proto3" json:"dynamic_range,omitempty"` Dn string `protobuf:"bytes,5,opt,name=dn,proto3" json:"dn,omitempty"` // contains filtered or unexported fields }
func (*InetNetwork) Descriptor
deprecated
func (*InetNetwork) Descriptor() ([]byte, []int)
Deprecated: Use InetNetwork.ProtoReflect.Descriptor instead.
func (*InetNetwork) GetDn ¶
func (x *InetNetwork) GetDn() string
func (*InetNetwork) GetDynamicRange ¶
func (x *InetNetwork) GetDynamicRange() string
func (*InetNetwork) GetGateway ¶
func (x *InetNetwork) GetGateway() string
func (*InetNetwork) GetName ¶
func (x *InetNetwork) GetName() string
func (*InetNetwork) GetPrefix ¶
func (x *InetNetwork) GetPrefix() string
func (*InetNetwork) ProtoMessage ¶
func (*InetNetwork) ProtoMessage()
func (*InetNetwork) ProtoReflect ¶
func (x *InetNetwork) ProtoReflect() protoreflect.Message
func (*InetNetwork) Reset ¶
func (x *InetNetwork) Reset()
func (*InetNetwork) String ¶
func (x *InetNetwork) String() string
type Inventory ¶
type Inventory interface { UpdateTimestamp(context.Context, string, string) error CreateNetworkHost(context.Context, *NetworkHost) (*NetworkHost, error) FetchNetworkHost(context.Context, string) (*NetworkHost, error) ListNetworkHosts(context.Context) ([]NetworkHost, error) UpdateNetworkHost(context.Context, *NetworkHost) (*NetworkHost, error) CreateNetworkID(context.Context, *NetworkID) (*NetworkID, error) FetchNetworkID(context.Context, string) (*NetworkID, error) ListNetworkIDs(context.Context) ([]NetworkID, error) UpdateNetworkID(context.Context, *NetworkID) (*NetworkID, error) CreateL3Network(context.Context, *L3Network) (*L3Network, error) FetchL3Network(context.Context, string) (*L3Network, error) ListL3Networks(context.Context) ([]L3Network, error) UpdateL3Network(context.Context, *L3Network) (*L3Network, error) CreateInetNetwork(context.Context, *InetNetwork) (*InetNetwork, error) FetchInetNetwork(context.Context, string) (*InetNetwork, error) ListInetNetworks(context.Context) ([]InetNetwork, error) UpdateInetNetwork(context.Context, *InetNetwork) (*InetNetwork, error) CreateInet6Network(context.Context, *Inet6Network) (*Inet6Network, error) FetchInet6Network(context.Context, string) (*Inet6Network, error) ListInet6Networks(context.Context) ([]Inet6Network, error) UpdateInet6Network(context.Context, *Inet6Network) (*Inet6Network, error) CreateZigbeeDevice(context.Context, *ZigbeeDevice) (*ZigbeeDevice, error) FetchZigbeeDevice(context.Context, string) (*ZigbeeDevice, error) ListZigbeeDevices(context.Context) ([]ZigbeeDevice, error) UpdateZigbeeDevice(context.Context, *ZigbeeDevice) (*ZigbeeDevice, error) CreateIOTZone(context.Context, *IOTZone) (*IOTZone, error) FetchIOTZone(context.Context, string) (*IOTZone, error) ListIOTZones(context.Context) ([]IOTZone, error) UpdateIOTZone(context.Context, *IOTZone) (*IOTZone, error) }
Inventory is the interface to implement for CRUD against a data store of network devices.
type InventoryClient ¶
type InventoryClient interface { ListNetworkHosts(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Inventory_ListNetworkHostsClient, error) ListNetworkIDs(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Inventory_ListNetworkIDsClient, error) ListZigbeeDevices(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Inventory_ListZigbeeDevicesClient, error) }
InventoryClient is the client API for Inventory service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewInventoryClient ¶
func NewInventoryClient(cc grpc.ClientConnInterface) InventoryClient
type InventoryInteractive ¶
type InventoryInteractive struct {
Inventory Inventory
}
func (*InventoryInteractive) Completer ¶
func (i *InventoryInteractive) Completer(d prompt.Document) []prompt.Suggest
func (*InventoryInteractive) Executor ¶
func (i *InventoryInteractive) Executor(in string)
type InventoryServer ¶
type InventoryServer interface { ListNetworkHosts(*Empty, Inventory_ListNetworkHostsServer) error ListNetworkIDs(*Empty, Inventory_ListNetworkIDsServer) error ListZigbeeDevices(*Empty, Inventory_ListZigbeeDevicesServer) error // contains filtered or unexported methods }
InventoryServer is the server API for Inventory service. All implementations must embed UnimplementedInventoryServer for forward compatibility
type Inventory_ListNetworkHostsClient ¶
type Inventory_ListNetworkHostsClient interface { Recv() (*NetworkHost, error) grpc.ClientStream }
type Inventory_ListNetworkHostsServer ¶
type Inventory_ListNetworkHostsServer interface { Send(*NetworkHost) error grpc.ServerStream }
type Inventory_ListNetworkIDsClient ¶
type Inventory_ListNetworkIDsClient interface { Recv() (*NetworkID, error) grpc.ClientStream }
type Inventory_ListNetworkIDsServer ¶
type Inventory_ListNetworkIDsServer interface { Send(*NetworkID) error grpc.ServerStream }
type Inventory_ListZigbeeDevicesClient ¶
type Inventory_ListZigbeeDevicesClient interface { Recv() (*ZigbeeDevice, error) grpc.ClientStream }
type Inventory_ListZigbeeDevicesServer ¶
type Inventory_ListZigbeeDevicesServer interface { Send(*ZigbeeDevice) error grpc.ServerStream }
type L3Network ¶
type L3Network struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Soa string `protobuf:"bytes,2,opt,name=soa,proto3" json:"soa,omitempty"` Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain,omitempty"` NtpServers []string `protobuf:"bytes,4,rep,name=ntp_servers,json=ntpServers,proto3" json:"ntp_servers,omitempty"` InetNetwork []*InetNetwork `protobuf:"bytes,5,rep,name=inet_network,json=inetNetwork,proto3" json:"inet_network,omitempty"` Inet6Network []*Inet6Network `protobuf:"bytes,6,rep,name=inet6_network,json=inet6Network,proto3" json:"inet6_network,omitempty"` Dn string `protobuf:"bytes,7,opt,name=dn,proto3" json:"dn,omitempty"` Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
func (*L3Network) Descriptor
deprecated
func (*L3Network) GetDescription ¶
func (*L3Network) GetInet6Network ¶
func (x *L3Network) GetInet6Network() []*Inet6Network
func (*L3Network) GetInetNetwork ¶
func (x *L3Network) GetInetNetwork() []*InetNetwork
func (*L3Network) GetNtpServers ¶
func (*L3Network) ProtoMessage ¶
func (*L3Network) ProtoMessage()
func (*L3Network) ProtoReflect ¶
func (x *L3Network) ProtoReflect() protoreflect.Message
type LDAPConfig ¶
type LDAPInventory ¶
type LDAPInventory struct {
// contains filtered or unexported fields
}
LDAPInventory holds the coniguration and clients necessary to retrieve information from data sources.
func NewLDAPInventory ¶
func NewLDAPInventory(cfg Config, logger log.Logger) (*LDAPInventory, error)
NewLDAPInventory returns a new Inventory object from the received config.
func (*LDAPInventory) CreateIOTZone ¶
CreateIOTZone creates a new LDAP entry by the received name.
func (*LDAPInventory) CreateInet6Network ¶
func (i *LDAPInventory) CreateInet6Network(ctx context.Context, x *Inet6Network) (*Inet6Network, error)
CreateInet6Network creates a new LDAP entry by the received name.
func (*LDAPInventory) CreateInetNetwork ¶
func (i *LDAPInventory) CreateInetNetwork(ctx context.Context, x *InetNetwork) (*InetNetwork, error)
CreateInetNetwork creates a new LDAP entry by the received name.
func (*LDAPInventory) CreateL3Network ¶
CreateL3Network creates a new LDAP entry by the received name.
func (*LDAPInventory) CreateNetworkHost ¶
func (i *LDAPInventory) CreateNetworkHost(ctx context.Context, x *NetworkHost) (*NetworkHost, error)
CreateNetworkHost creates a new LDAP entry by the received name.
func (*LDAPInventory) CreateNetworkID ¶
CreateNetworkID creates a new LDAP entry by the received name.
func (*LDAPInventory) CreateZigbeeDevice ¶
func (i *LDAPInventory) CreateZigbeeDevice(ctx context.Context, x *ZigbeeDevice) (*ZigbeeDevice, error)
CreateZigbeeDevice creates a new LDAP entry by the received name.
func (*LDAPInventory) FetchIOTZone ¶
FetchIOTZone will retrieve a IOTZone by name.
func (*LDAPInventory) FetchInet6Network ¶
func (i *LDAPInventory) FetchInet6Network(ctx context.Context, name string) (*Inet6Network, error)
FetchInet6Network will retrieve a Inet6Network by name.
func (*LDAPInventory) FetchInetNetwork ¶
func (i *LDAPInventory) FetchInetNetwork(ctx context.Context, name string) (*InetNetwork, error)
FetchInetNetwork will retrieve a InetNetwork by name.
func (*LDAPInventory) FetchL3Network ¶
FetchL3Network will retrieve a L3Network by name.
func (*LDAPInventory) FetchNetworkHost ¶
func (i *LDAPInventory) FetchNetworkHost(ctx context.Context, name string) (*NetworkHost, error)
FetchNetworkHost will retrieve a NetworkHost by name.
func (*LDAPInventory) FetchNetworkID ¶
FetchNetworkID will retrieve a NetworkID by name.
func (*LDAPInventory) FetchZigbeeDevice ¶
func (i *LDAPInventory) FetchZigbeeDevice(ctx context.Context, name string) (*ZigbeeDevice, error)
FetchZigbeeDevice will retrieve a ZigbeeDevice by name.
func (*LDAPInventory) ListIOTZones ¶
func (i *LDAPInventory) ListIOTZones(ctx context.Context) ([]IOTZone, error)
ListIOTZones retrieves all existing LDAP entries. nolint:gocyclo
func (*LDAPInventory) ListInet6Networks ¶
func (i *LDAPInventory) ListInet6Networks(ctx context.Context) ([]Inet6Network, error)
ListInet6Networks retrieves all existing LDAP entries. nolint:gocyclo
func (*LDAPInventory) ListInetNetworks ¶
func (i *LDAPInventory) ListInetNetworks(ctx context.Context) ([]InetNetwork, error)
ListInetNetworks retrieves all existing LDAP entries. nolint:gocyclo
func (*LDAPInventory) ListL3Networks ¶
func (i *LDAPInventory) ListL3Networks(ctx context.Context) ([]L3Network, error)
ListL3Networks retrieves all existing LDAP entries. nolint:gocyclo
func (*LDAPInventory) ListNetworkHosts ¶
func (i *LDAPInventory) ListNetworkHosts(ctx context.Context) ([]NetworkHost, error)
ListNetworkHosts retrieves all existing LDAP entries. nolint:gocyclo
func (*LDAPInventory) ListNetworkIDs ¶
func (i *LDAPInventory) ListNetworkIDs(ctx context.Context) ([]NetworkID, error)
ListNetworkIDs retrieves all existing LDAP entries. nolint:gocyclo
func (*LDAPInventory) ListZigbeeDevices ¶
func (i *LDAPInventory) ListZigbeeDevices(ctx context.Context) ([]ZigbeeDevice, error)
ListZigbeeDevices retrieves all existing LDAP entries. nolint:gocyclo
func (*LDAPInventory) SetAttribute ¶
func (*LDAPInventory) Stop ¶
func (i *LDAPInventory) Stop()
func (*LDAPInventory) UpdateIOTZone ¶
UpdateIOTZone updates an existing LDAP entry, retrieved by name.
func (*LDAPInventory) UpdateInet6Network ¶
func (i *LDAPInventory) UpdateInet6Network(ctx context.Context, x *Inet6Network) (*Inet6Network, error)
UpdateInet6Network updates an existing LDAP entry, retrieved by name.
func (*LDAPInventory) UpdateInetNetwork ¶
func (i *LDAPInventory) UpdateInetNetwork(ctx context.Context, x *InetNetwork) (*InetNetwork, error)
UpdateInetNetwork updates an existing LDAP entry, retrieved by name.
func (*LDAPInventory) UpdateL3Network ¶
UpdateL3Network updates an existing LDAP entry, retrieved by name.
func (*LDAPInventory) UpdateNetworkHost ¶
func (i *LDAPInventory) UpdateNetworkHost(ctx context.Context, x *NetworkHost) (*NetworkHost, error)
UpdateNetworkHost updates an existing LDAP entry, retrieved by name.
func (*LDAPInventory) UpdateNetworkID ¶
UpdateNetworkID updates an existing LDAP entry, retrieved by name.
func (*LDAPInventory) UpdateTimestamp ¶
func (*LDAPInventory) UpdateZigbeeDevice ¶
func (i *LDAPInventory) UpdateZigbeeDevice(ctx context.Context, x *ZigbeeDevice) (*ZigbeeDevice, error)
UpdateZigbeeDevice updates an existing LDAP entry, retrieved by name.
type MockInventory ¶
type MockInventory struct { FetchNetworkHostCalls map[string]int FetchNetworkHostResponse *NetworkHost FetchNetworkHostErr error ListNetworkHostResponse []NetworkHost ListNetworkHostErr error CreateNetworkHostCalls map[string]int UpdateNetworkHostCalls map[string]int UpdateNetworkHostResponse *NetworkHost UpdateNetworkHostErr error FetchNetworkIDCalls map[string]int FetchNetworkIDResponse *NetworkID FetchNetworkIDErr error ListNetworkIDResponse []NetworkID ListNetworkIDErr error CreateNetworkIDCalls map[string]int UpdateNetworkIDCalls map[string]int UpdateNetworkIDResponse *NetworkID UpdateNetworkIDErr error FetchL3NetworkCalls map[string]int FetchL3NetworkResponse *L3Network FetchL3NetworkErr error ListL3NetworkResponse []L3Network ListL3NetworkErr error CreateL3NetworkCalls map[string]int UpdateL3NetworkCalls map[string]int UpdateL3NetworkResponse *L3Network UpdateL3NetworkErr error FetchInetNetworkCalls map[string]int FetchInetNetworkResponse *InetNetwork FetchInetNetworkErr error ListInetNetworkResponse []InetNetwork ListInetNetworkErr error CreateInetNetworkCalls map[string]int UpdateInetNetworkCalls map[string]int UpdateInetNetworkResponse *InetNetwork UpdateInetNetworkErr error FetchInet6NetworkCalls map[string]int FetchInet6NetworkResponse *Inet6Network FetchInet6NetworkErr error ListInet6NetworkResponse []Inet6Network ListInet6NetworkErr error CreateInet6NetworkCalls map[string]int UpdateInet6NetworkCalls map[string]int UpdateInet6NetworkResponse *Inet6Network UpdateInet6NetworkErr error FetchZigbeeDeviceCalls map[string]int FetchZigbeeDeviceResponse *ZigbeeDevice FetchZigbeeDeviceErr error ListZigbeeDeviceResponse []ZigbeeDevice ListZigbeeDeviceErr error CreateZigbeeDeviceCalls map[string]int UpdateZigbeeDeviceCalls map[string]int UpdateZigbeeDeviceResponse *ZigbeeDevice UpdateZigbeeDeviceErr error FetchIOTZoneCalls map[string]int FetchIOTZoneResponse *IOTZone FetchIOTZoneErr error ListIOTZoneResponse []IOTZone ListIOTZoneErr error CreateIOTZoneCalls map[string]int UpdateIOTZoneCalls map[string]int UpdateIOTZoneResponse *IOTZone UpdateIOTZoneErr error }
func (*MockInventory) CreateIOTZone ¶
func (*MockInventory) CreateInet6Network ¶
func (i *MockInventory) CreateInet6Network(_ context.Context, x *Inet6Network) (*Inet6Network, error)
func (*MockInventory) CreateInetNetwork ¶
func (i *MockInventory) CreateInetNetwork(_ context.Context, x *InetNetwork) (*InetNetwork, error)
func (*MockInventory) CreateL3Network ¶
func (*MockInventory) CreateNetworkHost ¶
func (i *MockInventory) CreateNetworkHost(_ context.Context, x *NetworkHost) (*NetworkHost, error)
func (*MockInventory) CreateNetworkID ¶
func (*MockInventory) CreateZigbeeDevice ¶
func (i *MockInventory) CreateZigbeeDevice(_ context.Context, x *ZigbeeDevice) (*ZigbeeDevice, error)
func (*MockInventory) FetchIOTZone ¶
func (*MockInventory) FetchInet6Network ¶
func (i *MockInventory) FetchInet6Network(_ context.Context, name string) (*Inet6Network, error)
func (*MockInventory) FetchInetNetwork ¶
func (i *MockInventory) FetchInetNetwork(_ context.Context, name string) (*InetNetwork, error)
func (*MockInventory) FetchL3Network ¶
func (*MockInventory) FetchNetworkHost ¶
func (i *MockInventory) FetchNetworkHost(_ context.Context, name string) (*NetworkHost, error)
func (*MockInventory) FetchNetworkID ¶
func (*MockInventory) FetchZigbeeDevice ¶
func (i *MockInventory) FetchZigbeeDevice(_ context.Context, name string) (*ZigbeeDevice, error)
func (*MockInventory) ListIOTZones ¶
func (i *MockInventory) ListIOTZones(_ context.Context) ([]IOTZone, error)
func (*MockInventory) ListInet6Networks ¶
func (i *MockInventory) ListInet6Networks(_ context.Context) ([]Inet6Network, error)
func (*MockInventory) ListInetNetworks ¶
func (i *MockInventory) ListInetNetworks(_ context.Context) ([]InetNetwork, error)
func (*MockInventory) ListL3Networks ¶
func (i *MockInventory) ListL3Networks(_ context.Context) ([]L3Network, error)
func (*MockInventory) ListNetworkHosts ¶
func (i *MockInventory) ListNetworkHosts(_ context.Context) ([]NetworkHost, error)
func (*MockInventory) ListNetworkIDs ¶
func (i *MockInventory) ListNetworkIDs(_ context.Context) ([]NetworkID, error)
func (*MockInventory) ListZigbeeDevices ¶
func (i *MockInventory) ListZigbeeDevices(_ context.Context) ([]ZigbeeDevice, error)
func (*MockInventory) UpdateIOTZone ¶
func (*MockInventory) UpdateInet6Network ¶
func (i *MockInventory) UpdateInet6Network(_ context.Context, x *Inet6Network) (*Inet6Network, error)
func (*MockInventory) UpdateInetNetwork ¶
func (i *MockInventory) UpdateInetNetwork(_ context.Context, x *InetNetwork) (*InetNetwork, error)
func (*MockInventory) UpdateL3Network ¶
func (*MockInventory) UpdateNetworkHost ¶
func (i *MockInventory) UpdateNetworkHost(_ context.Context, x *NetworkHost) (*NetworkHost, error)
func (*MockInventory) UpdateNetworkID ¶
func (*MockInventory) UpdateTimestamp ¶
func (*MockInventory) UpdateZigbeeDevice ¶
func (i *MockInventory) UpdateZigbeeDevice(_ context.Context, x *ZigbeeDevice) (*ZigbeeDevice, error)
type NetworkHost ¶
type NetworkHost struct { Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` Group string `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` OperatingSystem string `protobuf:"bytes,4,opt,name=operating_system,json=operatingSystem,proto3" json:"operating_system,omitempty"` Platform string `protobuf:"bytes,5,opt,name=platform,proto3" json:"platform,omitempty"` Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` Domain string `protobuf:"bytes,7,opt,name=domain,proto3" json:"domain,omitempty"` Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` Watch bool `protobuf:"varint,9,opt,name=watch,proto3" json:"watch,omitempty"` InetAddress []string `protobuf:"bytes,10,rep,name=inet_address,json=inetAddress,proto3" json:"inet_address,omitempty"` Inet6Address []string `protobuf:"bytes,11,rep,name=inet6_address,json=inet6Address,proto3" json:"inet6_address,omitempty"` MacAddress []string `protobuf:"bytes,12,rep,name=mac_address,json=macAddress,proto3" json:"mac_address,omitempty"` LastSeen *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"` Dn string `protobuf:"bytes,14,opt,name=dn,proto3" json:"dn,omitempty"` // contains filtered or unexported fields }
NetworkHost is the information about any host that is attached to the network.
func (*NetworkHost) Descriptor
deprecated
func (*NetworkHost) Descriptor() ([]byte, []int)
Deprecated: Use NetworkHost.ProtoReflect.Descriptor instead.
func (*NetworkHost) GetDescription ¶
func (x *NetworkHost) GetDescription() string
func (*NetworkHost) GetDn ¶
func (x *NetworkHost) GetDn() string
func (*NetworkHost) GetDomain ¶
func (x *NetworkHost) GetDomain() string
func (*NetworkHost) GetGroup ¶
func (x *NetworkHost) GetGroup() string
func (*NetworkHost) GetInet6Address ¶
func (x *NetworkHost) GetInet6Address() []string
func (*NetworkHost) GetInetAddress ¶
func (x *NetworkHost) GetInetAddress() []string
func (*NetworkHost) GetLastSeen ¶
func (x *NetworkHost) GetLastSeen() *timestamppb.Timestamp
func (*NetworkHost) GetMacAddress ¶
func (x *NetworkHost) GetMacAddress() []string
func (*NetworkHost) GetName ¶
func (x *NetworkHost) GetName() string
func (*NetworkHost) GetOperatingSystem ¶
func (x *NetworkHost) GetOperatingSystem() string
func (*NetworkHost) GetPlatform ¶
func (x *NetworkHost) GetPlatform() string
func (*NetworkHost) GetRole ¶
func (x *NetworkHost) GetRole() string
func (*NetworkHost) GetType ¶
func (x *NetworkHost) GetType() string
func (*NetworkHost) GetWatch ¶
func (x *NetworkHost) GetWatch() bool
func (*NetworkHost) ProtoMessage ¶
func (*NetworkHost) ProtoMessage()
func (*NetworkHost) ProtoReflect ¶
func (x *NetworkHost) ProtoReflect() protoreflect.Message
func (*NetworkHost) Reset ¶
func (x *NetworkHost) Reset()
func (*NetworkHost) String ¶
func (x *NetworkHost) String() string
type NetworkID ¶
type NetworkID struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` MacAddress []string `protobuf:"bytes,2,rep,name=mac_address,json=macAddress,proto3" json:"mac_address,omitempty"` IpAddress []string `protobuf:"bytes,3,rep,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"` ReportingSource []string `protobuf:"bytes,4,rep,name=reporting_source,json=reportingSource,proto3" json:"reporting_source,omitempty"` ReportingSourceInterface []string `` /* 135-byte string literal not displayed */ LastSeen *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"` Dn string `protobuf:"bytes,7,opt,name=dn,proto3" json:"dn,omitempty"` // contains filtered or unexported fields }
func (*NetworkID) Descriptor
deprecated
func (*NetworkID) GetIpAddress ¶
func (*NetworkID) GetLastSeen ¶
func (x *NetworkID) GetLastSeen() *timestamppb.Timestamp
func (*NetworkID) GetMacAddress ¶
func (*NetworkID) GetReportingSource ¶
func (*NetworkID) GetReportingSourceInterface ¶
func (*NetworkID) ProtoMessage ¶
func (*NetworkID) ProtoMessage()
func (*NetworkID) ProtoReflect ¶
func (x *NetworkID) ProtoReflect() protoreflect.Message
type Server ¶
type Server struct { UnimplementedInventoryServer services.Service // contains filtered or unexported fields }
Server
func NewLDAPServer ¶
NewServer is used to return a new Server, which implements the inventory RPC server.
func (*Server) ListNetworkHosts ¶
func (e *Server) ListNetworkHosts(req *Empty, stream Inventory_ListNetworkHostsServer) error
.File.Service Inventory
func (*Server) ListNetworkIDs ¶
func (e *Server) ListNetworkIDs(req *Empty, stream Inventory_ListNetworkIDsServer) error
func (*Server) ListZigbeeDevices ¶
func (e *Server) ListZigbeeDevices(req *Empty, stream Inventory_ListZigbeeDevicesServer) error
type UnimplementedInventoryServer ¶
type UnimplementedInventoryServer struct { }
UnimplementedInventoryServer must be embedded to have forward compatible implementations.
func (UnimplementedInventoryServer) ListNetworkHosts ¶
func (UnimplementedInventoryServer) ListNetworkHosts(*Empty, Inventory_ListNetworkHostsServer) error
func (UnimplementedInventoryServer) ListNetworkIDs ¶
func (UnimplementedInventoryServer) ListNetworkIDs(*Empty, Inventory_ListNetworkIDsServer) error
func (UnimplementedInventoryServer) ListZigbeeDevices ¶
func (UnimplementedInventoryServer) ListZigbeeDevices(*Empty, Inventory_ListZigbeeDevicesServer) error
type UnsafeInventoryServer ¶
type UnsafeInventoryServer interface {
// contains filtered or unexported methods
}
UnsafeInventoryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InventoryServer will result in compilation errors.
type ZigbeeDevice ¶
type ZigbeeDevice struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Dn string `protobuf:"bytes,3,opt,name=dn,proto3" json:"dn,omitempty"` LastSeen *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"` IotZone string `protobuf:"bytes,5,opt,name=iot_zone,json=iotZone,proto3" json:"iot_zone,omitempty"` Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` SoftwareBuildId string `protobuf:"bytes,7,opt,name=software_build_id,json=softwareBuildId,proto3" json:"software_build_id,omitempty"` DateCode string `protobuf:"bytes,8,opt,name=date_code,json=dateCode,proto3" json:"date_code,omitempty"` Model string `protobuf:"bytes,9,opt,name=model,proto3" json:"model,omitempty"` Vendor string `protobuf:"bytes,10,opt,name=vendor,proto3" json:"vendor,omitempty"` ManufacturerName string `protobuf:"bytes,11,opt,name=manufacturer_name,json=manufacturerName,proto3" json:"manufacturer_name,omitempty"` // Remove in favor vendor PowerSource string `protobuf:"bytes,12,opt,name=power_source,json=powerSource,proto3" json:"power_source,omitempty"` ModelId string `protobuf:"bytes,13,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"` // contains filtered or unexported fields }
func (*ZigbeeDevice) Descriptor
deprecated
func (*ZigbeeDevice) Descriptor() ([]byte, []int)
Deprecated: Use ZigbeeDevice.ProtoReflect.Descriptor instead.
func (*ZigbeeDevice) GetDateCode ¶
func (x *ZigbeeDevice) GetDateCode() string
func (*ZigbeeDevice) GetDescription ¶
func (x *ZigbeeDevice) GetDescription() string
func (*ZigbeeDevice) GetDn ¶
func (x *ZigbeeDevice) GetDn() string
func (*ZigbeeDevice) GetIotZone ¶
func (x *ZigbeeDevice) GetIotZone() string
func (*ZigbeeDevice) GetLastSeen ¶
func (x *ZigbeeDevice) GetLastSeen() *timestamppb.Timestamp
func (*ZigbeeDevice) GetManufacturerName ¶
func (x *ZigbeeDevice) GetManufacturerName() string
func (*ZigbeeDevice) GetModel ¶
func (x *ZigbeeDevice) GetModel() string
func (*ZigbeeDevice) GetModelId ¶
func (x *ZigbeeDevice) GetModelId() string
func (*ZigbeeDevice) GetName ¶
func (x *ZigbeeDevice) GetName() string
func (*ZigbeeDevice) GetPowerSource ¶
func (x *ZigbeeDevice) GetPowerSource() string
func (*ZigbeeDevice) GetSoftwareBuildId ¶
func (x *ZigbeeDevice) GetSoftwareBuildId() string
func (*ZigbeeDevice) GetType ¶
func (x *ZigbeeDevice) GetType() string
func (*ZigbeeDevice) GetVendor ¶
func (x *ZigbeeDevice) GetVendor() string
func (*ZigbeeDevice) ProtoMessage ¶
func (*ZigbeeDevice) ProtoMessage()
func (*ZigbeeDevice) ProtoReflect ¶
func (x *ZigbeeDevice) ProtoReflect() protoreflect.Message
func (*ZigbeeDevice) Reset ¶
func (x *ZigbeeDevice) Reset()
func (*ZigbeeDevice) String ¶
func (x *ZigbeeDevice) String() string