Files
tm_back/ted/eform/contracting_party.go
T
n.nakhostin 05c7eae8a2 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.
2025-09-30 16:03:53 +03:30

83 lines
2.9 KiB
Go

package eform
import "encoding/xml"
// =====================================================
// CONTRACTING PARTY
// =====================================================
// ContractingParty represents the contracting party
type ContractingParty struct {
XMLName xml.Name `xml:"ContractingParty"`
BuyerProfileURI string `xml:"BuyerProfileURI,omitempty"`
ContractingPartyType ContractingPartyType `xml:"ContractingPartyType,omitempty"`
ContractingActivity ContractingActivity `xml:"ContractingActivity,omitempty"`
Party Party `xml:"Party,omitempty"`
}
// ContractingPartyType contains party type information
type ContractingPartyType struct {
XMLName xml.Name `xml:"ContractingPartyType"`
PartyTypeCode string `xml:"PartyTypeCode"`
}
// ContractingActivity represents the contracting activity
type ContractingActivity struct {
XMLName xml.Name `xml:"ContractingActivity"`
ActivityTypeCode string `xml:"ActivityTypeCode"`
}
// Party represents a party
type Party struct {
XMLName xml.Name `xml:"Party"`
PartyIdentification []PartyIdentification `xml:"PartyIdentification,omitempty"`
PartyName []PartyName `xml:"PartyName,omitempty"`
PostalAddress PostalAddress `xml:"PostalAddress,omitempty"`
PartyLegalEntity PartyLegalEntity `xml:"PartyLegalEntity,omitempty"`
Contact Contact `xml:"Contact,omitempty"`
WebsiteURI string `xml:"WebsiteURI,omitempty"`
}
// PartyIdentification represents party identification
type PartyIdentification struct {
XMLName xml.Name `xml:"PartyIdentification"`
ID string `xml:"ID"`
}
// PartyName represents party name
type PartyName struct {
XMLName xml.Name `xml:"PartyName"`
Name string `xml:"Name"`
}
// PostalAddress represents postal address
type PostalAddress struct {
XMLName xml.Name `xml:"PostalAddress"`
StreetName string `xml:"StreetName,omitempty"`
CityName string `xml:"CityName,omitempty"`
PostalZone string `xml:"PostalZone,omitempty"`
CountrySubentityCode string `xml:"CountrySubentityCode,omitempty"`
Country Country `xml:"Country,omitempty"`
}
// Country represents country information
type Country struct {
XMLName xml.Name `xml:"Country"`
IdentificationCode string `xml:"IdentificationCode"`
}
// PartyLegalEntity represents party legal entity
type PartyLegalEntity struct {
XMLName xml.Name `xml:"PartyLegalEntity"`
CompanyID string `xml:"CompanyID"`
}
// Contact represents contact information
type Contact struct {
XMLName xml.Name `xml:"Contact"`
Name string `xml:"Name,omitempty"`
Telephone string `xml:"Telephone,omitempty"`
Telefax string `xml:"Telefax,omitempty"`
ElectronicMail string `xml:"ElectronicMail,omitempty"`
}