graphmanager

package
v1.0.4-0...-d8282c0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2025 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

* Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved. * PilotGo-plugin-topology licensed under the Mulan Permissive Software License, Version 2. * See LICENSE file for more details. * Author: Wangjunqi123 <wangjunqi@kylinos.cn> * Date: Mon Nov 4 14:30:13 2024 +0800

* Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved. * PilotGo-plugin-topology licensed under the Mulan Permissive Software License, Version 2. * See LICENSE file for more details. * Author: Wangjunqi123 <wangjunqi@kylinos.cn> * Date: Mon Nov 4 14:30:13 2024 +0800

* Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved. * PilotGo-plugin-topology licensed under the Mulan Permissive Software License, Version 2. * See LICENSE file for more details. * Author: Wangjunqi123 <wangjunqi@kylinos.cn> * Date: Mon Nov 4 14:30:13 2024 +0800

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Neo4jnodeToToponode

func Neo4jnodeToToponode(neo4jnode neo4j.Node) *graph.Node

neo4jnode to toponode

func Neo4jrelaToToporela

func Neo4jrelaToToporela(neo4jrela neo4j.Relationship) *graph.Edge

Types

type GraphdbIface

type GraphdbIface interface {
	ClearExpiredData(int64)

	Node_create(string, *graph.Node) error
	Edge_create(string, *graph.Edge) error

	Timestamps_query() ([]string, error)

	Node_query(string, string) ([]*graph.Node, error)
	SingleHost_node_query(string, string) ([]*graph.Node, error)
	MultiHost_node_query(string) ([]*graph.Node, error)

	Relation_query(string, string) ([]*graph.Edge, error)
	MultiHost_relation_query(string) ([]*graph.Edge, error)
}
var Global_GraphDB GraphdbIface

type Neo4jClient

type Neo4jClient struct {
	DB     string
	Driver neo4j.Driver
	// contains filtered or unexported fields
}
var Global_Neo4j *Neo4jClient

func Neo4jInit

func Neo4jInit(url, user, pass, db string) *Neo4jClient

func (*Neo4jClient) ClearExpiredData

func (n *Neo4jClient) ClearExpiredData(retention int64)

func (*Neo4jClient) Edge_create

func (n *Neo4jClient) Edge_create(unixtime string, edge *graph.Edge) error

func (*Neo4jClient) MultiHost_node_query

func (n *Neo4jClient) MultiHost_node_query(unixtime string) ([]*graph.Node, error)

func (*Neo4jClient) MultiHost_relation_query

func (n *Neo4jClient) MultiHost_relation_query(unixtime string) ([]*graph.Edge, error)

func (*Neo4jClient) Node_create

func (n *Neo4jClient) Node_create(unixtime string, node *graph.Node) error

func (*Neo4jClient) Node_query

func (n *Neo4jClient) Node_query(cypher string, varia string) ([]*graph.Node, error)

func (*Neo4jClient) Relation_query

func (n *Neo4jClient) Relation_query(cypher string, varia string) ([]*graph.Edge, error)

func (*Neo4jClient) SingleHost_node_query

func (n *Neo4jClient) SingleHost_node_query(uuid string, unixtime string) ([]*graph.Node, error)

func (*Neo4jClient) Timestamps_query

func (n *Neo4jClient) Timestamps_query() ([]string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL