Documentation ¶
Overview ¶
Package usecase implements application business logic. Each logic group in own file.
Index ¶
- type Crawler
- type CrawlerRepo
- type CrawlerUseCase
- func (uc *CrawlerUseCase) CrawlChapter(ctx context.Context, url string) (entity.Chapter, error)
- func (uc *CrawlerUseCase) CrawlChapterBySlug(ctx context.Context, sSlug string, cSlug string) (entity.Chapter, error)
- func (uc *CrawlerUseCase) CrawlChapters(ctx context.Context, url string) ([]entity.Chapter, error)
- func (uc *CrawlerUseCase) CrawlStory(ctx context.Context, url string) (entity.Story, error)
- func (uc *CrawlerUseCase) CrawlStoryBySlug(ctx context.Context, slug string) (entity.Story, error)
- type TruyenFullWebAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Crawler ¶
type Crawler interface { CrawlStory(ctx context.Context, url string) (entity.Story, error) CrawlStoryBySlug(ctx context.Context, slug string) (entity.Story, error) CrawlChapters(ctx context.Context, url string) ([]entity.Chapter, error) CrawlChapter(ctx context.Context, url string) (entity.Chapter, error) CrawlChapterBySlug(ctx context.Context, sSlug string, cSlug string) (entity.Chapter, error) }
Crawler -.
type CrawlerRepo ¶
type CrawlerRepo interface { StoreStory(context.Context, *entity.Story) error StoreStoryRate(context.Context, *entity.StoryRate) error StoreStoryList(context.Context, *entity.StoryList) error StoreCategory(context.Context, *entity.Category) error StoreChapter(context.Context, *entity.Chapter) error StoreChapters(context.Context, *[]entity.Chapter) error StoreAuthor(context.Context, *entity.Author) error FindStory(context.Context, entity.Story, *entity.Story) error }
CrawlerRepo -.
type CrawlerUseCase ¶
type CrawlerUseCase struct {
// contains filtered or unexported fields
}
CrawlerUseCase -.
func (*CrawlerUseCase) CrawlChapter ¶
func (*CrawlerUseCase) CrawlChapterBySlug ¶
func (*CrawlerUseCase) CrawlChapters ¶
func (*CrawlerUseCase) CrawlStory ¶
func (*CrawlerUseCase) CrawlStoryBySlug ¶
Click to show internal directories.
Click to hide internal directories.