/
data.go
46 lines (40 loc) · 1.08 KB
/
data.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package main
type RaceData struct {
Extras []RaceExtras `json:"extras"`
NumberOfSessions int64 `json:"number_of_sessions"`
Players []Player `json:"players"`
Sessions []Session `json:"sessions"`
Track string `json:"track"`
}
type Session struct {
BestLaps []BestLap `json:"bestLaps"`
Duration int64 `json:"duration"`
Event int64 `json:"event"`
Laps []Lap `json:"laps"`
LapsCount int64 `json:"lapsCount"`
Lapstotal []int64 `json:"lapstotal"`
Name string `json:"name"`
Type int64 `json:"type"`
}
type Lap struct {
Car int64 `json:"car"`
Cuts int64 `json:"cuts"`
Lap int64 `json:"lap"`
Sectors []int64 `json:"sectors"`
Time int64 `json:"time"`
Tyre string `json:"tyre"`
}
type BestLap struct {
Car int64 `json:"car"`
Lap int64 `json:"lap"`
Time int64 `json:"time"`
}
type Player struct {
Car string `json:"car"`
Name string `json:"name"`
Skin string `json:"skin"`
}
type RaceExtras struct {
Name string `json:"name"`
Time int64 `json:"time"`
}