logbook

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DXCCFinder

type DXCCFinder interface {
	Find(string) ([]dxcc.Prefix, bool)
}

DXCCFinder returns a list of matching prefixes for the given string and indicates if there was a match at all.

type Logbook

type Logbook struct {
	// contains filtered or unexported fields
}

func Load

func Load(clock core.Clock, reader Reader) (*Logbook, error)

Load creates a new log and loads it with the entries from the given reader.

func New

func New(clock core.Clock) *Logbook

New creates a new empty logbook.

func (*Logbook) ClearRowAddedListeners

func (l *Logbook) ClearRowAddedListeners()

func (*Logbook) Log

func (l *Logbook) Log(qso core.QSO)

func (*Logbook) NextNumber

func (l *Logbook) NextNumber() core.QSONumber

func (*Logbook) OnRowAdded

func (l *Logbook) OnRowAdded(listener RowAddedListener)

func (*Logbook) QsosOrderedByMyNumber

func (l *Logbook) QsosOrderedByMyNumber() []core.QSO

func (*Logbook) ReplayAll

func (l *Logbook) ReplayAll()

func (*Logbook) SetWriter

func (l *Logbook) SetWriter(writer Writer)

func (*Logbook) UniqueQsosOrderedByMyNumber

func (l *Logbook) UniqueQsosOrderedByMyNumber() []core.QSO

func (*Logbook) WriteAll

func (l *Logbook) WriteAll(writer Writer) error

type QSOAddedListener

type QSOAddedListener interface {
	QSOAdded(core.QSO)
}

type QSOAddedListenerFunc

type QSOAddedListenerFunc func(core.QSO)

func (QSOAddedListenerFunc) QSOAdded

func (f QSOAddedListenerFunc) QSOAdded(qso core.QSO)

type QSOInsertedListener

type QSOInsertedListener interface {
	QSOInserted(int, core.QSO)
}

type QSOInsertedListenerFunc

type QSOInsertedListenerFunc func(int, core.QSO)

func (QSOInsertedListenerFunc) QSOInserted

func (f QSOInsertedListenerFunc) QSOInserted(index int, qso core.QSO)

type QSOList

type QSOList struct {
	// contains filtered or unexported fields
}

func NewQSOList

func NewQSOList(dxccFinder DXCCFinder) *QSOList

func (*QSOList) All

func (l *QSOList) All() []core.QSO

func (*QSOList) Clear

func (l *QSOList) Clear()

func (*QSOList) Find

func (l *QSOList) Find(callsign callsign.Callsign, band core.Band, mode core.Mode) []core.QSO

func (*QSOList) LastBand

func (l *QSOList) LastBand() core.Band

func (*QSOList) LastMode

func (l *QSOList) LastMode() core.Mode

func (*QSOList) Notify

func (l *QSOList) Notify(listener interface{})

func (*QSOList) Put

func (l *QSOList) Put(qso core.QSO)

func (*QSOList) SelectLastQSO

func (l *QSOList) SelectLastQSO()

func (*QSOList) SelectQSO

func (l *QSOList) SelectQSO(qso core.QSO)

func (*QSOList) SelectRow

func (l *QSOList) SelectRow(index int)

type QSOSelectedListener

type QSOSelectedListener interface {
	QSOSelected(core.QSO)
}

type QSOSelectedListenerFunc

type QSOSelectedListenerFunc func(core.QSO)

func (QSOSelectedListenerFunc) QSOSelected

func (f QSOSelectedListenerFunc) QSOSelected(qso core.QSO)

type QSOUpdatedListener

type QSOUpdatedListener interface {
	QSOUpdated(int, core.QSO, core.QSO)
}

type QSOUpdatedListenerFunc

type QSOUpdatedListenerFunc func(int, core.QSO, core.QSO)

func (QSOUpdatedListenerFunc) QSOUpdated

func (f QSOUpdatedListenerFunc) QSOUpdated(index int, old, new core.QSO)

type QSOsClearedListener

type QSOsClearedListener interface {
	QSOsCleared()
}

type QSOsClearedListenerFunc

type QSOsClearedListenerFunc func()

func (QSOsClearedListenerFunc) Clear

func (f QSOsClearedListenerFunc) Clear()

type Reader

type Reader interface {
	ReadAll() ([]core.QSO, error)
}

Reader reads log entries.

type RowAddedListener

type RowAddedListener func(core.QSO)

RowAddedListener is notified when a new row is added to the log.

type RowSelectedListener

type RowSelectedListener interface {
	RowSelected(int)
}

type RowSelectedListenerFunc

type RowSelectedListenerFunc func(int)

func (RowSelectedListenerFunc) RowSelected

func (f RowSelectedListenerFunc) RowSelected(index int)

type Store

type Store interface {
	Reader
	Writer
	Clear() error
}

Store allows to read and write log entries.

type Writer

type Writer interface {
	Write(core.QSO) error
}

Writer writes log entries.

Jump to

Keyboard shortcuts

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