diff --git a/pkg/graph.go b/pkg/graph.go index 56461ea..180c501 100644 --- a/pkg/graph.go +++ b/pkg/graph.go @@ -4,7 +4,6 @@ import ( "context" "git.dragse.it/anthrove/anthrove-graph-sdk.git/pkg/models" - "github.com/neo4j/neo4j-go-driver/v5/neo4j" ) type Graph interface { @@ -12,7 +11,7 @@ type Graph interface { Connect(ctx context.Context, endpoint string, username string, password string) error // AddUserToGraph uploads an Anthrove user to the graph - AddUserToGraph(ctx context.Context, driver neo4j.DriverWithContext, anthroveUserID models.AnthroveUserID, sourceDomain string, userID string, username string) (*models.AnthroveUser, error) + AddUserToGraph(ctx context.Context, anthroveUserID models.AnthroveUserID, sourceDomain string, userID string, username string) (*models.AnthroveUser, error) // AddSourceToGraph uploads an Anthrove source to the graph AddSourceToGraph(ctx context.Context, anthroveSource *models.AnthroveSource) error diff --git a/pkg/impl.go b/pkg/impl.go index 891d099..8a73be8 100644 --- a/pkg/impl.go +++ b/pkg/impl.go @@ -36,8 +36,8 @@ func (g *graphConnection) Connect(ctx context.Context, endpoint string, username return nil } -func (g *graphConnection) AddUserToGraph(ctx context.Context, driver neo4j.DriverWithContext, anthroveUserID models.AnthroveUserID, sourceDomain string, userID string, username string) (*models.AnthroveUser, error) { - return internal.CreateUserNodeWithSourceRelation(ctx, driver, anthroveUserID, sourceDomain, userID, username) +func (g *graphConnection) AddUserToGraph(ctx context.Context, anthroveUserID models.AnthroveUserID, sourceDomain string, userID string, username string) (*models.AnthroveUser, error) { + return internal.CreateUserNodeWithSourceRelation(ctx, g.driver, anthroveUserID, sourceDomain, userID, username) } func (g *graphConnection) AddSourceToGraph(ctx context.Context, anthroveSource *models.AnthroveSource) error {