Documentation
¶
Index ¶
- type AverageSpeed
- type Circuit
- type CircuitsPage
- type Client
- func (c *Client) GetAllCircuits(opts ...Option) ([]Circuit, error)
- func (c *Client) GetAllConstructorStandings(opts ...Option) ([]StandingsList, error)
- func (c *Client) GetAllConstructors(opts ...Option) ([]Constructor, error)
- func (c *Client) GetAllDriverStandings(opts ...Option) ([]StandingsList, error)
- func (c *Client) GetAllDrivers(opts ...Option) ([]Driver, error)
- func (c *Client) GetAllLaps(opts ...Option) ([]Race, error)
- func (c *Client) GetAllPitStops(opts ...Option) ([]Race, error)
- func (c *Client) GetAllQualifyingResults(opts ...Option) ([]Race, error)
- func (c *Client) GetAllRaces(opts ...Option) ([]Race, error)
- func (c *Client) GetAllResults(opts ...Option) ([]Race, error)
- func (c *Client) GetAllSeasons(opts ...Option) ([]Season, error)
- func (c *Client) GetAllSprintResults(opts ...Option) ([]Race, error)
- func (c *Client) GetAllStatus(opts ...Option) ([]Status, error)
- func (c *Client) GetCircuits(opts ...Option) (*CircuitsPage, error)
- func (c *Client) GetConstructorStandings(opts ...Option) (*ConstructorStandingPage, error)
- func (c *Client) GetConstructors(opts ...Option) (*ConstructorPage, error)
- func (c *Client) GetDriverStandings(opts ...Option) (*DriverStandingPage, error)
- func (c *Client) GetDrivers(opts ...Option) (*DriversPage, error)
- func (c *Client) GetLaps(opts ...Option) (*LapPage, error)
- func (c *Client) GetPitStops(opts ...Option) (*PitStopPage, error)
- func (c *Client) GetQualifyingResults(opts ...Option) (*QualifyingResultPage, error)
- func (c *Client) GetRaces(opts ...Option) (*RacePage, error)
- func (c *Client) GetResults(opts ...Option) (*RaceResultPage, error)
- func (c *Client) GetSeasons(opts ...Option) (*SeasonPage, error)
- func (c *Client) GetSprintResults(opts ...Option) (*SprintResultPage, error)
- func (c *Client) GetStatus(opts ...Option) (*StatusPage, error)
- type ClientOption
- type Constructor
- type ConstructorPage
- type ConstructorStanding
- type ConstructorStandingPage
- type Date
- type Driver
- type DriverStanding
- type DriverStandingPage
- type DriversPage
- type FastestLap
- type FloatString
- type IntString
- type Lap
- type LapPage
- type LapTime
- type LapTimeObject
- type Location
- type Option
- type PageInfo
- type PitStop
- type PitStopPage
- type QualifyingResult
- type QualifyingResultPage
- type Race
- type RacePage
- type RaceResultPage
- type Result
- type Season
- type SeasonPage
- type Session
- type SprintResultPage
- type StandingsList
- type Status
- type StatusPage
- type Timing
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AverageSpeed ¶
type CircuitsPage ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(opts ...ClientOption) *Client
func NewClientWithBaseURL ¶
func NewClientWithBaseURL(baseURL string, opts ...ClientOption) *Client
func (*Client) GetAllConstructorStandings ¶
func (c *Client) GetAllConstructorStandings(opts ...Option) ([]StandingsList, error)
func (*Client) GetAllConstructors ¶
func (c *Client) GetAllConstructors(opts ...Option) ([]Constructor, error)
func (*Client) GetAllDriverStandings ¶
func (c *Client) GetAllDriverStandings(opts ...Option) ([]StandingsList, error)
func (*Client) GetAllQualifyingResults ¶
func (*Client) GetAllSprintResults ¶
func (*Client) GetCircuits ¶
func (c *Client) GetCircuits(opts ...Option) (*CircuitsPage, error)
func (*Client) GetConstructorStandings ¶
func (c *Client) GetConstructorStandings(opts ...Option) (*ConstructorStandingPage, error)
func (*Client) GetConstructors ¶
func (c *Client) GetConstructors(opts ...Option) (*ConstructorPage, error)
func (*Client) GetDriverStandings ¶
func (c *Client) GetDriverStandings(opts ...Option) (*DriverStandingPage, error)
func (*Client) GetDrivers ¶
func (c *Client) GetDrivers(opts ...Option) (*DriversPage, error)
func (*Client) GetPitStops ¶
func (c *Client) GetPitStops(opts ...Option) (*PitStopPage, error)
func (*Client) GetQualifyingResults ¶
func (c *Client) GetQualifyingResults(opts ...Option) (*QualifyingResultPage, error)
func (*Client) GetResults ¶
func (c *Client) GetResults(opts ...Option) (*RaceResultPage, error)
func (*Client) GetSeasons ¶
func (c *Client) GetSeasons(opts ...Option) (*SeasonPage, error)
func (*Client) GetSprintResults ¶
func (c *Client) GetSprintResults(opts ...Option) (*SprintResultPage, error)
type ClientOption ¶
type ClientOption func(*Client)
func WitTimeout ¶
func WitTimeout(timeout time.Duration) ClientOption
type Constructor ¶
type ConstructorPage ¶
type ConstructorPage struct {
Constructors []Constructor
PageInfo PageInfo
}
type ConstructorStanding ¶
type ConstructorStanding struct {
Position IntString `json:"position"`
PositionText string `json:"positionText"`
Points FloatString `json:"points"`
Wins IntString `json:"wins"`
Constructor Constructor `json:"Constructor"`
}
type ConstructorStandingPage ¶
type ConstructorStandingPage struct {
StandingsLists []StandingsList
PageInfo PageInfo
}
type Date ¶
func (*Date) UnmarshalJSON ¶
type Driver ¶
type Driver struct {
DriverID string `json:"driverId"`
PermanentNumber IntString `json:"permanentNumber"`
Code string `json:"code"`
URL string `json:"url"`
GivenName string `json:"givenName"`
FamilyName string `json:"familyName"`
DateOfBirth Date `json:"dateOfBirth"`
Nationality string `json:"nationality"`
}
type DriverStanding ¶
type DriverStanding struct {
Position IntString `json:"position"`
PositionText string `json:"positionText"`
Points FloatString `json:"points"`
Wins IntString `json:"wins"`
Driver Driver `json:"Driver"`
Constructors []Constructor `json:"Constructors"`
}
type DriverStandingPage ¶
type DriverStandingPage struct {
StandingsLists []StandingsList
PageInfo PageInfo
}
type DriversPage ¶
type FastestLap ¶
type FastestLap struct {
Rank IntString `json:"rank"`
Lap IntString `json:"lap"`
Time LapTimeObject `json:"Time"`
AverageSpeed AverageSpeed `json:"AverageSpeed"`
}
type FloatString ¶
type FloatString float64
func (*FloatString) UnmarshalJSON ¶
func (f *FloatString) UnmarshalJSON(data []byte) error
type LapTime ¶
func (*LapTime) UnmarshalJSON ¶
type LapTimeObject ¶
type LapTimeObject struct {
LapTime `json:"time"`
}
func (*LapTimeObject) UnmarshalJSON ¶
func (l *LapTimeObject) UnmarshalJSON(data []byte) error
type Option ¶
type Option func(*requestOptions)
Option is a function that modifies the request options.
func WithConstructor ¶
func WithDriver ¶
func WithOffset ¶
func WithSeason ¶
type PageInfo ¶
func (PageInfo) NextOffset ¶
type PitStopPage ¶
type QualifyingResult ¶
type QualifyingResultPage ¶
type Race ¶
type Race struct {
Season IntString `json:"season"`
Round IntString `json:"round"`
URL string `json:"url"`
RaceName string `json:"raceName"`
Circuit Circuit `json:"Circuit"`
Date Date `json:"date"`
Time string `json:"time"`
Results []Result `json:"Results,omitempty"`
SprintResults []Result `json:"SprintResults,omitempty"`
PitStops []PitStop `json:"PitStops,omitempty"`
Laps []Lap `json:"Laps,omitempty"`
FirstPractice Session `json:"FirstPractice"`
SecondPractice Session `json:"SecondPractice"`
ThirdPractice Session `json:"ThirdPractice"`
Qualifying Session `json:"Qualifying"`
QualifyingResults []QualifyingResult `json:"QualifyingResults,omitempty"`
}
type RaceResultPage ¶
type Result ¶
type Result struct {
Number IntString `json:"number"`
Position IntString `json:"position"`
PositionText string `json:"positionText"`
Points FloatString `json:"points"`
Driver Driver `json:"Driver"`
Constructor Constructor `json:"Constructor"`
Grid IntString `json:"grid"`
Laps IntString `json:"laps"`
Status string `json:"status"`
Time struct {
Millis string `json:"millis"`
Time string `json:"time"`
} `json:"Time"`
FastestLap FastestLap `json:"FastestLap"`
}
type SeasonPage ¶
type SprintResultPage ¶
type StandingsList ¶
type StandingsList struct {
Season IntString `json:"season"`
Round IntString `json:"round"`
DriverStandings []DriverStanding `json:"DriverStandings,omitempty"`
ConstructorStandings []ConstructorStanding `json:"ConstructorStandings,omitempty"`
}
type StatusPage ¶
Click to show internal directories.
Click to hide internal directories.