diff --git a/pkg/graph/post.go b/pkg/graph/post.go index d1d27c8..f08d75b 100644 --- a/pkg/graph/post.go +++ b/pkg/graph/post.go @@ -10,9 +10,9 @@ type Post interface { CreatePost(ctx context.Context, anthrovePost *models.AnthrovePost) error DeletePost(ctx context.Context, anthrovePost *models.AnthrovePost) error - // LinkPostWithSource establishes a link between a post and a source in the OtterSpace graph. - // It returns an error if the operation fails. - LinkPostWithSource(ctx context.Context, anthrovePostID models.AnthrovePostID, anthroveSourceDomain string, anthrovePostRelationship *models.AnthrovePostRelationship) error + // CheckPostNodeExistsBySourceID checks if a post node exists in the OtterSpace graph by its source ID. + // It returns the post if it exists, a boolean indicating whether the post was found, and an error if the operation fails. + CheckPostNodeExistsBySourceID(ctx context.Context, sourcePostID string) (*models.AnthrovePost, bool, error) // CheckPostNodeExistsByAnthroveID checks if a post node exists in the OtterSpace graph by its Anthrove ID. // It returns the post if it exists, a boolean indicating whether the post was found, and an error if the operation fails. @@ -22,7 +22,7 @@ type Post interface { // It returns the post if it exists, a boolean indicating whether the post was found, and an error if the operation fails. CheckPostNodeExistsBySourceURL(ctx context.Context, sourceUrl string) (*models.AnthrovePost, bool, error) - // CheckPostNodeExistsBySourceID checks if a post node exists in the OtterSpace graph by its source ID. - // It returns the post if it exists, a boolean indicating whether the post was found, and an error if the operation fails. - CheckPostNodeExistsBySourceID(ctx context.Context, sourcePostID string) (*models.AnthrovePost, bool, error) + // LinkPostWithSource establishes a link between a post and a source in the OtterSpace graph. + // It returns an error if the operation fails. + LinkPostWithSource(ctx context.Context, anthrovePostID models.AnthrovePostID, anthroveSourceDomain string, anthrovePostRelationship *models.AnthrovePostRelationship) error }