Documentation ¶
Index ¶
- Constants
- type GraphStorage
- type Host
- type Link
- type LinkType
- type NeoGraphStorage
- func (s *NeoGraphStorage) GetAllLinksFrom(from_id int64, n_take int32) ([]Link, error)
- func (s *NeoGraphStorage) GetAllNodesFrom(from_id int64, n_take int32) ([]Host, error)
- func (s *NeoGraphStorage) GetLinkById(id int64) (Link, error)
- func (s *NeoGraphStorage) GetLinksCount() (int32, error)
- func (s *NeoGraphStorage) GetNodeById(id int64) (Host, error)
- func (s *NeoGraphStorage) GetNodesCount() (int32, error)
- type NodeType
Constants ¶
View Source
const ( CYPHER_NODE_BY_ID = "MATCH (n:NetAssistNode) WHERE Id(n)={0} RETURN n" CYPHER_NODE_FROM_ID = "MATCH (n:NetAssistNode) WHERE Id(n) > {0} RETURN Id(n), n ORDER BY Id(n) LIMIT {1}" CYPHER_NODES_COUNT = "MATCH (n:NetAssistNode) RETURN count(n)" CYPHER_LINK_BY_ID = "MATCH (n:NetAssistNode)-[r:LINKS_TO]->(c:NetAssistNode) WHERE Id(r)={0} RETURN r" CYPHER_LINKS_FROM_ID = "MATCH (n:NetAssistNode)-[r:LINKS_TO]->(c:NetAssistNode) WHERE Id(r) > {0} RETURN Id(r), Id(n), Id(c), r LIMIT {1}" CYPHER_LINKS_COUNT = "MATCH (n:NetAssistNode)-[r:LINKS_TO]->(c:NetAssistNode) RETURN count(r)" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GraphStorage ¶
type Host ¶
type Host struct { Id int64 DBImportSwitchId int32 Name string IcingaName string IP net.IP IP6 net.IP MACAddress string Address string Comment string Model string Serial string NumPorts uint16 Type NodeType }
Host
type Link ¶
type Link struct { Id int64 SrcImportId int32 DstImportId int32 SrcPort uint16 DstPort uint16 SrcNodeId int64 DstNodeId int64 CapacityMbit int64 Quality int32 Type LinkType Comment string RXOctetsMetric string TXOctetsMetric string }
Link
type NeoGraphStorage ¶
type NeoGraphStorage struct {
// contains filtered or unexported fields
}
func NewNeoGraphStorage ¶
func NewNeoGraphStorage(url string) *NeoGraphStorage
func (*NeoGraphStorage) GetAllLinksFrom ¶
func (s *NeoGraphStorage) GetAllLinksFrom(from_id int64, n_take int32) ([]Link, error)
func (*NeoGraphStorage) GetAllNodesFrom ¶
func (s *NeoGraphStorage) GetAllNodesFrom(from_id int64, n_take int32) ([]Host, error)
func (*NeoGraphStorage) GetLinkById ¶
func (s *NeoGraphStorage) GetLinkById(id int64) (Link, error)
func (*NeoGraphStorage) GetLinksCount ¶
func (s *NeoGraphStorage) GetLinksCount() (int32, error)
func (*NeoGraphStorage) GetNodeById ¶
func (s *NeoGraphStorage) GetNodeById(id int64) (Host, error)
func (*NeoGraphStorage) GetNodesCount ¶
func (s *NeoGraphStorage) GetNodesCount() (int32, error)
Click to show internal directories.
Click to hide internal directories.