Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidGeneratorType indicates that the specified generator type is invalid. ErrInvalidGeneratorType = errors.New("Invalid generator type") // ErrInvalidConfiguration indicates that the supplied configuration is invalid. ErrInvalidConfiguration = errors.New("Invalid configuration") )
View Source
var ( // ErrInvalidRequest indicates that the request format is invalid. ErrInvalidRequest = errors.New("Invalid request") // ErrUnsupportedReportType indicates that the specified report type is not supported. ErrUnsupportedReportType = errors.New("The requested report type is not supported") )
Functions ¶
Types ¶
type GenerateUC ¶
type GenerateUC interface { // Generate generates the report based on request data. Generate(ctx context.Context, teamInfo teamInfo, reportData interface{}) (model.Report, error) // Finish finishes report generation updating its status. Finish(ctx context.Context, reportID, status string) error }
GenerateUC represents the Use Case interface for a report generation.
func NewGenerateUC ¶
func NewGenerateUC(typ model.ReportType, logger *log.Logger, generator Generator, repository storage.ReportsRepository) (GenerateUC, error)
NewGenerateUC creates a new report generate use case based on specified type.
Click to show internal directories.
Click to hide internal directories.