Documentation
¶
Overview ¶
Package guide holds the pages probe guide prints: the reference and concept pages of the documentation, which the binary carries, and the description of an external action, which is read from where the action is.
The pages are given as a file system laid out as docs/content is, so that this package does not depend on where the binary keeps them.
Index ¶
Constants ¶
const ( GroupReference = "Reference" GroupActions = "Actions" GroupConcepts = "Concepts" GroupExternal = "External actions, read from GitHub" )
The groups the topics are listed under.
Variables ¶
This section is empty.
Functions ¶
func IsActionPath ¶
IsActionPath reports whether arg names an external action by where it is, rather than by a name, so that it is not looked for among the names of a workflow.
Types ¶
type Book ¶
type Book struct {
// contains filtered or unexported fields
}
Book is the pages of the documentation probe guide prints.
func New ¶
New returns the book of the pages in fsys, laid out as docs/content is: the reference pages under reference, those of the actions under reference/actions, and the concepts under guide/concepts. Only the pages of the built-in actions are expected to be there: an official action is described by its own repository.
func (*Book) Action ¶
Action returns the page probe guide prints for arg, a topic or an external action, with w the names of the workflow given, if one is. It is looked for in this order:
- A name the workflow gives under actions, so that the page is that of the action the workflow runs. A path there is taken from the directory of the workflow, as a run takes it.
- A local path, starting with ./ or ../ or absolute, taken from the working directory, or github.com/<owner>/<repo>[/<dir>][@<commit>].
- A topic of the pages of the book.
- An official action, read from github.com/mozership/probe-<name>.
An external action is described by what read returns, with the lines that tell where it comes from before it.
type OfficialAction ¶
OfficialAction is an external action published alongside Probe.
func OfficialActions ¶
func OfficialActions() []OfficialAction
OfficialActions lists the external actions published alongside Probe.
func (OfficialAction) Repository ¶
func (a OfficialAction) Repository() string
Repository is where the action is published.