README

Go Report Card Deploy

kellog-func

Serverless cloud functions to support K0SWE's KelLog amateur radio logger.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImportLotw

func ImportLotw(w http.ResponseWriter, r *http.Request)

    Import QSOs from Logbook of the World and merge into Firestore. Called via GCP Cloud Functions.

    func ImportQrz

    func ImportQrz(w http.ResponseWriter, r *http.Request)

      Import QSOs from QRZ logbook and merge into Firestore. Called via GCP Cloud Functions.

      func UpdateSecret

      func UpdateSecret(w http.ResponseWriter, r *http.Request)

        Import QSOs from QRZ logbook and merge into Firestore. Called via GCP Cloud Functions.

        Types

        type FirebaseManager

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

        func MakeFirebaseManager

        func MakeFirebaseManager(ctx *context.Context, r *http.Request) (*FirebaseManager, error)

          Do a bunch of initialization. Verify JWT and get user token back, and init a Firestore connection as that user.

          func (*FirebaseManager) Create

          func (f *FirebaseManager) Create(qso *adifpb.Qso) error

          func (*FirebaseManager) GetContacts

          func (f *FirebaseManager) GetContacts() ([]FirestoreQso, error)

          func (*FirebaseManager) GetUID

          func (f *FirebaseManager) GetUID() string

          func (*FirebaseManager) GetUserSetting

          func (f *FirebaseManager) GetUserSetting(key string) (string, error)

          func (*FirebaseManager) MergeQsos

          func (f *FirebaseManager) MergeQsos(
          	firebaseQsos []FirestoreQso,
          	remoteAdi *adifpb.Adif) (int, int, int)

            Merge the remote ADIF contacts into the Firestore ones. Returns the counts of QSOs created, modified, and with no difference.

            func (*FirebaseManager) Update

            func (f *FirebaseManager) Update(qso FirestoreQso) error

            type FirestoreQso

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

            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(userId string, key string) (string, error)

            func (*SecretStore) SetSecret

            func (s *SecretStore) SetSecret(userId string, key string, secretValue string) (string, error)

              Add a version to the given secret, possibly creating the secret first. Returns the version name, e.g. "/projects/*/secrets/*/versions/*".

              Directories

              Path Synopsis