Add TED Scraper Configuration and Cron Scheduler Implementation
- 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.
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
package eform
|
||||
|
||||
import "encoding/xml"
|
||||
|
||||
// =====================================================
|
||||
// PROCUREMENT PROJECT
|
||||
// =====================================================
|
||||
|
||||
// ProcurementProject represents the procurement project
|
||||
type ProcurementProject struct {
|
||||
XMLName xml.Name `xml:"ProcurementProject"`
|
||||
ID string `xml:"ID"`
|
||||
Name string `xml:"Name"`
|
||||
Description string `xml:"Description"`
|
||||
ProcurementTypeCode string `xml:"ProcurementTypeCode"`
|
||||
Note string `xml:"Note,omitempty"`
|
||||
RequestedTenderTotal RequestedTenderTotal `xml:"RequestedTenderTotal,omitempty"`
|
||||
MainCommodityClassification MainCommodityClassification `xml:"MainCommodityClassification,omitempty"`
|
||||
RealizedLocation RealizedLocation `xml:"RealizedLocation,omitempty"`
|
||||
PlannedPeriod PlannedPeriod `xml:"PlannedPeriod,omitempty"`
|
||||
}
|
||||
|
||||
// RequestedTenderTotal represents the estimated contract amount
|
||||
type RequestedTenderTotal struct {
|
||||
XMLName xml.Name `xml:"RequestedTenderTotal"`
|
||||
EstimatedOverallContractAmount string `xml:"EstimatedOverallContractAmount"`
|
||||
}
|
||||
|
||||
// MainCommodityClassification represents the CPV code
|
||||
type MainCommodityClassification struct {
|
||||
ItemClassificationCode string `json:"item_classification_code" xml:"ItemClassificationCode"`
|
||||
}
|
||||
|
||||
// RealizedLocation represents the location where work will be performed
|
||||
type RealizedLocation struct {
|
||||
Address PostalAddress `xml:"PostalAddress"`
|
||||
Region string `xml:"Region,omitempty"`
|
||||
}
|
||||
|
||||
// PlannedPeriod represents the planned duration of the contract
|
||||
type PlannedPeriod struct {
|
||||
DurationMeasure DurationMeasure `json:"duration_measure" xml:"DurationMeasure"`
|
||||
}
|
||||
|
||||
// DurationMeasure represents a duration with unit
|
||||
type DurationMeasure struct {
|
||||
UnitCode string `json:"unit_code" xml:"unitCode,attr"`
|
||||
Value string `json:"value" xml:",chardata"`
|
||||
}
|
||||
Reference in New Issue
Block a user