This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
otter-space-sdk/pkg/graph/source_impl.go
SoXX fc73377d86 chore(post): code & folder restructure
Signed-off-by: SoXX <soxx@fenpa.ws>
2024-05-31 15:08:24 +02:00

35 lines
1.3 KiB
Go

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)
}