utv

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchinisisToken

type ArchinisisToken interface {
	GetStatus(ctx context.Context, userID uuid.UUID) (bool, error)
	UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error
	DeleteToken(ctx context.Context, userID uuid.UUID) error
	GetSportIDs(ctx context.Context) ([]string, error)
}

ArchinisisToken interface

type ArchinisisTokenStore

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

func (*ArchinisisTokenStore) DeleteToken

func (s *ArchinisisTokenStore) DeleteToken(ctx context.Context, userID uuid.UUID) error

func (*ArchinisisTokenStore) GetSportIDs

func (s *ArchinisisTokenStore) GetSportIDs(ctx context.Context) ([]string, error)

func (*ArchinisisTokenStore) GetStatus

func (s *ArchinisisTokenStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, error)

func (*ArchinisisTokenStore) UpsertToken

func (s *ArchinisisTokenStore) UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error

type CoachtechData

type CoachtechData interface {
	GetStatus(ctx context.Context, userID uuid.UUID) (bool, error)
	GetData(ctx context.Context, userID uuid.UUID, after, before *time.Time) ([]json.RawMessage, error)
	InsertCoachtechID(ctx context.Context, userID uuid.UUID, coachtechID int32) error
	InsertCoachtechData(ctx context.Context, coachtechID int32, summaryDate time.Time, testID string, data json.RawMessage) error
}

CoachtechData interface

type CoachtechDataStore

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

func (*CoachtechDataStore) GetData

func (s *CoachtechDataStore) GetData(ctx context.Context, userID uuid.UUID, after, before *time.Time) ([]json.RawMessage, error)

func (*CoachtechDataStore) GetStatus

func (s *CoachtechDataStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, error)

func (*CoachtechDataStore) InsertCoachtechData

func (s *CoachtechDataStore) InsertCoachtechData(ctx context.Context, coachtechID int32, summaryDate time.Time, testID string, data json.RawMessage) error

func (*CoachtechDataStore) InsertCoachtechID

func (s *CoachtechDataStore) InsertCoachtechID(ctx context.Context, userID uuid.UUID, coachtechID int32) error

type DeviceInfo

type DeviceInfo struct {
	Connected  bool `json:"connected"`
	DataExists bool `json:"data_exists"`
}

type DeviceStatus

type DeviceStatus struct {
	Garmin DeviceInfo `json:"garmin"`
	Oura   DeviceInfo `json:"oura"`
	Polar  DeviceInfo `json:"polar"`
	Suunto DeviceInfo `json:"suunto"`
}

type GarminData

type GarminData interface {
	GetDates(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error)
	GetTypes(ctx context.Context, userID string, summaryDate string) ([]string, error)
	GetData(ctx context.Context, userID string, summaryDate string, key *string) (json.RawMessage, error)
	InsertData(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error
	DeleteAllData(ctx context.Context, userID uuid.UUID) (int64, error)
	GetLatestByType(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error)
	GetAllByType(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, limit, offset int32) ([]LatestDataEntry, error)
}

GarminData interface

type GarminDataStore

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

GarminDataStore struct

func (*GarminDataStore) DeleteAllData

func (s *GarminDataStore) DeleteAllData(ctx context.Context, userID uuid.UUID) (int64, error)

DeleteAllData deletes Garmin data for a specific user

func (*GarminDataStore) GetAllByType

func (s *GarminDataStore) GetAllByType(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, limit, offset int32) ([]LatestDataEntry, error)

GetAllByType

func (*GarminDataStore) GetData

func (s *GarminDataStore) GetData(ctx context.Context, userID string, Date string, key *string) (json.RawMessage, error)

Get all data for a specific date (or filter by key)

func (*GarminDataStore) GetDates

func (s *GarminDataStore) GetDates(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error)

Get available dates from Garmin data

func (*GarminDataStore) GetLatestByType

func (s *GarminDataStore) GetLatestByType(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error)

GetLatestByType

func (*GarminDataStore) GetTypes

func (s *GarminDataStore) GetTypes(ctx context.Context, userID string, summaryDate string) ([]string, error)

Get all JSON keys (types) from Garmin data for a specific date

func (*GarminDataStore) InsertData

func (s *GarminDataStore) InsertData(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error

insertData inserts Garmin data into the database

type GarminToken

type GarminToken interface {
	GetStatus(ctx context.Context, userID uuid.UUID) (bool, bool, error)
	UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error
	TokenExists(ctx context.Context, token string) (bool, error)
	GetUserIDByToken(ctx context.Context, token string) (uuid.UUID, error)
	DeleteToken(ctx context.Context, userID uuid.UUID) error
	GetTokensForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.GarminToken, error)
	GetDataForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.GarminToken, error)
	GetTokenJSON(ctx context.Context, userID uuid.UUID) (json.RawMessage, error)
}

