tracks

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetTracksEndpoint

func NewGetTracksEndpoint(svc TracksService) http.Handler

func NewRouter

func NewRouter(svc TracksService, authMiddleware func(http.Handler) http.Handler) http.Handler

Types

type Track

type Track struct {
	ID                int64          `json:"id"`
	Name              string         `json:"name"`
	ConfigName        string         `json:"configName"`
	Category          string         `json:"category"`
	Location          string         `json:"location"`
	CornersPerLap     int            `json:"cornersPerLap"`
	LengthMiles       float64        `json:"lengthMiles"`
	Description       string         `json:"description"`
	LogoURL           string         `json:"logoUrl"`
	SmallImageURL     string         `json:"smallImageUrl"`
	LargeImageURL     string         `json:"largeImageUrl"`
	TrackMapURL       string         `json:"trackMapUrl"`
	TrackMapLayers    TrackMapLayers `json:"trackMapLayers"`
	IsDirt            bool           `json:"isDirt"`
	IsOval            bool           `json:"isOval"`
	HasNightLighting  bool           `json:"hasNightLighting"`
	RainEnabled       bool           `json:"rainEnabled"`
	FreeWithSub       bool           `json:"freeWithSubscription"`
	Retired           bool           `json:"retired"`
	PitRoadSpeedLimit int            `json:"pitRoadSpeedLimit"`
}

type TrackMapLayers

type TrackMapLayers struct {
	Background  string `json:"background"`
	Inactive    string `json:"inactive"`
	Active      string `json:"active"`
	Pitroad     string `json:"pitroad"`
	StartFinish string `json:"startFinish"`
	Turns       string `json:"turns"`
}

type TracksService

type TracksService interface {
	GetAll(ctx context.Context, accessToken string) ([]tracks.Track, error)
}

Jump to

Keyboard shortcuts

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