models

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Circuit

type Circuit struct {
	CircuitName string `json:"circuitName"`
	Location    struct {
		Locality string `json:"locality"`
		Country  string `json:"country"`
		Lat      string `json:"lat"`
		Long     string `json:"long"`
	} `json:"Location"`
	URL string `json:"url"`
}

type DriverResult

type DriverResult struct {
	Position    string
	Driver      string
	Constructor string
	Time        string
	Status      string
	Points      string
}

type ErgastMRData

type ErgastMRData struct {
	RaceTable struct {
		Season string `json:"season"`
		Races  []Race `json:"Races"`
	} `json:"RaceTable"`
}

Ergast API response structure

type Race

type Race struct {
	Season         string   `json:"season"`
	Round          string   `json:"round"`
	RaceName       string   `json:"raceName"`
	Circuit        Circuit  `json:"Circuit"`
	Date           string   `json:"date"`
	Time           string   `json:"time"`
	FirstPractice  *Session `json:"FirstPractice,omitempty"`
	SecondPractice *Session `json:"SecondPractice,omitempty"`
	ThirdPractice  *Session `json:"ThirdPractice,omitempty"`
	Sprint         *Session `json:"Sprint,omitempty"`
	SprintShootout *Session `json:"SprintShootout,omitempty"`
	Qualifying     *Session `json:"Qualifying,omitempty"`
}

type ResultsView

type ResultsView struct {
	SessionName string
	RaceName    string
	Results     []DriverResult
	Loading     bool
	Error       error
}

type Session

type Session struct {
	Date string `json:"date"`
	Time string `json:"time"`
}

type SessionRow

type SessionRow struct {
	Title string
	Time  string
}

type UISession

type UISession struct {
	Kind  string
	Start time.Time
	End   time.Time
	URL   string
}

UI-specific session type

Jump to

Keyboard shortcuts

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