Documentation
¶
Index ¶
- func CreateCollection(name string) error
- func CreateRunnable(collectionName, runnableName string) error
- func CreateShell(collection, name string) error
- func ExecuteContext(ctx *ExecutionContext, args []string) error
- func ExportCollection(name, output string) error
- func ImportCollection(source, name string) error
- func ListCollections() error
- func ListRunnables(collectionName string) error
- func ShowCollection(name string, showReadme bool) error
- func ShowRunnable(collectionName, runnableName string, showReadme bool) error
- type ExecutionContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCollection ¶
CreateCollection creates a new collection directory and a default collection.yml
func CreateRunnable ¶
CreateRunnable creates a new runnable directory and a default runnable.yml within a collection
func CreateShell ¶
CreateShellHelper creates a wrapper script for the collection. Ideally this should go to a location in PATH. For now, we will try to put it in $HOME/bin or similar if it exists, or just tell the user where we created it.
func ExecuteContext ¶
func ExecuteContext(ctx *ExecutionContext, args []string) error
ExecuteContext runs the resolved command with hooks
func ExportCollection ¶
ExportCollection exports a collection to a tar.gz file. name: name of the collection to export. output: optional output path. Defaults to <name>.tar.gz in current dir.
func ImportCollection ¶
ImportCollection imports a collection from a source. source: git URL, tar.gz path, or local folder path. name: optional name for the collection. If empty, inferred from source.
func ListRunnables ¶
ListRunnables prints available runnables for a collection
func ShowCollection ¶
ShowCollection prints details about a collection
func ShowRunnable ¶
ShowRunnable prints details about a runnable
Types ¶
type ExecutionContext ¶
type ExecutionContext struct {
RunnablePath string // Directory containing runnable.yml or resolved file
Config *config.RunnableConfig
Environments map[string]string
}
ExecutionContext holds the resolved state for execution
func ResolveCommand ¶
func ResolveCommand(collection string, pathComponents []string) (*ExecutionContext, error)
ResolveCommand traverses the collection to find the target runnable. It supports both legacy file access (optional) and new structured access.