GarminToken interface

type GarminTokenStore

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

func (*GarminTokenStore) DeleteToken

func (s *GarminTokenStore) DeleteToken(ctx context.Context, userID uuid.UUID) error

func (*GarminTokenStore) GetDataForUpdate

func (s *GarminTokenStore) GetDataForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.GarminToken, error)

func (*GarminTokenStore) GetStatus

func (s *GarminTokenStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, bool, error)

func (*GarminTokenStore) GetTokenJSON

func (s *GarminTokenStore) GetTokenJSON(ctx context.Context, userID uuid.UUID) (json.RawMessage, error)

func (*GarminTokenStore) GetTokensForUpdate

func (s *GarminTokenStore) GetTokensForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.GarminToken, error)

func (*GarminTokenStore) GetUserIDByToken

func (s *GarminTokenStore) GetUserIDByToken(ctx context.Context, token string) (uuid.UUID, error)

func (*GarminTokenStore) TokenExists

func (s *GarminTokenStore) TokenExists(ctx context.Context, token string) (bool, error)

func (*GarminTokenStore) UpsertToken

func (s *GarminTokenStore) UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error

type KlabToken

type KlabToken interface {
	GetStatus(ctx context.Context, userID uuid.UUID) (bool, error)
	UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error
	DeleteToken(ctx context.Context, userID uuid.UUID) error
	GetSportIDs(ctx context.Context) ([]string, error)
}

KlabToken interface

type KlabTokenStore

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

func (*KlabTokenStore) DeleteToken

func (s *KlabTokenStore) DeleteToken(ctx context.Context, userID uuid.UUID) error

func (*KlabTokenStore) GetSportIDs

func (s *KlabTokenStore) GetSportIDs(ctx context.Context) ([]string, error)

func (*KlabTokenStore) GetStatus

func (s *KlabTokenStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, error)

func (*KlabTokenStore) UpsertToken

func (s *KlabTokenStore) UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error

type LatestDataEntry

type LatestDataEntry struct {
	Device string
	Date   time.Time
	Data   json.RawMessage
}

LatestDataEntry struct to hold latest data entry

type OuraData

type OuraData interface {
	GetDates(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error)
	GetTypes(ctx context.Context, userID string, summaryDate string) ([]string, error)
	GetData(ctx context.Context, userID string, summaryDate string, key *string) (json.RawMessage, error)
	InsertData(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error
	DeleteAllData(ctx context.Context, userID uuid.UUID) (int64, error)
	GetLatestByType(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error)
	GetAllByType(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, limit, offset int32) ([]LatestDataEntry, error)
}

OuraData interface

type OuraDataStore

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

OuraDataStore struct

func (*OuraDataStore) DeleteAllData

func (s *OuraDataStore) DeleteAllData(ctx context.Context, userID uuid.UUID) (int64, error)

DeleteAllData deletes Oura data for a specific user

func (*OuraDataStore) GetAllByType

func (s *OuraDataStore) GetAllByType(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, limit, offset int32) ([]LatestDataEntry, error)

GetAllByType

func (*OuraDataStore) GetData

func (s *OuraDataStore) GetData(ctx context.Context, userID string, Date string, key *string) (json.RawMessage, error)

Get all data for a specific date (or filter by key)

func (*OuraDataStore) GetDates

func (s *OuraDataStore) GetDates(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error)

Get available dates from Oura data

func (*OuraDataStore) GetLatestByType

func (s *OuraDataStore) GetLatestByType(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error)

GetLatestByType

func (*OuraDataStore) GetTypes

func (s *OuraDataStore) GetTypes(ctx context.Context, userID string, summaryDate string) ([]string, error)

Get all JSON keys (types) from Oura data for a specific date

func (*OuraDataStore) InsertData

func (s *OuraDataStore) InsertData(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error

insertData inserts Oura data into the database

type OuraToken

type OuraToken interface {
	GetStatus(ctx context.Context, userID uuid.UUID) (bool, bool, error)
	UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error
	GetTokenByOuraID(ctx context.Context, ouraID string) (uuid.UUID, json.RawMessage, error)
	DeleteToken(ctx context.Context, userID uuid.UUID) error
	GetTokensForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.OuraToken, error)
	GetDataForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.OuraToken, error)
	GetAccessTokenJSON(ctx context.Context, userID uuid.UUID) (json.RawMessage, error)
}

