Documentation
¶
Overview ¶
Package driver runs a project's tracker driver: an executable at .f10/driver satisfying the verb contract in docs/driver-contract.md.
f10 specifies that contract and implements none of it. What a driver talks to - Notion, Jira, a wiki, a spreadsheet - is the project's business, and so is the language it is written in. The one thing f10 fixes is the shape of the conversation: a verb, an argument, data on stdout, and a reserved exit code for a verb the driver does not offer.
Drivers return data and never act. f10 performs every side effect, which is what lets `open` mean the same thing for a task as for a pull request, where no driver is involved at all.
Index ¶
Constants ¶
const ( VerbRead = "read" // stdout: the task as markdown VerbURL = "url" // stdout: one url VerbSearch = "search" // stdout: JSON rows, one task each VerbBranch = "branch" // stdout: one branch name, never created VerbChildren = "children" // stdout: JSON rows, one subtask each VerbIndex = "index" // stdout: one url, the task list; no argument VerbList = "list" // stdout: JSON rows, the first page of open tasks; no argument )
Verbs a driver may implement.
const ExitUnsupported = 3
ExitUnsupported is the contract's reserved exit code: the driver ran and understood the call, but does not implement that verb. It is a normal answer, not a failure, so a driver can offer `read` without `search`.
Variables ¶
var ErrUnsupported = errors.New("driver does not implement this verb")
ErrUnsupported reports the reserved exit code back to the caller, which then falls back or explains, rather than failing the command.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
A Driver is one project's executable.
func Find ¶
Find returns the driver for a storage root, or nil when the project has none - the ordinary case, which callers answer by falling back to the host's issues.