package graph
import (
"context"
"git.dragse.it/anthrove/otter-space-sdk/internal/source"
"git.dragse.it/anthrove/otter-space-sdk/internal/user"
"git.dragse.it/anthrove/otter-space-sdk/pkg/models"
)
func (g *graphConnection) CreateSource(ctx context.Context, anthroveSource *models.AnthroveSource) error {
return source.CreateSourceNode(ctx, g.driver, anthroveSource)
}
func (g *graphConnection) DeleteSource(ctx context.Context, anthroveSource *models.AnthroveSource) error {
//TODO implement me
panic("implement me")
func (g *graphConnection) GetSourceByURL(ctx context.Context, sourceUrl string) (*models.AnthroveSource, error) {
return source.GetSourceNodesByURL(ctx, g.driver, sourceUrl)
func (g *graphConnection) GetAllSources(ctx context.Context) ([]models.AnthroveSource, error) {
return source.GetAllSourceNodes(ctx, g.driver)
func (g *graphConnection) GetSourceLinkForSpecifiedUser(ctx context.Context, anthroveUserID models.AnthroveUserID, sourceDisplayName string) (map[string]models.AnthroveUserRelationship, error) {
return user.GetSpecifiedUserSourceLink(ctx, g.driver, anthroveUserID, sourceDisplayName)
func (g *graphConnection) GetSourceLinkForUser(ctx context.Context, anthroveUserID models.AnthroveUserID) (map[string]models.AnthroveUserRelationship, error) {
return user.GetUserSourceLink(ctx, g.driver, anthroveUserID)