package database import ( "context" "git.dragse.it/anthrove/otter-space-sdk/pkg/models" ) type User interface { // GetAllAnthroveUserIDs retrieves all Anthrove user IDs. GetAllAnthroveUserIDs(ctx context.Context) ([]models.AnthroveUserID, error) // CreateUserWithRelationToSource adds a user with a relation to a source. CreateUserWithRelationToSource(ctx context.Context, anthroveUserID models.AnthroveUserID, sourceID models.AnthroveSourceID, accountId string, accountUsername string) error // CreateReferenceBetweenUserAndPost links a user with a post. CreateReferenceBetweenUserAndPost(ctx context.Context, anthroveUserID models.AnthroveUserID, anthrovePostID models.AnthrovePostID) error // CheckReferenceBetweenUserAndPost checks if a user-post link exists. CheckReferenceBetweenUserAndPost(ctx context.Context, anthroveUserID models.AnthroveUserID, sourcePostID models.AnthrovePostID) (bool, error) // GetUserFavoritesCount retrieves the count of a user's favorites. GetUserFavoritesCount(ctx context.Context, anthroveUserID models.AnthroveUserID) (int64, error) // GetUserSourceLinks retrieves the source links of a user. GetUserSourceLinks(ctx context.Context, anthroveUserID models.AnthroveUserID) (map[string]models.UserSource, error) // GetUserSourceBySourceID retrieves a specified source link of a user. GetUserSourceBySourceID(ctx context.Context, anthroveUserID models.AnthroveUserID, sourceID models.AnthroveSourceID) (map[string]models.UserSource, error) // GetUserFavoriteWithPagination retrieves a user's favorite posts with pagination. GetUserFavoriteWithPagination(ctx context.Context, anthroveUserID models.AnthroveUserID, skip int, limit int) (*models.FavoriteList, error) // GetUserTagWitRelationToFavedPosts retrieves a user's tags through their favorited posts. GetUserTagWitRelationToFavedPosts(ctx context.Context, anthroveUserID models.AnthroveUserID) ([]models.TagsWithFrequency, error) UpdateUserSourceScrapeTimeInterval(ctx context.Context, anthroveUserID models.AnthroveUserID, sourceID models.AnthroveSourceID, scrapeTime models.AnthroveScrapeTimeInterval) error UpdateUserSourceLastScrapeTime(ctx context.Context, anthroveUserID models.AnthroveUserID, sourceID models.AnthroveSourceID, lastScrapeTime models.AnthroveUserLastScrapeTime) error UpdateUserSourceValidation(ctx context.Context, anthroveUserID models.AnthroveUserID, sourceID models.AnthroveSourceID, valid bool) error }