add scraping the torrent topics rss files

This commit is contained in:
2024-09-09 08:54:29 +03:00
parent 20c4f25c55
commit e587e645fc
26 changed files with 714 additions and 22 deletions

24
pkg/service/service.go Normal file
View File

@@ -0,0 +1,24 @@
package service
import (
"github.com/spf13/viper"
"git.amok.space/yevhen/resource-scraper/pkg/repository"
"git.amok.space/yevhen/resource-scraper/types"
)
type Service struct {
types.Rutracker
}
func New(repos *repository.Repository) *Service {
switch viper.GetString("scope") {
case types.RuTracker:
return &Service{
Rutracker: NewRutrackerService(repos.Rutracker),
}
}
return &Service{}
}