OuraToken interface

type OuraTokenStore

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

func (*OuraTokenStore) DeleteToken

func (s *OuraTokenStore) DeleteToken(ctx context.Context, userID uuid.UUID) error

func (*OuraTokenStore) GetAccessTokenJSON

func (s *OuraTokenStore) GetAccessTokenJSON(ctx context.Context, userID uuid.UUID) (json.RawMessage, error)

func (*OuraTokenStore) GetDataForUpdate

func (s *OuraTokenStore) GetDataForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.OuraToken, error)

func (*OuraTokenStore) GetStatus

func (s *OuraTokenStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, bool, error)

func (*OuraTokenStore) GetTokenByOuraID

func (s *OuraTokenStore) GetTokenByOuraID(ctx context.Context, ouraID string) (uuid.UUID, json.RawMessage, error)

func (*OuraTokenStore) GetTokensForUpdate

func (s *OuraTokenStore) GetTokensForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.OuraToken, error)

func (*OuraTokenStore) UpsertToken

func (s *OuraTokenStore) UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error

type PolarData

type PolarData interface {
	GetDates(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error)
	GetTypes(ctx context.Context, userID string, summaryDate string) ([]string, error)
	GetData(ctx context.Context, userID string, summaryDate string, key *string) (json.RawMessage, error)
	InsertData(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error
	DeleteAllData(ctx context.Context, userID uuid.UUID) (int64, error)
	GetLatestByType(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error)
	GetAllByType(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, limit, offset int32) ([]LatestDataEntry, error)
}

PolarData interface

type PolarDataStore

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

PolarDataStore struct

func (*PolarDataStore) DeleteAllData

func (s *PolarDataStore) DeleteAllData(ctx context.Context, userID uuid.UUID) (int64, error)

DeleteAllData deletes Polar data for a specific user

func (*PolarDataStore) GetAllByType

func (s *PolarDataStore) GetAllByType(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, limit, offset int32) ([]LatestDataEntry, error)

GetAllByType

func (*PolarDataStore) GetData

func (s *PolarDataStore) GetData(ctx context.Context, userID string, Date string, key *string) (json.RawMessage, error)

Get all data for a specific date (or filter by key)

func (*PolarDataStore) GetDates

func (s *PolarDataStore) GetDates(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error)

Get available dates from Polar data

func (*PolarDataStore) GetLatestByType

func (s *PolarDataStore) GetLatestByType(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error)

GetLatestByType

func (*PolarDataStore) GetTypes

func (s *PolarDataStore) GetTypes(ctx context.Context, userID string, summaryDate string) ([]string, error)

Get all JSON keys (types) from Polar data for a specific date

func (*PolarDataStore) InsertData

func (s *PolarDataStore) InsertData(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error

insertData inserts Polar data into the database

type PolarToken

type PolarToken interface {
	GetStatus(ctx context.Context, userID uuid.UUID) (bool, bool, error)
	UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error
	GetTokenByPolarID(ctx context.Context, polarID string) (uuid.UUID, json.RawMessage, error)
	DeleteToken(ctx context.Context, userID uuid.UUID) error
	GetTokensForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.PolarToken, error)
	GetDataForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.PolarToken, error)
	GetTokenJSON(ctx context.Context, userID uuid.UUID) (json.RawMessage, error)
}

PolarToken interface

type PolarTokenStore

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

func (*PolarTokenStore) DeleteToken

func (s *PolarTokenStore) DeleteToken(ctx context.Context, userID uuid.UUID) error

func (*PolarTokenStore) GetDataForUpdate

