Migrated from neostr-brainstorm.

Added unit tests.
This commit is contained in:
Jay
2026-03-02 14:50:27 -05:00
commit f39f8786d9
13 changed files with 1100 additions and 0 deletions

20
neo4j.go Normal file
View File

@@ -0,0 +1,20 @@
package heartwood
import (
"context"
"github.com/neo4j/neo4j-go-driver/v6/neo4j"
)
// ConnectNeo4j creates a new Neo4j driver and verifies its connectivity.
func ConnectNeo4j(ctx context.Context, uri, user, password string) (neo4j.Driver, error) {
driver, err := neo4j.NewDriver(
uri,
neo4j.BasicAuth(user, password, ""))
err = driver.VerifyConnectivity(ctx)
if err != nil {
return driver, err
}
return driver, nil
}