graphstore

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultGraphStore

func DefaultGraphStore(uri, username, password string) (abstraction.GraphStore, error)

DefaultGraphStore 创建默认的图存储(使用 Neo4j) uri: Neo4j 连接 URI,例如 "bolt://localhost:7687" username: 用户名 password: 密码

func NewNeo4JStore

func NewNeo4JStore(uri, username, password string) (abstraction.GraphStore, error)

NewNeo4JStore 创建 Neo4j 图存储 uri: Neo4j 连接 URI,例如 "bolt://localhost:7687" username: 用户名 password: 密码

func NewStore

func NewStore(storeType StoreType, config map[string]interface{}) (abstraction.GraphStore, error)

NewStore 根据类型创建图存储(工厂方法) storeType: 存储类型 config: 配置参数

Types

type GraphStore

type GraphStore interface {
	abstraction.GraphStore

	// Initialize 初始化存储
	Initialize(options map[string]interface{}) error
}

GraphStore 图存储实现接口

func NewGraphStore

func NewGraphStore(storeType StoreType) (GraphStore, error)

NewGraphStore 创建新的图存储实例

func NewGraphStoreFromConfig

func NewGraphStoreFromConfig(config map[string]interface{}) (GraphStore, error)

NewGraphStoreFromConfig 根据配置创建图存储实例

type StoreType

type StoreType string

StoreType 图存储类型

const (
	// StoreTypeNeo4j Neo4J 图存储
	StoreTypeNeo4j StoreType = "neo4j"
	// StoreTypeNebulaGraph NebulaGraph 图存储
	StoreTypeNebulaGraph StoreType = "nebulagraph"
	// StoreTypeTinkerGraph TinkerGraph 图存储
	StoreTypeTinkerGraph StoreType = "tinkergraph"
	// StoreTypeDgraph Dgraph 图存储
	StoreTypeDgraph StoreType = "dgraph"
	// StoreTypeArangoDB ArangoDB 图存储
	StoreTypeArangoDB StoreType = "arangodb"
)

Jump to

Keyboard shortcuts

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