func (s *PolarTokenStore) GetDataForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.PolarToken, error)

func (*PolarTokenStore) GetStatus

func (s *PolarTokenStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, bool, error)

func (*PolarTokenStore) GetTokenByPolarID

func (s *PolarTokenStore) GetTokenByPolarID(ctx context.Context, polarID string) (uuid.UUID, json.RawMessage, error)

func (*PolarTokenStore) GetTokenJSON

func (s *PolarTokenStore) GetTokenJSON(ctx context.Context, userID uuid.UUID) (json.RawMessage, error)

func (*PolarTokenStore) GetTokensForUpdate

func (s *PolarTokenStore) GetTokensForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.PolarToken, error)

func (*PolarTokenStore) UpsertToken

func (s *PolarTokenStore) UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error

type SourceCache

type SourceCache interface {
	GetAll(ctx context.Context) ([]utvsqlc.SourceCache, error)
	GetBySource(ctx context.Context, source string) (json.RawMessage, error)
	Upsert(ctx context.Context, source string, data json.RawMessage) error
}

type SourceCacheStore

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

func (*SourceCacheStore) GetAll

func (*SourceCacheStore) GetBySource

func (s *SourceCacheStore) GetBySource(ctx context.Context, source string) (json.RawMessage, error)

func (*SourceCacheStore) Upsert

func (s *SourceCacheStore) Upsert(ctx context.Context, source string, data json.RawMessage) error

type SuuntoData

type SuuntoData interface {
	GetDates(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error)
	GetTypes(ctx context.Context, userID string, summaryDate string) ([]string, error)
	GetData(ctx context.Context, userID string, summaryDate string, key *string) (json.RawMessage, error)
	InsertData(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error
	DeleteAllData(ctx context.Context, userID uuid.UUID) (int64, error)
	GetLatestByType(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error)
	GetAllByType(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, limit, offset int32) ([]LatestDataEntry, error)
}

SuuntoData interface

type SuuntoDataStore

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

SuuntoDataStore struct

func (*SuuntoDataStore) DeleteAllData

func (s *SuuntoDataStore) DeleteAllData(ctx context.Context, userID uuid.UUID) (int64, error)

DeleteAllData deletes Suunto data for a specific user

func (*SuuntoDataStore) GetAllByType

func (s *SuuntoDataStore) GetAllByType(ctx context.Context, userID uuid.UUID, typ string, after, before *time.Time, limit, offset int32) ([]LatestDataEntry, error)

GetAllByType

func (*SuuntoDataStore) GetData

func (s *SuuntoDataStore) GetData(ctx context.Context, userID string, Date string, key *string) (json.RawMessage, error)

Get all data for a specific date (or filter by key)

func (*SuuntoDataStore) GetDates

func (s *SuuntoDataStore) GetDates(ctx context.Context, userID string, startDate *string, endDate *string) ([]string, error)

Get available dates from Suunto data

func (*SuuntoDataStore) GetLatestByType

func (s *SuuntoDataStore) GetLatestByType(ctx context.Context, userID uuid.UUID, typ string, limit int32) ([]LatestDataEntry, error)

GetLatestByType

func (*SuuntoDataStore) GetTypes

func (s *SuuntoDataStore) GetTypes(ctx context.Context, userID string, summaryDate string) ([]string, error)

Get all JSON keys (types) from Suunto data for a specific date

func (*SuuntoDataStore) InsertData

func (s *SuuntoDataStore) InsertData(ctx context.Context, userID uuid.UUID, date time.Time, data json.RawMessage) error

insertData inserts Suunto data into the database

type SuuntoToken

type SuuntoToken interface {
	GetStatus(ctx context.Context, userID uuid.UUID) (bool, bool, error)
	UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error
	GetTokenByUsername(ctx context.Context, username string) (uuid.UUID, json.RawMessage, error)
	DeleteToken(ctx context.Context, userID uuid.UUID) error
	GetTokensForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.SuuntoToken, error)
	GetDataForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.SuuntoToken, error)
	GetAccessTokenJSON(ctx context.Context, userID uuid.UUID) (json.RawMessage, error)
}

SuuntoToken interface

type SuuntoTokenStore

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

func (*SuuntoTokenStore) DeleteToken

