Documentation ¶
Index ¶
Constants ¶
View Source
const ( GT3 CarGroup = "GT3" GT4 = "GT4" GTC = "GTC" TCX = "TCX" )
View Source
const ( GTWorldChallenge CompetitionSeries = "GT World Challenge" IntercontinentalGTChallenge = "Intercontinental GT Challenge" BritishGTChampionship = "British GT Championship" AmericanTrackPack = "American Track Pack" )
Variables ¶
View Source
var ( // DriverCategories contains information on all available driver categories DriverCategories = []*DriverCategory{ {3, "Platinum"}, {2, "Gold"}, {1, "Silver"}, {0, "Bronze"}, } // CupCategories contains information on all available cup categories CupCategories = []*CupCategory{ {0, "Overall", color.RGBA{255, 255, 255, 255}, color.RGBA{0, 0, 0, 255}}, {1, "ProAm", color.RGBA{128, 128, 128, 255}, color.RGBA{0, 0, 0, 255}}, {2, "Am", color.RGBA{255, 0, 0, 255}, color.RGBA{0, 0, 0, 255}}, {3, "Silver", color.RGBA{128, 128, 128, 255}, color.RGBA{0, 0, 0, 255}}, {4, "National", color.RGBA{0, 0, 0, 255}, color.RGBA{255, 255, 255, 255}}, } )
View Source
var ( // CarModels contains information on all available car models CarModels = []*CarModel{ {12, "aston_martin", "Aston Martin", "V12 Vantage GT3", 2013, GT3}, {20, "aston_martin", "Aston Martin", "V8 Vantage GT3", 2019, GT3}, {3, "audi", "Audi", "R8 LMS", 2015, GT3}, {19, "audi", "Audi", "R8 LMS Evo", 2019, GT3}, {31, "audi", "Audi", "R8 LMS Evo II", 2022, GT3}, {11, "bentley", "Bentley", "Continental GT3", 2015, GT3}, {8, "bentley", "Bentley", "Continental GT3", 2018, GT3}, {30, "bmw", "BMW", "M4 GT3", 2022, GT3}, {7, "bmw", "BMW", "M6 GT3", 2017, GT3}, {14, "jaguar", "Emil Frey Jaguar", "G3", 2012, GT3}, {32, "ferrari", "Ferrari", "296 GT3", 2023, GT3}, {2, "ferrari", "Ferrari", "488 GT3", 2018, GT3}, {24, "ferrari", "Ferrari", "488 GT3 Evo", 2020, GT3}, {17, "honda", "Honda", "NSX GT3", 2017, GT3}, {21, "honda", "Honda", "NSX GT3 Evo", 2019, GT3}, {4, "lamborghini", "Lamborghini", "Huracan GT3", 2015, GT3}, {16, "lamborghini", "Lamborghini", "Huracan GT3 Evo", 2019, GT3}, {33, "lamborghini", "Lamborghini", "Huracan GT3 Evo2", 2023, GT3}, {15, "lexus", "Lexus", "RC F GT3", 2016, GT3}, {5, "mclaren", "McLaren", "650S GT3", 2015, GT3}, {22, "mclaren", "McLaren", "720S GT3", 2019, GT3}, {35, "mclaren", "McLaren", "720S GT3 Evo", 2023, GT3}, {1, "mercedes-amg", "Mercedes-AMG", "GT3", 2015, GT3}, {25, "mercedes-amg", "Mercedes-AMG", "GT3 2020", 2020, GT3}, {10, "nissan", "Nissan", "GT-R Nismo GT3", 2015, GT3}, {6, "nissan", "Nissan", "GT-R Nismo GT3", 2018, GT3}, {0, "porsche", "Porsche", "991 GT3 R", 2018, GT3}, {23, "porsche", "Porsche", "991 II GT3 R", 2019, GT3}, {34, "porsche", "Porsche", "992 GT3 R", 2023, GT3}, {13, "reiter_engineering", "Reiter Engineering", "R-EX GT3", 2017, GT3}, {50, "alpine", "Alpine", "A110 GT4", 2018, GT4}, {51, "aston_martin", "Aston Martin", "Vantage GT4", 2018, GT4}, {52, "audi", "Audi", "R8 LMS GT4", 2018, GT4}, {53, "bmw", "BMW", "M4 GT4", 2018, GT4}, {55, "chevrolet", "Chevrolet", "Camaro GT4.R", 2017, GT4}, {56, "ginetta", "Ginetta", "G55 GT4", 2012, GT4}, {57, "ktm", "KTM", "X-Bow GT4", 2016, GT4}, {58, "maserati", "Maserati", "GranTurismo MC GT4", 2016, GT4}, {59, "mclaren", "McLaren", "570S GT4", 2016, GT4}, {60, "mercedes-amg", "Mercedes-AMG", "GT4", 2016, GT4}, {61, "porsche", "Porsche", "718 Cayman GT4 Clubsport", 2019, GT4}, {26, "ferrari", "Ferrari", "488 Challenge Evo", 2020, GTC}, {18, "lamborghini", "Lamborghini", "Huracan Super Trofeo", 2015, GTC}, {29, "lamborghini", "Lamborghini", "Huracan Super Trofeo EVO2", 2021, GTC}, {9, "porsche", "Porsche", "991 II GT3 Cup", 2017, GTC}, {28, "porsche", "Porsche", "992 GT3 Cup", 2021, GTC}, {27, "bmw", "BMW", "M2 CS Racing", 2020, TCX}, } )
View Source
var ( // Tracks contains information on all supported tracks Tracks = []*Track{ {"monza", "Monza", Competition{GTWorldChallenge}, 29, 60, []string{"monza_2019", "monza_2020"}}, {"zolder", "Zolder", Competition{GTWorldChallenge}, 34, 50, []string{"zolder_2019", "zolder_2020"}}, {"brands_hatch", "Brands Hatch", Competition{GTWorldChallenge}, 32, 50, []string{"brands_hatch_2019", "brands_hatch_2020"}}, {"silverstone", "Silverstone", Competition{GTWorldChallenge}, 36, 60, []string{"silverstone_2019", "silverstone_2020"}}, {"paul_ricard", "Paul Ricard", Competition{GTWorldChallenge}, 33, 80, []string{"paul_ricard_2019", "paul_ricard_2020"}}, {"misano", "Misano", Competition{GTWorldChallenge}, 30, 50, []string{"misano_2019", "misano_2020"}}, {"spa", "Spa", Competition{GTWorldChallenge}, 82, 82, []string{"spa_2019", "spa_2020"}}, {"nurburgring", "Nurburgring", Competition{GTWorldChallenge}, 30, 50, []string{"nurburgring_2019", "nurburgring_2020"}}, {"barcelona", "Barcelona", Competition{GTWorldChallenge}, 29, 50, []string{"barcelona_2019", "barcelona_2020"}}, {"hungaroring", "Hungaroring", Competition{GTWorldChallenge}, 27, 50, []string{"hungaroring_2019", "hungaroring_2020"}}, {"zandvoort", "Zandvoort", Competition{GTWorldChallenge}, 25, 50, []string{"zandvoort_2019", "zandvoort_2020"}}, {"imola", "Imola", Competition{GTWorldChallenge}, 30, 50, []string{"imola_2019", "imola_2020"}}, {"valencia", "Valencia", Competition{GTWorldChallenge}, 30, 60, []string{}}, {"kyalami", "Kyalami", Competition{IntercontinentalGTChallenge}, 40, 50, []string{"kyalami_2019", "kyalami_2020"}}, {"mount_panorama", "Mount Panorama", Competition{IntercontinentalGTChallenge}, 36, 50, []string{"mount_panorama_2019", "mount_panorama_2020"}}, {"suzuka", "Suzuka", Competition{IntercontinentalGTChallenge}, 51, 105, []string{"suzuka_2019", "suzuka_2020"}}, {"laguna_seca", "Laguna Seca", Competition{IntercontinentalGTChallenge}, 30, 50, []string{"laguna_seca_2019", "laguna_seca_2020"}}, {"oulton_park", "Oulton Park", Competition{BritishGTChampionship}, 28, 50, []string{"oulton_park_2019", "oulton_park_2020"}}, {"donington", "Donington Park", Competition{BritishGTChampionship}, 37, 50, []string{"donington_2019", "donnington_2020"}}, {"snetterton", "Snetterton", Competition{BritishGTChampionship}, 26, 50, []string{"snetterton_2019", "snetterton_2020"}}, {"cota", "Circuit of the Americas", Competition{AmericanTrackPack}, 30, 70, []string{}}, {"indianapolis", "Indianapolis", Competition{AmericanTrackPack}, 30, 60, []string{}}, {"watkins_glen", "Watkins Glen", Competition{AmericanTrackPack}, 30, 60, []string{}}, } )
Functions ¶
This section is empty.
Types ¶
type CarModel ¶
type CarModel struct { // ID is the numerical ID of this car ID int // ManufacturerLabel is the label of the car manufacturer ManufacturerLabel string // Manufacturer is the manufacturer of the car Manufacturer string // Model is the name of the car model Model string // Year is the year in which the car model was made available Year int // Group is the group to which this car model belongs Group CarGroup }
CarModel describes a single car model
func CarModelByID ¶
CarModelByID returns the car model with the given ID
type Competition ¶
type Competition struct { // Series is the series to which this competition belongs Series CompetitionSeries }
Competition describes a single competition
type CompetitionSeries ¶
type CompetitionSeries string
CompetitionSeries is a name for a series of competitions
type CupCategory ¶
type CupCategory struct { // ID is the numerical ID of this category ID int // Name is the name of this category Name string // Color is the color used to indicate this category in driver numbers Color color.RGBA // TextColor is a text color that can be used for the driver numbers if the background is Color TextColor color.RGBA }
CupCategory describes a single cup category
func CupCategoryByID ¶
func CupCategoryByID(ID int) *CupCategory
CupCategoryByID returns the driver category with the given ID
type DriverCategory ¶
type DriverCategory struct { // ID is the numerical ID of this category ID int // Name is the name of this category Name string }
DriverCategory describes a single driver category
func DriverCategoryByID ¶
func DriverCategoryByID(ID int) *DriverCategory
DriverCategoryByID returns the driver category with the given ID
type Track ¶
type Track struct { // Label is the label used for the track in server configuration or results Label string // Name is the properly formatted name for this track Name string // Competition indicates to which competition this track belongs Competition Competition // NrPitBoxes is the number of unique pit boxes on the track NrPitBoxes int // PrivateServerSlots indicates how many car slots are available for this // track on private servers PrivateServerSlots int // AlternateLabels are alternate labels used for this track, possibly used // in older server versions AlternateLabels []string }
Track represents a single track in the game
func TrackByLabel ¶
TrackByLabel returns the track for a given label
Click to show internal directories.
Click to hide internal directories.