drivers

command
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

README

drivers

An example plugin other plugins ask. It knows which drivers are on the team — a list the operator types into its settings — and answers two questions:

Kind Question Answer
drivers.lookup {"slug": "ana-ruiz"} {"slug": "ana-ruiz", "known": true, "name": "Ana Ruiz"}
drivers.list none {"drivers": [{"slug": ..., "name": ...}, ...]}

The kinds are spelled with this plugin's name, so a question carries the name of the plugin that answers it and the server needs no table. The payloads are this plugin's to define, which is why they are documented here: the server carries them and reads neither.

examples/payments is the plugin that asks it.

Documentation

Overview

drivers is an example plugin that other plugins ask. It knows which drivers are on this team — a list the operator types into its settings — and answers two questions about them.

It is here to be the other half of examples/payments, which asks it whether the driver a payment names is one of the team's. Nothing below is clever; the thing worth reading is the shape. A plugin that answers declares its kinds in its manifest, spelled with its own name, and implements plugin.Answerer. The payload of a question and of an answer are this plugin's to define, and they are documented here because the server does not know them:

drivers.lookup   {"slug": "ana-ruiz"}   →  {"slug": "ana-ruiz", "known": true, "name": "Ana Ruiz"}
drivers.list     (no payload)           →  {"drivers": [{"slug": ..., "name": ...}, ...]}

Jump to

Keyboard shortcuts

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