refactor(postgres): removed old graph related code
Signed-off-by: soxx <soxx@fenpa.ws>
This commit is contained in:
parent
58dcf94d49
commit
b11cfbaa24
@ -71,7 +71,6 @@ func (p *postgresqlConnection) AddUserWithRelationToSource(ctx context.Context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *postgresqlConnection) AddSource(ctx context.Context, anthroveSource *graphModels.AnthroveSource) error {
|
func (p *postgresqlConnection) AddSource(ctx context.Context, anthroveSource *graphModels.AnthroveSource) error {
|
||||||
source := utils.GraphConvertSource(anthroveSource)
|
|
||||||
return postgres.CreateSourceNode(ctx, p.db, source)
|
return postgres.CreateSourceNode(ctx, p.db, source)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
package graphModels
|
|
||||||
|
|
||||||
type FavoriteRelations struct {
|
|
||||||
SourcesID string `json:"sources_id"`
|
|
||||||
Relations AnthrovePostRelationship `json:"relations"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type FavoritePost struct {
|
|
||||||
AnthrovePost AnthrovePost `json:"anthrove_post"`
|
|
||||||
Relations []FavoriteRelations `json:"relations"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type FavoriteList struct {
|
|
||||||
Posts []FavoritePost `json:"posts,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type TagsWithFrequency struct {
|
|
||||||
Frequency int64 `json:"frequency"`
|
|
||||||
Tags AnthroveTag `json:"tags"`
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
package graphModels
|
|
||||||
|
|
||||||
import "git.dragse.it/anthrove/otter-space-sdk/pkg/models"
|
|
||||||
|
|
||||||
type AnthrovePost struct {
|
|
||||||
PostID models.AnthrovePostID `json:"post_id"`
|
|
||||||
Rating models.Rating `json:"rating"`
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
package graphModels
|
|
||||||
|
|
||||||
type AnthroveUserRelationship struct {
|
|
||||||
UserID string `json:"user_id"`
|
|
||||||
Username string `json:"username"`
|
|
||||||
ScrapeTimeInterval string `json:"scrape_time_interval"`
|
|
||||||
Source AnthroveSource `json:"source"`
|
|
||||||
}
|
|
||||||
type AnthrovePostRelationship struct {
|
|
||||||
PostID string `json:"post_id"`
|
|
||||||
Url string `json:"url"`
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
package graphModels
|
|
||||||
|
|
||||||
type AnthroveSource struct {
|
|
||||||
DisplayName string `json:"display_name"`
|
|
||||||
Domain string `json:"domain"`
|
|
||||||
Icon string `json:"icon"`
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
package graphModels
|
|
||||||
|
|
||||||
type AnthroveTag struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
Type string `json:"type"`
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
package graphModels
|
|
||||||
|
|
||||||
import "git.dragse.it/anthrove/otter-space-sdk/pkg/models"
|
|
||||||
|
|
||||||
type AnthroveUser struct {
|
|
||||||
UserID models.AnthroveUserID `json:"user_id"`
|
|
||||||
Relationship []AnthroveUserRelationship `json:"relationship"`
|
|
||||||
}
|
|
Reference in New Issue
Block a user