Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIHandler ¶
type APIHandler struct {
// contains filtered or unexported fields
}
func NewAPIHandler ¶
func NewAPIHandler( jobPublisher *JobPublisher, jobRepository *JobRepository, ) *APIHandler
func (*APIHandler) GenerateReport ¶
func (h *APIHandler) GenerateReport(c *gin.Context)
func (*APIHandler) GetReport ¶
func (h *APIHandler) GetReport(c *gin.Context)
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
func NewConsumer( channel *amqp.Channel, jobRepository *JobRepository, reportGenerator *ReportGenerator, ) *Consumer
type JobPublisher ¶
type JobPublisher struct {
// contains filtered or unexported fields
}
func NewJobPublisher ¶
func NewJobPublisher(channel *amqp.Channel) *JobPublisher
func (*JobPublisher) PublishJob ¶
func (jp *JobPublisher) PublishJob(jobMessage domain.JobMessage) error
type JobRepository ¶
type JobRepository struct {
// contains filtered or unexported fields
}
func NewJobRepository ¶
func NewJobRepository(collection *mongo.Collection) *JobRepository
func (*JobRepository) FindJobByID ¶
func (jr *JobRepository) FindJobByID(id string) (domain.Job, error)
func (*JobRepository) UpdateJobDone ¶
func (jr *JobRepository) UpdateJobDone(id string, report any) error
type ReportGenerator ¶
type ReportGenerator struct{}
func NewReportGenerator ¶
func NewReportGenerator() *ReportGenerator
func (*ReportGenerator) GenerateReport ¶
func (rg *ReportGenerator) GenerateReport(previousDays uint64) (domain.Report, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.