Help us shape the future of Go! Take the 2026 Go Developer Survey

bundle

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

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

func Write

func Write(w io.Writer, b Bundle) error

Write writes the bundle as a zip.

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.

func Read

func Read(data []byte) (Bundle, error)

Read reads a bundle. Every entry name is checked and sizes are capped, because the file may come from anyone.

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.

Jump to

Keyboard shortcuts

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