Versions in this module Expand all Collapse all v0 v0.2.0 Sep 16, 2026 Changes in this version + var ErrBadToken = errors.New("api: that token is not valid on this server") + var ErrNoToken = errors.New("api: no device token") + var ErrRevokedToken = errors.New("api: that device has been removed") type API + func (a *API) DriverByBearer(ctx context.Context, r *http.Request) (db.Driver, error) + type Running interface + Running func() []plugin.Manifest v0.1.0 Sep 14, 2026 Changes in this version + const DefaultScope + const DeviceLabelMax + const DiscoveryMaxAge + const FieldMaxCars + const FieldMaxSessions + const FieldQuietPeriod + const GlobalFieldPerSecond + const GlobalLivePerSecond + const GlobalOtherPerSecond + const GlobalReadsPerSecond + const GlobalWritesPerSecond + const IdempotencyHeader + const IdempotencyKeyMax + const IntervalBurst + const LiveMaxStints + const LiveTTL + const MaxCornersPerLap + const MaxIncidents + const MaxLapMs + const MaxLapNumber + const MaxNameLen + const MaxSectors + const MaxSetupKpa + const MaxSetupTempC + const MaxSetupTextLen + const MaxSetupUpdateCount + const MaxSetupValues + const MaxShortLen + const MaxSpeedKmh + const MaxTTSTextLen + const MinClient + const PairBurst + const PairIntervalS + const Prefix + const ReadBurst + const ReadsPerSecond + const SweepInterval + const TTSBurst + const TTSPerSecond + const WriteBurst + const WritesPerSecond + var EnterpriseFeatures = []wire.Feature + var ErrNoLiveSample = errors.New("api: no live sample for that stint") + func Discovery(settings config.Settings, features []wire.Feature) wire.Discovery + func Entitled(server []wire.Feature, _ int64) []wire.Feature + func Features(answering Answering, _ Keys) []wire.Feature + type API struct + func New(ctx context.Context, d Deps) (*API, error) + func (a *API) Field(trackID, sessionType string) (wire.FieldReport, time.Time, bool) + func (a *API) Invalidate() + func (a *API) Live(id db.UUID) (LiveSample, error) + func (a *API) Routes(mux *http.ServeMux) + func (a *API) Sweep(ctx context.Context, every time.Duration) + type Answering interface + Answering func(kind plugin.RequestKind) []string + type Asking interface + Ask func(ctx context.Context, r plugin.Request) (plugin.Response, error) + type Class int + const ClassField + const ClassLive + const ClassPair + const ClassRead + const ClassSummary + const ClassTTS + const ClassWrite + type Deps struct + Features func(Answering, Keys) []wire.Feature + Keyring *auth.Keyring + Log *slog.Logger + Now func() time.Time + OnRequest func(route string, status int, took time.Duration) + Plugins EventSink + Store *db.Store + type EventSink interface + Notify func(ctx context.Context, e plugin.Event) + type Keys struct + func OpenKeys(config.Settings, auth.SecretKey) Keys + type Limiter struct + func NewLimiter(l wire.Limits) *Limiter + func (l *Limiter) Allow(c Class, key string) (ok bool, retryAfterS int) + type LiveSample struct + At time.Time + DriverID int64 + Sample wire.LiveSample