Documentation
¶
Overview ¶
Package bundle is the file that holds one flow run so another person can open it: the flow and the requests it used, the seed and inputs, the report with the outcome of each step, and the masked record of every call. It is a zip, so any tool can look inside.
Index ¶
Constants ¶
View Source
const Extension = ".flowi-run"
Extension is what a bundle file is named.
View Source
const Format = 1
Format is the version of the layout. A bundle with a higher one was made by a newer Flowi.
Variables ¶
View Source
var ErrNotBundle = errors.New("this is not a Flowi run bundle")
ErrNotBundle is returned for a file that is not a bundle.
Functions ¶
Types ¶
type Bundle ¶
type Bundle struct {
Manifest Manifest
Report report.Run
Records []engine.Record
// Files are the collection's files by slash-separated path relative to its root: the manifest, flows and
// requests, and nothing a run produced (examples, schemas, responses).
Files map[string][]byte
// Environment is the selected environment's file, with its secrets blank.
Environment []byte
// Sequence is the run drawn as a Mermaid sequence diagram, for anyone who opens the zip and wants the
// picture. It is derived from the report and never read back.
Sequence []byte
}
Bundle is a run and what it needs to be shown again.
type Manifest ¶
type Manifest struct {
Format int `json:"format"`
Flowi string `json:"flowi,omitempty"` // the version that wrote the bundle
Collection string `json:"collection"`
FlowID model.ID `json:"flow_id,omitempty"`
FlowPath string `json:"flow_path"`
FlowName string `json:"flow_name,omitempty"`
Env string `json:"env,omitempty"`
Seed uint64 `json:"seed"`
Inputs map[string]string `json:"inputs,omitempty"`
Status string `json:"status"`
At time.Time `json:"at"`
// Secrets are the names of the environment's secrets. Their values are never in a bundle; a replay
// supplies the mask in their place so that every template still renders.
Secrets []string `json:"secrets,omitempty"`
}
Manifest says what the run was.
Click to show internal directories.
Click to hide internal directories.