func (s *SuuntoTokenStore) DeleteToken(ctx context.Context, userID uuid.UUID) error

func (*SuuntoTokenStore) GetAccessTokenJSON

func (s *SuuntoTokenStore) GetAccessTokenJSON(ctx context.Context, userID uuid.UUID) (json.RawMessage, error)

func (*SuuntoTokenStore) GetDataForUpdate

func (s *SuuntoTokenStore) GetDataForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.SuuntoToken, error)

func (*SuuntoTokenStore) GetStatus

func (s *SuuntoTokenStore) GetStatus(ctx context.Context, userID uuid.UUID) (bool, bool, error)

func (*SuuntoTokenStore) GetTokenByUsername

func (s *SuuntoTokenStore) GetTokenByUsername(ctx context.Context, username string) (uuid.UUID, json.RawMessage, error)

func (*SuuntoTokenStore) GetTokensForUpdate

func (s *SuuntoTokenStore) GetTokensForUpdate(ctx context.Context, cutoff time.Time) ([]utvsqlc.SuuntoToken, error)

func (*SuuntoTokenStore) UpsertToken

func (s *SuuntoTokenStore) UpsertToken(ctx context.Context, userID uuid.UUID, data json.RawMessage) error

type UTVStorage

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

UTVStorage struct to hold table-specific storage

func NewUTVStorage

func NewUTVStorage(db *sql.DB) *UTVStorage

Storage for UTV database tables

func (*UTVStorage) ArchinisisToken

func (s *UTVStorage) ArchinisisToken() ArchinisisToken

func (*UTVStorage) Coachtech

func (s *UTVStorage) Coachtech() CoachtechData

func (*UTVStorage) Garmin

func (s *UTVStorage) Garmin() GarminData

func (*UTVStorage) GarminToken

func (s *UTVStorage) GarminToken() GarminToken

func (*UTVStorage) KlabToken

func (s *UTVStorage) KlabToken() KlabToken

func (*UTVStorage) Oura

func (s *UTVStorage) Oura() OuraData

Methods to return each table's storage interface

func (*UTVStorage) OuraToken

func (s *UTVStorage) OuraToken() OuraToken

func (*UTVStorage) Ping

func (s *UTVStorage) Ping(ctx context.Context) error

Ping method

func (*UTVStorage) Polar

func (s *UTVStorage) Polar() PolarData

func (*UTVStorage) PolarToken

func (s *UTVStorage) PolarToken() PolarToken

func (*UTVStorage) SourceCache

func (s *UTVStorage) SourceCache() SourceCache

func (*UTVStorage) Suunto

func (s *UTVStorage) Suunto() SuuntoData

func (*UTVStorage) SuuntoToken

func (s *UTVStorage) SuuntoToken() SuuntoToken

func (*UTVStorage) UserData

func (s *UTVStorage) UserData() UserData

type UserData

type UserData interface {
	GetUserData(ctx context.Context, userID uuid.UUID) (json.RawMessage, error)
	UpsertUserData(ctx context.Context, userID uuid.UUID, data json.RawMessage) error
	DeleteUserData(ctx context.Context, userID uuid.UUID) error
	GetUserIDBySportID(ctx context.Context, sportID string) (uuid.UUID, error)
	GetUserDeviceStatus(ctx context.Context, userID uuid.UUID) (DeviceStatus, error)
}

UserData interface

type UserDataStore

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

func (*UserDataStore) DeleteUserData

func (s *UserDataStore) DeleteUserData(ctx context.Context, userID uuid.UUID) error

func (*UserDataStore) GetUserData

func (s *UserDataStore) GetUserData(ctx context.Context, userID uuid.UUID) (json.RawMessage, error)

func (*UserDataStore) GetUserDeviceStatus

func (s *UserDataStore) GetUserDeviceStatus(ctx context.Context, userID uuid.UUID) (DeviceStatus, error)

func (*UserDataStore) GetUserIDBySportID

func (s *UserDataStore) GetUserIDBySportID(ctx context.Context, sportID string) (uuid.UUID, error)

func (*UserDataStore) UpsertUserData

func (s *UserDataStore) UpsertUserData(ctx context.Context, userID uuid.UUID, data json.RawMessage) error

Jump to

Keyboard shortcuts

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