Documentation ¶
Index ¶
- func FillNewQsoFromQrz(ctx context.Context, m pubsub.Message) error
- func ImportLotw(w http.ResponseWriter, r *http.Request)
- func ImportQrz(w http.ResponseWriter, r *http.Request)
- func SyncNewQso(ctx context.Context, m pubsub.Message) error
- func UpdateSecret(w http.ResponseWriter, r *http.Request)
- func UploadNewQsoToQrz(ctx context.Context, m pubsub.Message) error
- type FirebaseManager
- func (f *FirebaseManager) Create(qso *adifpb.Qso) error
- func (f *FirebaseManager) GetContacts() ([]FirestoreQso, error)
- func (f *FirebaseManager) GetLogbookProperty(key string) (string, error)
- func (f *FirebaseManager) GetUID() string
- func (f *FirebaseManager) GetUserProperty(key string) (string, error)
- func (f *FirebaseManager) MergeQsos(firebaseQsos []FirestoreQso, remoteAdi *adifpb.Adif) (int, int, int)
- func (f *FirebaseManager) SetLogbookProperty(key string, value string) error
- func (f *FirebaseManager) Update(qso FirestoreQso) error
- type FirestoreQso
- type SecretStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FillNewQsoFromQrz ¶
FillNewQsoFromQrz listens to Pub/Sub for new contacts in Firestore, and fills in missing QSO details for the contacted station from QRZ.com.
func ImportLotw ¶
func ImportLotw(w http.ResponseWriter, r *http.Request)
ImportLotw imports QSLs from Logbook of the World and merges them into Firestore. Called via GCP Cloud Functions.
func ImportQrz ¶
func ImportQrz(w http.ResponseWriter, r *http.Request)
ImportQrz imports QSOs from QRZ logbook and merges them into Firestore. Called via GCP Cloud Functions.
func SyncNewQso ¶
SyncNewQso listens to Pub/Sub for new contacts in Firestore, fills missing details from the QRZ.com database, and uploads them to the QRZ.com Logbook.
func UpdateSecret ¶
func UpdateSecret(w http.ResponseWriter, r *http.Request)
UpdateSecret allows users to add or change their stored secrets. Called via GCP Cloud Functions.
Types ¶
type FirebaseManager ¶
type FirebaseManager struct {
// contains filtered or unexported fields
}
func MakeFirebaseManager ¶
MakeFirebaseManager does a bunch of initialization. It verifies the JWT and exchanges it for a user token, and inits a Firestore connection as that user.
func (*FirebaseManager) GetContacts ¶
func (f *FirebaseManager) GetContacts() ([]FirestoreQso, error)
func (*FirebaseManager) GetLogbookProperty ¶
func (f *FirebaseManager) GetLogbookProperty(key string) (string, error)
func (*FirebaseManager) GetUID ¶
func (f *FirebaseManager) GetUID() string
func (*FirebaseManager) GetUserProperty ¶
func (f *FirebaseManager) GetUserProperty(key string) (string, error)
func (*FirebaseManager) MergeQsos ¶
func (f *FirebaseManager) MergeQsos( firebaseQsos []FirestoreQso, remoteAdi *adifpb.Adif) (int, int, int)
MergeQsos merges the remote ADIF contacts into the Firestore ones. It returns the counts of QSOs created, modified, and with no difference.
func (*FirebaseManager) SetLogbookProperty ¶
func (f *FirebaseManager) SetLogbookProperty(key string, value string) error
func (*FirebaseManager) Update ¶
func (f *FirebaseManager) Update(qso FirestoreQso) error
type FirestoreQso ¶
type FirestoreQso struct {
// contains filtered or unexported fields
}
func ParseFirestoreQso ¶
func ParseFirestoreQso(qsoDoc *firestore.DocumentSnapshot) (FirestoreQso, error)
type SecretStore ¶
type SecretStore struct {
// contains filtered or unexported fields
}
func NewSecretStore ¶
func NewSecretStore(ctx context.Context) SecretStore
func (*SecretStore) FetchSecret ¶
func (s *SecretStore) FetchSecret(logbookID string, key string) (string, error)
FetchSecret gets the latest value of the secret for the given logbook and key.