05c7eae8a2
- Introduced a new configuration file for the TED scraper, defining database connection settings, logging preferences, and scraping parameters. - Implemented a CronScheduler to manage scheduled tasks for TED operations, utilizing the robfig/cron library for scheduling. - Added new entities and structures for handling TED XML data, including eForms and tender-related information, enhancing the scraper's functionality. - Updated the main application to initialize the TED scraper with the new configuration and set up graceful shutdown handling. - Removed the deprecated scraping implementation to streamline the codebase and focus on the new architecture.
25 lines
1.7 KiB
Go
25 lines
1.7 KiB
Go
package eform
|
|
|
|
// =====================================================
|
|
// TENDER STRUCTURE
|
|
// =====================================================
|
|
|
|
// Tender represents information about individual bids
|
|
type Tender struct {
|
|
ID string `json:"id" xml:"id" validate:"required,tenIDFormat"`
|
|
TenderRank *int `json:"tender_rank,omitempty" xml:"tender_rank,omitempty" validate:"omitempty,min=1"`
|
|
IsWinner bool `json:"is_winner" xml:"is_winner"`
|
|
TendererIDs []string `json:"tenderer_ids" xml:"tenderer_ids" validate:"required,min=1"`
|
|
IsConsortium bool `json:"is_consortium" xml:"is_consortium"`
|
|
VariantTender bool `json:"variant_tender" xml:"variant_tender"`
|
|
ExcludedTender bool `json:"excluded_tender" xml:"excluded_tender"`
|
|
ExclusionReason string `json:"exclusion_reason,omitempty" xml:"exclusion_reason,omitempty" validate:"required_if=ExcludedTender true"`
|
|
TenderValue *Money `json:"tender_value,omitempty" xml:"tender_value,omitempty"`
|
|
SubcontractingPercentage *float64 `json:"subcontracting_percentage,omitempty" xml:"subcontracting_percentage,omitempty" validate:"omitempty,min=0,max=100"`
|
|
SMETender bool `json:"sme_tender" xml:"sme_tender"`
|
|
ConcessionValue *Money `json:"concession_value,omitempty" xml:"concession_value,omitempty"`
|
|
SubcontractorIDs []string `json:"subcontractor_ids,omitempty" xml:"subcontractor_ids,omitempty"`
|
|
AbnormallyLow bool `json:"abnormally_low" xml:"abnormally_low"`
|
|
AbnormallyLowExplanation string `json:"abnormally_low_explanation,omitempty" xml:"abnormally_low_explanation,omitempty" validate:"max=10000"`
|
|
}
|