refactor: reorganized code structure
Signed-off-by: SoXX <soxx@fenpa.ws>
This commit is contained in:
parent
bc8b5bb4a7
commit
5de00e6861
@ -11,12 +11,7 @@ type OtterSpace interface {
|
||||
Connect(ctx context.Context, config models.DatabaseConfig) error
|
||||
|
||||
User
|
||||
|
||||
Source
|
||||
|
||||
TagAlias
|
||||
|
||||
TagGroup
|
||||
|
||||
UserSource
|
||||
}
|
||||
|
@ -26,4 +26,9 @@ type User interface {
|
||||
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
|
||||
}
|
||||
|
@ -1,14 +0,0 @@
|
||||
package database
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.dragse.it/anthrove/otter-space-sdk/pkg/models"
|
||||
)
|
||||
|
||||
type UserSource interface {
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user