qrz

package
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

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 Response

type Response struct {
	Result string
	Reason string
	LogIDS string
	LogID  string
	Count  string
	Data   string
}

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

func (s *Service) Forward(qso types.Qso, param ...string) error

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

func (s *Service) ForwardNetworkOnly(qso types.Qso, param ...string) error

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

func (s *Service) Initialize() error

Initialize initializes the Service by injecting dependencies, setting the configuration, and preparing HTTP clients as needed.

func (*Service) UpdateDatabase added in v0.0.10

func (s *Service) UpdateDatabase(qso types.Qso) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL