internal

package
v0.0.0-...-d0809ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 11 Imported by: 0

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

func (*Consumer) Consume

func (c *Consumer) Consume()

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) InsertJob

func (jr *JobRepository) InsertJob(job 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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL