f1gopherlib

package module
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

README

f1gopherlib

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogOutput

func SetLogOutput(w io.Writer)

Types

type F1GopherLib

type F1GopherLib interface {
	Name() string
	Session() Messages.SessionType
	CircuitTimezone() *time.Location
	SessionStart() time.Time

	SelectData(requestedData parser.DataSource)

	Weather() <-chan Messages.Weather
	RaceControlMessages() <-chan Messages.RaceControlMessage
	Timing() <-chan Messages.Timing
	Event() <-chan Messages.Event
	Telemetry() <-chan Messages.Telemetry
	Location() <-chan Messages.Location
	Time() <-chan Messages.EventTime
	Radio() <-chan Messages.Radio

	IncrementLap()
	IncrementTime(duration time.Duration)
	SkipToSessionStart()
	TogglePause()
	IsPaused() bool
}

func CreateLive

func CreateLive(requestedData parser.DataSource, archive string, cache string) (error, F1GopherLib)

func CreateLiveReplay

func CreateLiveReplay(requestedData parser.DataSource, replayFile string, event RaceEvent, cache string) (F1GopherLib, error)

func CreateReplay

func CreateReplay(
	requestedData parser.DataSource,
	event RaceEvent,
	cache string) (F1GopherLib, error)

type RaceEvent

type RaceEvent struct {
	Country   string
	RaceTime  time.Time
	EventTime time.Time
	Type      Messages.SessionType
	Name      string

	TrackName string
	// contains filtered or unexported fields
}

func CreateRaceEvent

func CreateRaceEvent(
	country string,
	raceTime time.Time,
	eventTime time.Time,
	sessionType Messages.SessionType,
	name string,
	track string,
	urlName string,
	timezone string) *RaceEvent

func NextSession

func NextSession() (RaceEvent, bool)

func RaceHistory

func RaceHistory() []RaceEvent

func (*RaceEvent) Timezone

func (r *RaceEvent) Timezone() *time.Location

func (*RaceEvent) Url

func (r *RaceEvent) Url() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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