2024-04-29 16:31:48 -07:00
|
|
|
package services
|
|
|
|
|
|
|
|
import (
|
|
|
|
"database/sql"
|
|
|
|
|
2024-04-29 16:49:52 -07:00
|
|
|
"git.jamestombleson.com/jtom38/newsbot-api/internal/domain"
|
2024-04-29 16:31:48 -07:00
|
|
|
"github.com/maragudk/goqite"
|
|
|
|
)
|
|
|
|
|
2024-04-29 16:49:52 -07:00
|
|
|
|
|
|
|
|
2024-04-29 16:31:48 -07:00
|
|
|
type queues struct {
|
|
|
|
repos RepositoryService
|
|
|
|
|
2024-04-29 16:49:52 -07:00
|
|
|
RssCollection goqite.Queue
|
2024-04-29 16:31:48 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func NewQueues(conn *sql.DB) queues {
|
|
|
|
return queues{
|
|
|
|
repos: NewRepositoryService(conn),
|
2024-04-29 16:49:52 -07:00
|
|
|
RssCollection: *goqite.New(goqite.NewOpts{
|
2024-04-29 16:31:48 -07:00
|
|
|
DB: conn,
|
2024-04-29 16:49:52 -07:00
|
|
|
Name: domain.QueueRssCollection,
|
2024-04-29 16:31:48 -07:00
|
|
|
}),
|
|
|
|
}
|
|
|
|
}
|