doc(source): added function documentation
Signed-off-by: SoXX <soxx@fenpa.ws>
This commit is contained in:
parent
3e4560768b
commit
e3a5adb2cc
@ -100,8 +100,8 @@ func GetAllSourceNodes(ctx context.Context, driver neo4j.DriverWithContext) ([]m
|
||||
return sources, nil
|
||||
}
|
||||
|
||||
// GetSourceNodesByURL returns the first models.AnthroveSource provided by the database
|
||||
func GetSourceNodesByURL(ctx context.Context, driver neo4j.DriverWithContext, sourceUrl string) (*models.AnthroveSource, error) {
|
||||
|
||||
var source models.AnthroveSource
|
||||
|
||||
query := `
|
||||
|
@ -14,7 +14,7 @@ type Source interface {
|
||||
// DeleteSource will delete a node with a given Domain
|
||||
DeleteSource(ctx context.Context, anthroveSource *models.AnthroveSource) error
|
||||
|
||||
// GetSourceByURL returns the Source Node based on the URL
|
||||
// GetSourceByURL returns the first models.AnthroveSource provided by the database
|
||||
GetSourceByURL(ctx context.Context, sourceUrl string) (*models.AnthroveSource, error)
|
||||
|
||||
// GetSourceLinkForUser retrieves the links between a user and sources in the OtterSpace graph.
|
||||
|
@ -18,6 +18,7 @@ func (g *graphConnection) DeleteSource(ctx context.Context, anthroveSource *mode
|
||||
return source.DeleteSourceNode(ctx, g.driver, anthroveSource)
|
||||
}
|
||||
|
||||
// GetSourceByURL returns the first models.AnthroveSource provided by the database
|
||||
func (g *graphConnection) GetSourceByURL(ctx context.Context, sourceUrl string) (*models.AnthroveSource, error) {
|
||||
return source.GetSourceNodesByURL(ctx, g.driver, sourceUrl)
|
||||
}
|
||||
|
Reference in New Issue
Block a user