Documentation
¶
Overview ¶
Package run holds the input and output types of the engine's run methods (run.create, run.result, run.state, run.outcome, run.ask, run.call and run.finding), for harnesses and other programs outside Physa's module that report on a run through client.
It imports nothing. The engine types its run methods with these same types, so a change to one is a change to the other.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AskIn ¶
type AskIn struct {
Repo string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
Run int64 `json:"run" desc:"The run's id."`
Question string `json:"question" desc:"What the harness asks."`
}
AskIn is run.ask's input.
type CallIn ¶
type CallIn struct {
Repo string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
Run int64 `json:"run" desc:"The run's id."`
Choice string `json:"choice" desc:"The call the harness made."`
Reason string `json:"reason" desc:"Why it made it."`
}
CallIn is run.call's input.
type CreateIn ¶
type CreateIn struct {
Repo string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
Pursuit string `json:"pursuit" desc:"The pursuit's slug."`
Change string `json:"change" desc:"The planned change the run works on."`
Level int `json:"level" desc:"The run's level, 0 to 3."`
}
CreateIn is run.create's input.
type FindingIn ¶
type FindingIn struct {
Repo string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
Run int64 `json:"run" desc:"The run's id."`
Check string `json:"check" desc:"The check that found it."`
Level string `json:"level" desc:"The finding's level."`
Text string `json:"text" desc:"What was found."`
}
FindingIn is run.finding's input.
type Out ¶
type Out struct {
ID int64 `json:"id" desc:"The run's id."`
Pursuit string `json:"pursuit" desc:"The pursuit's slug."`
Change string `json:"change" desc:"The planned change."`
PlanRevision int `json:"plan_revision" desc:"The plan's revision it was created from."`
Level int `json:"level" desc:"The run's level, 0 to 3."`
State string `` /* 129-byte string literal not displayed */
Branch string `json:"branch,omitempty" desc:"The branch of its work."`
Commit string `json:"commit,omitempty" desc:"The sha of its latest result."`
PR string `json:"pr,omitempty" desc:"The url of its pull request."`
EndReason string `json:"end_reason,omitempty" desc:"Why it ended in error, when given."`
StderrTail string `json:"stderr_tail,omitempty" desc:"The end of the harness's stderr."`
Started string `json:"started" desc:"When it started, RFC 3339 in UTC."`
Ended string `json:"ended,omitempty" desc:"When it ended, RFC 3339 in UTC; set by a result or an error, and left out until then."`
}
Out is a run.
type OutcomeIn ¶
type OutcomeIn struct {
Repo string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
Run int64 `json:"run" desc:"The run's id."`
Item int `json:"item" desc:"The acceptance item's place in the change's list, from 1."`
Verdict string `json:"verdict" desc:"passed, failed or judged."`
Commit string `json:"commit" desc:"The full sha the verdict is for."`
VouchedBy string `json:"vouched_by" desc:"Who vouches for the verdict; required."`
}
OutcomeIn is run.outcome's input.
type ReportOut ¶
type ReportOut struct {
ID int64 `json:"id" desc:"The report's id."`
Stale bool `json:"stale" desc:"True for an outcome whose commit is not the run's latest result's."`
SaidBy string `json:"said_by,omitempty" desc:"harness, on a finding: the harness's word, never Physa's."`
}
ReportOut is one thing a harness reported on a run.
type ResultIn ¶
type ResultIn struct {
Repo string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
Run int64 `json:"run" desc:"The run's id."`
Branch string `json:"branch" desc:"The branch the run's work is on."`
Commit string `json:"commit" desc:"The full sha of the run's latest commit."`
PR string `json:"pr" desc:"The url of the run's pull request."`
}
ResultIn is run.result's input.
type StateIn ¶
type StateIn struct {
Repo string `json:"repo" desc:"The repo, as an absolute path to it or to a directory inside it."`
Run int64 `json:"run" desc:"The run's id."`
State string `json:"state" desc:"working, blocked, done or error; only error ends the run."`
Reason string `json:"reason,omitempty" desc:"Why it ended in error; only with the state error."`
StderrTail string `json:"stderr_tail,omitempty" desc:"The end of the harness's stderr, kept to its last 4096 bytes."`
}
StateIn is run.state's input.