Documentation
¶
Index ¶
Constants ¶
const ServiceName = types.QrzForwardingServiceName
ServiceName is the name of the service and is used to look up the service in the container.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
LoggerService *logging.Service `di.inject:"loggingservice"`
ConfigService *config.Service `di.inject:"configservice"`
DatabaseService *sqlite.Service `di.inject:"sqliteservice"`
Config *types.ForwarderConfig
// contains filtered or unexported fields
}
Service represents a core FORWARDING structure facilitating interaction between logging, configuration, database, and HTTP services. It allows for dependency injection and manages initialization state effectively.
func (*Service) Forward ¶
Forward sends a QSO record to the QRZ.com API, handles the response, and updates the local database with the result. This method is kept for backward compatibility but now delegates to ForwardNetworkOnly and UpdateDatabase.
func (*Service) ForwardNetworkOnly ¶ added in v0.0.10
ForwardNetworkOnly sends a QSO record to the QRZ.com API and validates the response. Database updates are NOT performed - use UpdateDatabase separately for serialized DB writes.
func (*Service) Initialize ¶
Initialize initializes the Service by injecting dependencies, setting the configuration, and preparing HTTP clients as needed.
func (*Service) UpdateDatabase ¶ added in v0.0.10
UpdateDatabase updates the local database with the provided QSO record. Returns an error if the database update process fails. We update the database here rather than at the caller because different services have different requirements concerning the fields and values that are stored in the database.
However, the qso_upload table is updated by the facade service worker. This method is now public to support serialized database writes through the facade's DB worker.