flows

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const Format = "flows/1"

Format is what this package writes under specrig: and the newest it reads.

View Source
const IndexFormat = "index/1"

IndexFormat is what Assemble writes under specrig: and the newest it reads.

Variables

This section is empty.

Functions

func Assemble

func Assemble(root, path string) (files map[string][]byte, foreign []string, err error)

Assemble builds the index at path and a page per input a flow reaches beside it, keeping the prose the index at path already has. Foreign are the files at a record's path it took for somebody else's.

func Complete

func Complete() bool

Complete says whether the suite ran whole: a narrowed run saw part of the service, and its document would lose the rest.

func Generated

func Generated(page []byte) bool

Generated says whether a page is one Assemble writes.

func LinkChanges

func LinkChanges(was, now []byte) []string

LinkChanges says, between two versions of an index, which links between services were lost and which appeared: the reason a page changed.

func Run added in v0.2.0

func Run(root, path string, out io.Writer) error

Run writes what Assemble builds that is not on disk already, removes a page it wrote before and would not now, and says what it did on out. It fails on prose that lost its flow and on what the services' records leave unclosed.

func Write

func Write(path, service string, records []trace.Record) error

Write rewrites the document at path from what the suite traced, keeping its prose. The cases are read from ./feature.

Types

type Branch

type Branch struct {
	Sends       []string            `yaml:"sends,omitempty"`
	Sent        map[string][]string `yaml:"sent,omitempty"`
	Refusal     string              `yaml:"refused,omitempty"`
	Description string              `yaml:"description,omitempty"`
	Cases       []string            `yaml:"cases"`
}

type Doc

type Doc struct {
	Specrig  string   `yaml:"specrig"`
	Service  string   `yaml:"service"`
	Inputs   []Input  `yaml:"inputs"`
	Outputs  []Output `yaml:"outputs,omitempty"`
	Orphaned []Orphan `yaml:"orphaned,omitempty"`
}

type Flow

type Flow struct {
	Id          string   `yaml:"id"`
	Title       string   `yaml:"title,omitempty"`
	Description string   `yaml:"description,omitempty"`
	Entry       string   `yaml:"entry"`
	From        []string `yaml:"from,omitempty"`
	Steps       []string `yaml:"steps"`
}

type Index

type Index struct {
	Specrig  string          `yaml:"specrig"`
	Flows    []Flow          `yaml:"flows"`
	Links    []Link          `yaml:"links,omitempty"`
	Untested []string        `yaml:"untested,omitempty"`
	Outside  []string        `yaml:"outside,omitempty"`
	System   *surface.Report `yaml:"system,omitempty"`
	Orphaned []Orphan        `yaml:"orphaned,omitempty"`
}

type Input

type Input struct {
	Message     string              `yaml:"message"`
	Description string              `yaml:"description,omitempty"`
	Fields      []string            `yaml:"fields,omitempty"`
	Needs       map[string][]string `yaml:"needs,omitempty"`
	Branches    []Branch            `yaml:"branches"`
}
type Link struct {
	From    string   `yaml:"from"`
	To      string   `yaml:"to"`
	Message string   `yaml:"message"`
	Notes   []string `yaml:"notes,omitempty"`
}

type Orphan

type Orphan struct {
	Anchor      string `yaml:"anchor"`
	Title       string `yaml:"title,omitempty"`
	Description string `yaml:"description,omitempty"`
}

type Output

type Output struct {
	Message string   `yaml:"message"`
	Fields  []string `yaml:"fields,omitempty"`
}

Jump to

Keyboard shortcuts

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