Versions in this module Expand all Collapse all v0 v0.3.0 Sep 18, 2026 Changes in this version type Capabilities + Calls []string v0.2.0 Sep 16, 2026 Changes in this version + const MaxHops + var ErrNotAllowed = errors.New("plugin: not allowed") + var ErrUnavailable = errors.New("plugin: not available") + func Attach(p Plugin, h Host) (detach func(), ok bool) + func Hops(ctx context.Context) int + type Answerer interface + Answer func(ctx context.Context, r Request) (Response, error) + type Asker interface + Connected func(host Host) type Capabilities + Asks []string + func (c Capabilities) MayAsk(target string) bool + type Host interface + Ask func(ctx context.Context, kind string, payload json.RawMessage) (json.RawMessage, error) type Request + From string + Hops int + Payload json.RawMessage type RequestKind + func (k RequestKind) Plugin() string type Response + Payload json.RawMessage v0.1.0 Sep 14, 2026 Changes in this version + const DispenseKey + const EnvDatabaseURL + const InterfaceVersion + const MagicCookieKey + const MagicCookieValue + const ManifestName + const MaxRoutes + const MigrationsDir + const Redacted + var ErrInvalid = errors.New("plugin: invalid") + var ErrNoAnswer = errors.New("plugin: no answer") + var ErrNoDatabase = errors.New("plugin: no database") + var ErrNotConfigured = errors.New("plugin: not configured") + var ErrUnsupported = errors.New("plugin: not supported by this plugin") + var Handshake = goplugin.HandshakeConfig + func CheckVersion(name string, built, host int) error + func ClientSet() goplugin.PluginSet + func DatabaseURL() (string, error) + func Serve(impl Plugin) + func ValidName(s string) bool + func ValidateSettings(settings []Setting) error + type Access string + const AccessAdmin + const AccessCustom + const AccessDriver + const AccessPublic + func (a Access) Valid() bool + type Caller struct + AdminEmail string + DriverName string + DriverSlug string + Remote string + func (c Caller) SignedIn() bool + type Capabilities struct + Database bool + Events []EventKind + HTTP *HTTPCapability + Network bool + ReadsDriverData bool + Requests []RequestKind + WritesFiles bool + func (c Capabilities) Answers(k RequestKind) bool + func (c Capabilities) Describe() []string + func (c Capabilities) Serves() bool + func (c Capabilities) Validate() error + func (c Capabilities) Wants(k EventKind) bool + type CarSetup struct + RearWing *SetupValue + Tyres []SetupTyre + UpdateCount int + Values []SetupValue + func (s CarSetup) TyreAt(w Wheel) (SetupTyre, bool) + func (s CarSetup) Value(name string) (SetupValue, bool) + type Choice struct + Label string + Note string + Value string + type Conditions struct + AirTempC float64 + Humidity float64 + Skies int + TrackTempC float64 + Wetness int + WindKmh float64 + type Corner struct + ApexKmh int + ApexPct int + BrakeAtApex int + DeficitKmh int + Pattern CornerPattern + ReferenceApexKmh int + ThrottleLag int + Turn int + type CornerPattern string + const PatternEarlyApex + const PatternLateBraking + const PatternSlowExit + type Direction string + const DirectionForward + const DirectionHigher + const DirectionLess + const DirectionLower + const DirectionMore + const DirectionRearward + const DirectionSofter + const DirectionStiffer + type Driver struct + ID int64 + Name string + Slug string + Team string + type Event struct + At time.Time + Driver Driver + ID string + Kind EventKind + Lap *LapFacts + Secrets Secrets + Session Session + Settings Values + Stint *StintFacts + TokenCeiling int + func (e Event) Validate() error + type EventKind string + const EventLapCompleted + const EventStintFinished + func (k EventKind) Valid() bool + type FuelSummary struct + PerLapL float64 + RemainingL float64 + UsedL float64 + type HTTPCapability struct + Routes []Route + Title string + func (h HTTPCapability) Describe() []string + func (h HTTPCapability) For(path string) (Access, bool) + func (h HTTPCapability) Validate() error + type HTTPRequest struct + BaseURL string + Body []byte + Caller Caller + Header http.Header + Method string + Path string + Prefix string + Query string + Secrets Secrets + Settings Values + func (r HTTPRequest) URL(path string) string + type HTTPResponse struct + Body []byte + Header http.Header + SignIn string + SignOut bool + Status int + Usage Usage + func HTML(status int, body string) HTTPResponse + func Redirect(status int, to string) HTTPResponse + func Text(status int, body string) HTTPResponse + type Kind string + const KindBool + const KindChoice + const KindNumber + const KindSecret + const KindText + func (k Kind) Valid() bool + type LapFacts struct + Corners []Corner + DeltaMs int + Kind LapKind + LapMs int + Number int + PersonalBest bool + Position *Position + Reference string + SpokenLap string + StartedAt time.Time + type LapKind string + const LapClean + const LapIn + const LapInvalid + const LapOut + type Manifest struct + Author string + Binary string + Capabilities Capabilities + Description string + InterfaceVersion int + Name string + Version string + func LoadManifest(dir string) (Manifest, error) + func ParseManifest(b []byte) (Manifest, error) + func (m Manifest) Executable(dir string) string + func (m Manifest) Validate() error + type Plugin interface + Answer func(ctx context.Context, r Request) (Response, error) + Notify func(ctx context.Context, e Event) (Usage, error) + Settings func(ctx context.Context) ([]Setting, error) + type Position struct + ClassPos int + GapAheadMs int + GapBehindMs int + type Request struct + Deadline time.Time + Driver Driver + ID string + Kind RequestKind + Lap *LapFacts + Secrets Secrets + Session Session + Settings Values + Stint *StintFacts + Symptom string + Text string + TokenCeiling int + Voice string + func (r Request) Validate() error + type RequestKind string + const RequestCueRace + const RequestCueTraining + const RequestDebrief + const RequestSetup + const RequestSpeak + func (k RequestKind) Valid() bool + type Response struct + Audio []byte + AudioType string + Changes []SetupChange + Kind RequestKind + PromptVersion string + Text string + Usage Usage + func (r Response) Validate() error + type Route struct + Access Access + Path string + Reason string + func (r Route) Covers(path string) bool + type Secret struct + func NewSecret(v string) Secret + func (s *Secret) UnmarshalJSON([]byte) error + func (s Secret) Empty() bool + func (s Secret) GoString() string + func (s Secret) LogValue() slog.Value + func (s Secret) MarshalJSON() ([]byte, error) + func (s Secret) String() string + func (s Secret) Value() string + type Secrets map[string]Secret + func (s Secrets) Get(name string) (Secret, bool) + func (s Secrets) Names() []string + type Server interface + ServeHTTP func(ctx context.Context, r HTTPRequest) (HTTPResponse, error) + type Session struct + Car string + CarClass string + Sim string + StartedAt time.Time + StintID string + Track string + TrackID string + Type SessionType + type SessionType string + const SessionPractice + const SessionQualifying + const SessionRace + const SessionTesting + type Setting struct + Choices []Choice + Default string + Help string + Kind Kind + Label string + Name string + Placeholder string + Required bool + func (s Setting) Validate() error + type SetupChange struct + Amount string + Area string + Direction Direction + Setting string + Why string + type SetupTyre struct + ColdKpa float64 + HotKpa float64 + TempInnerC float64 + TempMiddleC float64 + TempOuterC float64 + TreadInnerPct float64 + TreadMiddlePct float64 + TreadOuterPct float64 + Wheel Wheel + type SetupValue struct + Group string + Name string + Number float64 + Text string + Unit string + type StintFacts struct + AvgLapMs int + BestLapMs int + CleanLaps int + Conditions Conditions + ConsistencyPct int + FinishedAt time.Time + Fuel FuelSummary + Incidents int + Laps int + Setup *CarSetup + TopSpeedKmh int + Tyres TyreSummary + type TyreSummary struct + LF float64 + LR float64 + RF float64 + RR float64 + SpreadC float64 + type Usage struct + Cached bool + InputTokens int64 + Job string + Model string + OutputTokens int64 + func (u Usage) Spent() bool + func (u Usage) Total() int64 + func (u Usage) Validate() error + type Values map[string]string + func ValidateValues(settings []Setting, in Values) (Values, error) + func (v Values) Bool(name string) bool + func (v Values) Int(name string) (int, bool) + func (v Values) Names() []string + func (v Values) String(name string) string + type VersionError struct + Built int + Host int + Plugin string + func (e *VersionError) Error() string + func (e *VersionError) Is(target error) bool + type Wheel string + const WheelLF + const WheelLR + const WheelRF + const WheelRR