flowfile

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package flowfile reads and writes a project's flow scripts (ADR 0003): <dir>/.kairocode/workflows/<name>.star, and their drafts (ADR 0030). Everything is read within dir (os.Root): a link out of the project is not followed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlowHelp

func FlowHelp(dir, name string) (string, error)

FlowHelp is what the flow name of the project in dir is to be given and what it does (/flow <name> --help): of its published script, else of its draft (ADR 0030).

func Path

func Path(name string, draft bool) string

Path is the script of flow name, relative to the project: its draft's with draft.

func Read

func Read(dir, name string, draft bool) ([]byte, error)

Read is the script of flow name in the project dir (its draft's with draft). One missing is fs.ErrNotExist.

func Write

func Write(dir, name string, src []byte) error

Write replaces the published script of flow name in dir with src, whole or not at all.

Types

type Script

type Script struct {
	Name string
	Src  []byte
}

Script is a flow's name and its script.

func List

func List(dir string, draft bool) ([]Script, error)

List is the project's flows in dir, by name (its drafts with draft); none if there is no folder for them, or no project.

Jump to

Keyboard shortcuts

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