models

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 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 DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type ListActivitiesEnduranceOutdoorByTagParams

type ListActivitiesEnduranceOutdoorByTagParams struct {
	ProviderID int32
	UserID     uuid.UUID
	Tag        string
}

type NullVo2ProviderConnectionType

type NullVo2ProviderConnectionType struct {
	Vo2ProviderConnectionType Vo2ProviderConnectionType
	Valid                     bool // Valid is true if Vo2ProviderConnectionType is not NULL
}

func (*NullVo2ProviderConnectionType) Scan

func (ns *NullVo2ProviderConnectionType) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullVo2ProviderConnectionType) Value

Value implements the driver Valuer interface.

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetActivityEnduranceOutdoor

func (q *Queries) GetActivityEnduranceOutdoor(ctx context.Context, id uuid.UUID) (Vo2ActivitiesEnduranceOutdoor, error)

func (*Queries) GetActivityTags

func (q *Queries) GetActivityTags(ctx context.Context, activityID uuid.UUID) ([]Vo2ActivityTag, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type UpsertActivityEnduranceOutdoorParams

type UpsertActivityEnduranceOutdoorParams struct {
	ProviderID            int32
	UserID                uuid.UUID
	ProviderRawActivityID uuid.UUID
	Name                  string
	Description           sql.NullString
	Sport                 string
	StartTime             time.Time
	EndTime               time.Time
	IanaTimezone          sql.NullString
	UtcOffset             sql.NullInt32
	ElapsedTime           int32
	MovingTime            int32
	Distance              int32
	ElevGain              sql.NullInt32
	ElevLoss              sql.NullInt32
	AvgSpeed              float64
	AvgHr                 sql.NullInt32
	MaxHr                 sql.NullInt32
	SummaryPolyline       sql.NullString
	SummaryRoute          interface{}
	GpxFileUri            sql.NullString
	FitFileUri            sql.NullString
}

type Vo2ActivitiesEnduranceOutdoor

type Vo2ActivitiesEnduranceOutdoor struct {
	ID                    uuid.UUID
	ProviderID            int32
	UserID                uuid.UUID
	ProviderRawActivityID uuid.UUID
	// Name of the activity, as given by the original provider.
	Name string
	// Description of the activity, as given by the original provider.
	Description sql.NullString
	// Sport type of the activity. Endurance outdoor activities are: running, cycling, gravel cycling, hiking, and trail running.
	Sport string
	// Start time of the activity. Measured in UTC.
	StartTime time.Time
	// End time of the activity. Measured in UTC.
	EndTime time.Time
	// IANA timezone of the activity.
	IanaTimezone sql.NullString
	// UTC offset of the activity. Measured in seconds.
	UtcOffset sql.NullInt32
	// The overall elapsed time of the activity. Measured in seconds.
	ElapsedTime int32
	// The overall moving time of the activity. Measured in seconds.
	MovingTime int32
	// Distance of the activity. Measured in meters.
	Distance int32
	// Elevation gain of the activity. Measured in meters.
	ElevGain sql.NullInt32
	// Elevation loss of the activity. Measured in meters.
	ElevLoss sql.NullInt32
	// Average speed of the activity. Measured in meters per second.
	AvgSpeed float64
	// Average heart rate during the activity. Measured in beats per minute.
	AvgHr sql.NullInt32
	// Maximum heart rate during the activity. Measured in beats per minute.
	MaxHr sql.NullInt32
	// Summary polyline of the activity. Encoded in Google Polyline format.
	SummaryPolyline sql.NullString
	// Summary postgis geometry route of the activity.
	SummaryRoute interface{}
	// URI of the GPX file of the activity.
	GpxFileUri sql.NullString
	// URI of the FIT file of the activity.
	FitFileUri sql.NullString
	CreatedAt  sql.NullTime
	UpdatedAt  sql.NullTime
	DeletedAt  sql.NullTime
}

Endurance activities performed outdoors

type Vo2ActivitiesEnduranceOutdoorTag

type Vo2ActivitiesEnduranceOutdoorTag struct {
	ActivityID uuid.UUID
	TagID      int32
}

type Vo2ActivityTag

type Vo2ActivityTag struct {
	ID          int32
	Name        string
	Description sql.NullString
	CreatedAt   sql.NullTime
	UpdatedAt   sql.NullTime
	DeletedAt   sql.NullTime
}

type Vo2Provider

type Vo2Provider struct {
	ID             int32
	Name           string
	Slug           string
	ConnectionType Vo2ProviderConnectionType
	Description    sql.NullString
	CreatedAt      sql.NullTime
	UpdatedAt      sql.NullTime
	DeletedAt      sql.NullTime
}

type Vo2ProviderActivityRawDatum

type Vo2ProviderActivityRawDatum struct {
	ID                  uuid.UUID
	ProviderID          int32
	UserID              uuid.UUID
	ProviderActivityID  string
	StartTime           time.Time
	ElapsedTime         int32
	IanaTimezone        sql.NullString
	UtcOffset           sql.NullInt32
	Data                json.RawMessage
	DetailedActivityUri sql.NullString
	CreatedAt           sql.NullTime
	UpdatedAt           sql.NullTime
	DeletedAt           sql.NullTime
}

type Vo2ProviderConnectionType

type Vo2ProviderConnectionType string
const (
	Vo2ProviderConnectionTypeOauth2 Vo2ProviderConnectionType = "oauth2"
)

func (*Vo2ProviderConnectionType) Scan

func (e *Vo2ProviderConnectionType) Scan(src interface{}) error

type Vo2ProviderOauth2Credential

type Vo2ProviderOauth2Credential struct {
	ID           int32
	ProviderID   int32
	UserID       uuid.UUID
	AccessToken  string
	RefreshToken string
	ExpiresAt    time.Time
	CreatedAt    sql.NullTime
	UpdatedAt    sql.NullTime
	DeletedAt    sql.NullTime
}

type Vo2User

type Vo2User struct {
	ID             uuid.UUID
	ProviderID     int32
	UserExternalID string
	CreatedAt      sql.NullTime
	UpdatedAt      sql.NullTime
	DeletedAt      sql.NullTime
}

type Vo2WebhookVerification

type Vo2WebhookVerification struct {
	ID        int32
	Token     string
	CreatedAt sql.NullTime
	ExpiresAt time.Time
}

Jump to

Keyboard shortcuts

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