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,26 @@
|
||||
package eform
|
||||
|
||||
import "time"
|
||||
|
||||
// =====================================================
|
||||
// SETTLED CONTRACT STRUCTURE
|
||||
// =====================================================
|
||||
|
||||
// SettledContract represents awarded contract details
|
||||
type SettledContract struct {
|
||||
ID string `json:"id" xml:"id" validate:"required,conIDFormat"`
|
||||
ContractNumber string `json:"contract_number,omitempty" xml:"contract_number,omitempty" validate:"max=100"`
|
||||
Title string `json:"title" xml:"title" validate:"required,max=500"`
|
||||
ConclusionDate time.Time `json:"conclusion_date" xml:"conclusion_date" validate:"required"`
|
||||
ContractValue Money `json:"contract_value" xml:"contract_value" validate:"required"`
|
||||
InitialValue *Money `json:"initial_value,omitempty" xml:"initial_value,omitempty"`
|
||||
FrameworkMaxValue *Money `json:"framework_max_value,omitempty" xml:"framework_max_value,omitempty"`
|
||||
StartDate *time.Time `json:"start_date,omitempty" xml:"start_date,omitempty"`
|
||||
EndDate *time.Time `json:"end_date,omitempty" xml:"end_date,omitempty"`
|
||||
Duration *Duration `json:"duration,omitempty" xml:"duration,omitempty"`
|
||||
ContractorIDs []string `json:"contractor_ids" xml:"contractor_ids" validate:"required,min=1"`
|
||||
Modifications []Modification `json:"modifications,omitempty" xml:"modifications,omitempty" validate:"dive"`
|
||||
FinalValue *Money `json:"final_value,omitempty" xml:"final_value,omitempty"`
|
||||
CompletionDate *time.Time `json:"completion_date,omitempty" xml:"completion_date,omitempty"`
|
||||
GroupID string `json:"group_id,omitempty" xml:"group_id,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user