Documentation
¶
Index ¶
- Constants
- Variables
- func Directory() string
- type Data
- type LoadedConfiguration
- func (l *LoadedConfiguration) AllowMultiBand() bool
- func (l *LoadedConfiguration) AllowMultiMode() bool
- func (l *LoadedConfiguration) CabrilloQSOTemplate() string
- func (l *LoadedConfiguration) EnterTheirNumber() bool
- func (l *LoadedConfiguration) EnterTheirXchange() bool
- func (l *LoadedConfiguration) HamlibAddress() string
- func (l *LoadedConfiguration) KeyerHost() string
- func (l *LoadedConfiguration) KeyerPort() int
- func (l *LoadedConfiguration) KeyerRunMacros() []string
- func (l *LoadedConfiguration) KeyerSPMacros() []string
- func (l *LoadedConfiguration) KeyerWPM() int
- func (l *LoadedConfiguration) MyCall() callsign.Callsign
- func (l *LoadedConfiguration) MyLocator() locator.Locator
- type StaticConfiguration
- func (s *StaticConfiguration) AllowMultiBand() bool
- func (s *StaticConfiguration) AllowMultiMode() bool
- func (s *StaticConfiguration) CabrilloQSOTemplate() string
- func (s *StaticConfiguration) EnterTheirNumber() bool
- func (s *StaticConfiguration) EnterTheirXchange() bool
- func (s *StaticConfiguration) HamlibAddress() string
- func (s *StaticConfiguration) KeyerHost() string
- func (s *StaticConfiguration) KeyerPort() int
- func (s *StaticConfiguration) KeyerRunMacros() []string
- func (s *StaticConfiguration) KeyerSPMacros() []string
- func (s *StaticConfiguration) KeyerWPM() int
- func (s *StaticConfiguration) MyCall() callsign.Callsign
- func (s *StaticConfiguration) MyLocator() locator.Locator
Constants ¶
View Source
const Filename = "hellocontest.json"
Variables ¶
View Source
var Default = Data{ MyCall: "DL0ABC", MyLocator: "AA00zz", EnterTheirNumber: true, EnterTheirXchange: true, AllowMultiBand: true, AllowMultiMode: true, CabrilloQSOTemplate: "{{.QRG}} {{.Mode}} {{.Date}} {{.Time}} {{.MyCall}} {{.MyReport}} {{.MyNumber}} {{.MyXchange}} {{.TheirCall}} {{.TheirReport}} {{.TheirNumber}} {{.TheirXchange}}", HamlibAddress: "localhost:4532", KeyerHost: "localhost", KeyerPort: 6789, KeyerWPM: 20, KeyerSPMacros: []string{ "{{.MyCall}}", "rr {{.MyReport}} {{.MyNumber}} {{.MyXchange}}", "tu gl", "nr {{.MyNumber}} {{.MyXchange}} {{.MyNumber}} {{.MyXchange}}", }, KeyerRunMacros: []string{ "cq {{.MyCall}} test", "{{.TheirCall}} {{.MyReport}} {{.MyNumber}} {{.MyXchange}}", "tu {{.MyCall}} test", "nr {{.MyNumber}} {{.MyXchange}} {{.MyNumber}} {{.MyXchange}}", }, }
Functions ¶
Types ¶
type Data ¶
type Data struct {
MyCall string `json:"mycall"`
MyLocator string `json:"locator"`
EnterTheirNumber bool `json:"enter_their_number"`
EnterTheirXchange bool `json:"enter_their_xchange"`
AllowMultiBand bool `json:"allow_multi_band"`
AllowMultiMode bool `json:"allow_multi_mode"`
CabrilloQSOTemplate string `json:"cabrillo_qso"`
KeyerHost string `json:"keyer_host"`
KeyerPort int `json:"keyer_port"`
KeyerWPM int `json:"keyer_wpm"`
KeyerSPMacros []string `json:"keyer_sp_macros"`
KeyerRunMacros []string `json:"keyer_run_macros"`
HamlibAddress string `json:"hamlib_address"`
}
type LoadedConfiguration ¶
type LoadedConfiguration struct {
// contains filtered or unexported fields
}
func Load ¶
func Load() (*LoadedConfiguration, error)
Load loads the configuration from the default location (see github.com/ftl/cfg/LoadJSON()).
func (*LoadedConfiguration) AllowMultiBand ¶
func (l *LoadedConfiguration) AllowMultiBand() bool
func (*LoadedConfiguration) AllowMultiMode ¶
func (l *LoadedConfiguration) AllowMultiMode() bool
func (*LoadedConfiguration) CabrilloQSOTemplate ¶
func (l *LoadedConfiguration) CabrilloQSOTemplate() string
func (*LoadedConfiguration) EnterTheirNumber ¶
func (l *LoadedConfiguration) EnterTheirNumber() bool
func (*LoadedConfiguration) EnterTheirXchange ¶
func (l *LoadedConfiguration) EnterTheirXchange() bool
func (*LoadedConfiguration) HamlibAddress ¶
func (l *LoadedConfiguration) HamlibAddress() string
func (*LoadedConfiguration) KeyerHost ¶
func (l *LoadedConfiguration) KeyerHost() string
func (*LoadedConfiguration) KeyerPort ¶
func (l *LoadedConfiguration) KeyerPort() int
func (*LoadedConfiguration) KeyerRunMacros ¶
func (l *LoadedConfiguration) KeyerRunMacros() []string
func (*LoadedConfiguration) KeyerSPMacros ¶
func (l *LoadedConfiguration) KeyerSPMacros() []string
func (*LoadedConfiguration) KeyerWPM ¶
func (l *LoadedConfiguration) KeyerWPM() int
func (*LoadedConfiguration) MyCall ¶
func (l *LoadedConfiguration) MyCall() callsign.Callsign
func (*LoadedConfiguration) MyLocator ¶
func (l *LoadedConfiguration) MyLocator() locator.Locator
type StaticConfiguration ¶
type StaticConfiguration struct {
// contains filtered or unexported fields
}
func Static ¶
func Static(myCall callsign.Callsign, myLocator locator.Locator) *StaticConfiguration
Static creates a static configuration instance with the given data.
func (*StaticConfiguration) AllowMultiBand ¶
func (s *StaticConfiguration) AllowMultiBand() bool
func (*StaticConfiguration) AllowMultiMode ¶
func (s *StaticConfiguration) AllowMultiMode() bool
func (*StaticConfiguration) CabrilloQSOTemplate ¶
func (s *StaticConfiguration) CabrilloQSOTemplate() string
func (*StaticConfiguration) EnterTheirNumber ¶
func (s *StaticConfiguration) EnterTheirNumber() bool
func (*StaticConfiguration) EnterTheirXchange ¶
func (s *StaticConfiguration) EnterTheirXchange() bool
func (*StaticConfiguration) HamlibAddress ¶
func (s *StaticConfiguration) HamlibAddress() string
func (*StaticConfiguration) KeyerHost ¶
func (s *StaticConfiguration) KeyerHost() string
func (*StaticConfiguration) KeyerPort ¶
func (s *StaticConfiguration) KeyerPort() int
func (*StaticConfiguration) KeyerRunMacros ¶
func (s *StaticConfiguration) KeyerRunMacros() []string
func (*StaticConfiguration) KeyerSPMacros ¶
func (s *StaticConfiguration) KeyerSPMacros() []string
func (*StaticConfiguration) KeyerWPM ¶
func (s *StaticConfiguration) KeyerWPM() int
func (*StaticConfiguration) MyCall ¶
func (s *StaticConfiguration) MyCall() callsign.Callsign
func (*StaticConfiguration) MyLocator ¶
func (s *StaticConfiguration) MyLocator() locator.Locator
Click to show internal directories.
Click to hide internal directories.