callbook

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package callbook allows to retrieve information about a call from various online sources. Supported sources: qrz.com, hamqth.com

Index

Constants

View Source
const QRZTimeFormat = "Mon Jan  2 15:04:05 2006"

QRZTimeFormat describes the time format used by qrz.com

Variables

This section is empty.

Functions

This section is empty.

Types

type Callbook

type Callbook interface {
	Lookup(callsign string) (Info, error)
}

Callbook defines the Lookup functionality in a callbook.

type Factory

type Factory func(username, password string) Callbook

Factory is a function that creates a new callbook instance from username and password

type HamQTH

type HamQTH struct {
	Username string
	// contains filtered or unexported fields
}

HamQTH represents a connection to hamqth.com with a certain user account. For more information about the API see https://www.hamqth.com/developers.php.

func NewHamQTH

func NewHamQTH(username, password string) *HamQTH

NewHamQTH creates a new HamQTH instance with the given username and password.

func (*HamQTH) Lookup

func (hamqth *HamQTH) Lookup(callsign string) (Info, error)

Lookup looks up information about the given callsign.

type Info

type Info struct {
	Callsign    callsign.Callsign
	Name        string
	Address     string
	QTH         string
	Country     string
	Locator     locator.Locator
	LatLon      latlon.LatLon
	LatLonValid bool
	CQZone      dxcc.CQZone
	ITUZone     dxcc.ITUZone
	TimeOffset  dxcc.TimeOffset
}

Info contains the information from a callbook service about a callsign.

type QRZ

type QRZ struct {
	Username string
	// contains filtered or unexported fields
}

QRZ represents a connection to qrz.com with a certain user account. For more information about the API see https://www.qrz.com/page/current_spec.html.

func NewQRZ

func NewQRZ(username, password string) *QRZ

NewQRZ creates a new QRZ instance with the given username and password.

func (*QRZ) Lookup

func (qrz *QRZ) Lookup(callsign string) (Info, error)

Lookup looks up information about the given callsign.

Jump to

Keyboard shortcuts

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