Versions in this module Expand all Collapse all v1 v1.3.0 Dec 17, 2025 Changes in this version + type ArchinisisToken interface + DeleteToken func(ctx context.Context, userID uuid.UUID) error + GetSportIDs func(ctx context.Context) ([]string, error) + GetStatus func(ctx context.Context, userID uuid.UUID) (bool, error) + UpsertToken func(ctx context.Context, userID uuid.UUID, data json.RawMessage) error + type ArchinisisTokenStore struct + func (s *ArchinisisTokenStore) DeleteToken(ctx context.Context, userID uuid.UUID) error + func (s *ArchinisisTokenStore) GetSportIDs(ctx context.Context) ([]string, error) + func (s *ArchinisisTokenStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, error) + func (s *ArchinisisTokenStore) UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error + type CoachtechData interface + GetData func(ctx context.Context, userID uuid.UUID, after, before *time.Time) ([]json.RawMessage, error) + GetStatus func(ctx context.Context, userID uuid.UUID) (bool, error) + InsertCoachtechData func(ctx context.Context, coachtechID int32, summaryDate time.Time, testID string, ...) error + InsertCoachtechID func(ctx context.Context, userID uuid.UUID, coachtechID int32) error + type CoachtechDataStore struct + func (s *CoachtechDataStore) GetData(ctx context.Context, userID uuid.UUID, after, before *time.Time) ([]json.RawMessage, error) + func (s *CoachtechDataStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, error) + func (s *CoachtechDataStore) InsertCoachtechData(ctx context.Context, coachtechID int32, summaryDate time.Time, testID string, ...) error + func (s *CoachtechDataStore) InsertCoachtechID(ctx context.Context, userID uuid.UUID, coachtechID int32) error + type DeviceInfo struct + Connected bool + DataExists bool + type DeviceStatus struct + Garmin DeviceInfo + Oura DeviceInfo + Polar DeviceInfo + Suunto DeviceInfo + type GarminData interface + DeleteAllData func(ctx context.Context, userID uuid.UUID) (int64, error) + GetAllByType func(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, ...) ([]LatestDataEntry, error) + GetData func(ctx context.Context, userID string, summaryDate string, key *string) (json.RawMessage, error) + GetDates func(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error) + GetLatestByType func(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error) + GetTypes func(ctx context.Context, userID string, summaryDate string) ([]string, error) + InsertData func(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error + type GarminDataStore struct + func (s *GarminDataStore) DeleteAllData(ctx context.Context, userID uuid.UUID) (int64, error) + func (s *GarminDataStore) GetAllByType(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, ...) ([]LatestDataEntry, error) + func (s *GarminDataStore) GetData(ctx context.Context, userID string, Date string, key *string) (json.RawMessage, error) + func (s *GarminDataStore) GetDates(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error) + func (s *GarminDataStore) GetLatestByType(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error) + func (s *GarminDataStore) GetTypes(ctx context.Context, userID string, summaryDate string) ([]string, error) + func (s *GarminDataStore) InsertData(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error + type GarminToken interface + DeleteToken func(ctx context.Context, userID uuid.UUID) error + GetDataForUpdate func(ctx context.Context, cutoff time.Time) ([]utvsqlc.GarminToken, error) + GetStatus func(ctx context.Context, userID uuid.UUID) (bool, bool, error) + GetTokenJSON func(ctx context.Context, userID uuid.UUID) (json.RawMessage, error) + GetTokensForUpdate func(ctx context.Context, cutoff time.Time) ([]utvsqlc.GarminToken, error) + GetUserIDByToken func(ctx context.Context, token string) (uuid.UUID, error) + TokenExists func(ctx context.Context, token string) (bool, error) + UpsertToken func(ctx context.Context, userID uuid.UUID, data json.RawMessage) error + type GarminTokenStore struct + func (s *GarminTokenStore) DeleteToken(ctx context.Context, userID uuid.UUID) error + func (s *GarminTokenStore) GetDataForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.GarminToken, error) + func (s *GarminTokenStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, bool, error) + func (s *GarminTokenStore) GetTokenJSON(ctx context.Context, userID uuid.UUID) (json.RawMessage, error) + func (s *GarminTokenStore) GetTokensForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.GarminToken, error) + func (s *GarminTokenStore) GetUserIDByToken(ctx context.Context, token string) (uuid.UUID, error) + func (s *GarminTokenStore) TokenExists(ctx context.Context, token string) (bool, error) + func (s *GarminTokenStore) UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error + type KlabToken interface + DeleteToken func(ctx context.Context, userID uuid.UUID) error + GetSportIDs func(ctx context.Context) ([]string, error) + GetStatus func(ctx context.Context, userID uuid.UUID) (bool, error) + UpsertToken func(ctx context.Context, userID uuid.UUID, data json.RawMessage) error + type KlabTokenStore struct + func (s *KlabTokenStore) DeleteToken(ctx context.Context, userID uuid.UUID) error + func (s *KlabTokenStore) GetSportIDs(ctx context.Context) ([]string, error) + func (s *KlabTokenStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, error) + func (s *KlabTokenStore) UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error + type LatestDataEntry struct + Data json.RawMessage + Date time.Time + Device string + type OuraData interface + DeleteAllData func(ctx context.Context, userID uuid.UUID) (int64, error) + GetAllByType func(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, ...) ([]LatestDataEntry, error) + GetData func(ctx context.Context, userID string, summaryDate string, key *string) (json.RawMessage, error) + GetDates func(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error) + GetLatestByType func(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error) + GetTypes func(ctx context.Context, userID string, summaryDate string) ([]string, error) + InsertData func(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error + type OuraDataStore struct + func (s *OuraDataStore) DeleteAllData(ctx context.Context, userID uuid.UUID) (int64, error) + func (s *OuraDataStore) GetAllByType(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, ...) ([]LatestDataEntry, error) + func (s *OuraDataStore) GetData(ctx context.Context, userID string, Date string, key *string) (json.RawMessage, error) + func (s *OuraDataStore) GetDates(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error) + func (s *OuraDataStore) GetLatestByType(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error) + func (s *OuraDataStore) GetTypes(ctx context.Context, userID string, summaryDate string) ([]string, error) + func (s *OuraDataStore) InsertData(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error + type OuraToken interface + DeleteToken func(ctx context.Context, userID uuid.UUID) error + GetAccessTokenJSON func(ctx context.Context, userID uuid.UUID) (json.RawMessage, error) + GetDataForUpdate func(ctx context.Context, cutoff time.Time) ([]utvsqlc.OuraToken, error) + GetStatus func(ctx context.Context, userID uuid.UUID) (bool, bool, error) + GetTokenByOuraID func(ctx context.Context, ouraID string) (uuid.UUID, json.RawMessage, error) + GetTokensForUpdate func(ctx context.Context, cutoff time.Time) ([]utvsqlc.OuraToken, error) + UpsertToken func(ctx context.Context, userID uuid.UUID, data json.RawMessage) error + type OuraTokenStore struct + func (s *OuraTokenStore) DeleteToken(ctx context.Context, userID uuid.UUID) error + func (s *OuraTokenStore) GetAccessTokenJSON(ctx context.Context, userID uuid.UUID) (json.RawMessage, error) + func (s *OuraTokenStore) GetDataForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.OuraToken, error) + func (s *OuraTokenStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, bool, error) + func (s *OuraTokenStore) GetTokenByOuraID(ctx context.Context, ouraID string) (uuid.UUID, json.RawMessage, error) + func (s *OuraTokenStore) GetTokensForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.OuraToken, error) + func (s *OuraTokenStore) UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error + type PolarData interface + DeleteAllData func(ctx context.Context, userID uuid.UUID) (int64, error) + GetAllByType func(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, ...) ([]LatestDataEntry, error) + GetData func(ctx context.Context, userID string, summaryDate string, key *string) (json.RawMessage, error) + GetDates func(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error) + GetLatestByType func(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error) + GetTypes func(ctx context.Context, userID string, summaryDate string) ([]string, error) + InsertData func(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error + type PolarDataStore struct + func (s *PolarDataStore) DeleteAllData(ctx context.Context, userID uuid.UUID) (int64, error) + func (s *PolarDataStore) GetAllByType(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, ...) ([]LatestDataEntry, error) + func (s *PolarDataStore) GetData(ctx context.Context, userID string, Date string, key *string) (json.RawMessage, error) + func (s *PolarDataStore) GetDates(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error) + func (s *PolarDataStore) GetLatestByType(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error) + func (s *PolarDataStore) GetTypes(ctx context.Context, userID string, summaryDate string) ([]string, error) + func (s *PolarDataStore) InsertData(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error + type PolarToken interface + DeleteToken func(ctx context.Context, userID uuid.UUID) error + GetDataForUpdate func(ctx context.Context, cutoff time.Time) ([]utvsqlc.PolarToken, error) + GetStatus func(ctx context.Context, userID uuid.UUID) (bool, bool, error) + GetTokenByPolarID func(ctx context.Context, polarID string) (uuid.UUID, json.RawMessage, error) + GetTokenJSON func(ctx context.Context, userID uuid.UUID) (json.RawMessage, error) + GetTokensForUpdate func(ctx context.Context, cutoff time.Time) ([]utvsqlc.PolarToken, error) + UpsertToken func(ctx context.Context, userID uuid.UUID, data json.RawMessage) error + type PolarTokenStore struct + func (s *PolarTokenStore) DeleteToken(ctx context.Context, userID uuid.UUID) error + func (s *PolarTokenStore) GetDataForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.PolarToken, error) + func (s *PolarTokenStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, bool, error) + func (s *PolarTokenStore) GetTokenByPolarID(ctx context.Context, polarID string) (uuid.UUID, json.RawMessage, error) + func (s *PolarTokenStore) GetTokenJSON(ctx context.Context, userID uuid.UUID) (json.RawMessage, error) + func (s *PolarTokenStore) GetTokensForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.PolarToken, error) + func (s *PolarTokenStore) UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error + type SourceCache interface + GetAll func(ctx context.Context) ([]utvsqlc.SourceCache, error) + GetBySource func(ctx context.Context, source string) (json.RawMessage, error) + Upsert func(ctx context.Context, source string, data json.RawMessage) error + type SourceCacheStore struct + func (s *SourceCacheStore) GetAll(ctx context.Context) ([]utvsqlc.SourceCache, error) + func (s *SourceCacheStore) GetBySource(ctx context.Context, source string) (json.RawMessage, error) + func (s *SourceCacheStore) Upsert(ctx context.Context, source string, data json.RawMessage) error + type SuuntoData interface + DeleteAllData func(ctx context.Context, userID uuid.UUID) (int64, error) + GetAllByType func(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, ...) ([]LatestDataEntry, error) + GetData func(ctx context.Context, userID string, summaryDate string, key *string) (json.RawMessage, error) + GetDates func(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error) + GetLatestByType func(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error) + GetTypes func(ctx context.Context, userID string, summaryDate string) ([]string, error) + InsertData func(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error + type SuuntoDataStore struct + func (s *SuuntoDataStore) DeleteAllData(ctx context.Context, userID uuid.UUID) (int64, error) + func (s *SuuntoDataStore) GetAllByType(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, ...) ([]LatestDataEntry, error) + func (s *SuuntoDataStore) GetData(ctx context.Context, userID string, Date string, key *string) (json.RawMessage, error) + func (s *SuuntoDataStore) GetDates(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error) + func (s *SuuntoDataStore) GetLatestByType(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error) + func (s *SuuntoDataStore) GetTypes(ctx context.Context, userID string, summaryDate string) ([]string, error) + func (s *SuuntoDataStore) InsertData(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error + type SuuntoToken interface + DeleteToken func(ctx context.Context, userID uuid.UUID) error + GetAccessTokenJSON func(ctx context.Context, userID uuid.UUID) (json.RawMessage, error) + GetDataForUpdate func(ctx context.Context, cutoff time.Time) ([]utvsqlc.SuuntoToken, error) + GetStatus func(ctx context.Context, userID uuid.UUID) (bool, bool, error) + GetTokenByUsername func(ctx context.Context, username string) (uuid.UUID, json.RawMessage, error) + GetTokensForUpdate func(ctx context.Context, cutoff time.Time) ([]utvsqlc.SuuntoToken, error) + UpsertToken func(ctx context.Context, userID uuid.UUID, data json.RawMessage) error + type SuuntoTokenStore struct + func (s *SuuntoTokenStore) DeleteToken(ctx context.Context, userID uuid.UUID) error + func (s *SuuntoTokenStore) GetAccessTokenJSON(ctx context.Context, userID uuid.UUID) (json.RawMessage, error) + func (s *SuuntoTokenStore) GetDataForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.SuuntoToken, error) + func (s *SuuntoTokenStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, bool, error) + func (s *SuuntoTokenStore) GetTokenByUsername(ctx context.Context, username string) (uuid.UUID, json.RawMessage, error) + func (s *SuuntoTokenStore) GetTokensForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.SuuntoToken, error) + func (s *SuuntoTokenStore) UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error + type UTVStorage struct + func NewUTVStorage(db *sql.DB) *UTVStorage + func (s *UTVStorage) ArchinisisToken() ArchinisisToken + func (s *UTVStorage) Coachtech() CoachtechData + func (s *UTVStorage) Garmin() GarminData + func (s *UTVStorage) GarminToken() GarminToken + func (s *UTVStorage) KlabToken() KlabToken + func (s *UTVStorage) Oura() OuraData + func (s *UTVStorage) OuraToken() OuraToken + func (s *UTVStorage) Ping(ctx context.Context) error + func (s *UTVStorage) Polar() PolarData + func (s *UTVStorage) PolarToken() PolarToken + func (s *UTVStorage) SourceCache() SourceCache + func (s *UTVStorage) Suunto() SuuntoData + func (s *UTVStorage) SuuntoToken() SuuntoToken + func (s *UTVStorage) UserData() UserData + type UserData interface + DeleteUserData func(ctx context.Context, userID uuid.UUID) error + GetUserData func(ctx context.Context, userID uuid.UUID) (json.RawMessage, error) + GetUserDeviceStatus func(ctx context.Context, userID uuid.UUID) (DeviceStatus, error) + GetUserIDBySportID func(ctx context.Context, sportID string) (uuid.UUID, error) + UpsertUserData func(ctx context.Context, userID uuid.UUID, data json.RawMessage) error + type UserDataStore struct + func (s *UserDataStore) DeleteUserData(ctx context.Context, userID uuid.UUID) error + func (s *UserDataStore) GetUserData(ctx context.Context, userID uuid.UUID) (json.RawMessage, error) + func (s *UserDataStore) GetUserDeviceStatus(ctx context.Context, userID uuid.UUID) (DeviceStatus, error) + func (s *UserDataStore) GetUserIDBySportID(ctx context.Context, sportID string) (uuid.UUID, error) + func (s *UserDataStore) UpsertUserData(ctx context.Context, userID uuid.UUID, data json.RawMessage) error