factory

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package factory implements factory inspection command behavior.

Index

Constants

This section is empty.

Variables

View Source
var ErrCurrentFactoryNotFound = errors.New("current factory not found")

ErrCurrentFactoryNotFound reports that the running service could not resolve a current factory.

Functions

func Delete

func Delete(cfg DeleteConfig) error

Delete removes a persisted named factory from disk.

func List

func List(cfg ListConfig) error

List prints persisted named factories under the selected factory root.

func Query

func Query(cfg QueryConfig) error

Query prints the active factory from a running factory service.

func QueryCurrent

func QueryCurrent(cfg QueryCurrentConfig) (factoryapi.Factory, error)

QueryCurrent requests the active factory from a running factory service.

func RenderCurrentFactory

func RenderCurrentFactory(current factoryapi.Factory, output io.Writer) error

RenderCurrentFactory writes a concise human-readable current-factory result.

func SaveCurrent

func SaveCurrent(cfg SaveCurrentConfig) error

SaveCurrent reads the session current factory and persists it with PUT.

func SaveFromFile

func SaveFromFile(cfg SaveFromFileConfig) error

SaveFromFile creates a new named factory from a factory.json payload.

func UpdateFromFile

func UpdateFromFile(cfg UpdateFromFileConfig) error

UpdateFromFile replaces an existing named factory from a factory.json payload.

Types

type DeleteConfig

type DeleteConfig struct {
	Name   string
	Dir    string
	JSON   bool
	Output io.Writer
}

DeleteConfig holds parameters for deleting a persisted named factory.

type DeleteResult

type DeleteResult struct {
	Name string `json:"name"`
}

DeleteResult reports a successful factory deletion.

type ListConfig

type ListConfig struct {
	Dir     string
	JSON    bool
	Verbose bool
	Output  io.Writer
}

ListConfig holds parameters for the factory list command.

type QueryConfig

type QueryConfig struct {
	Server      string
	JSON        bool
	Verbose     bool
	Debug       bool
	Output      io.Writer
	Diagnostics io.Writer
}

QueryConfig holds parameters for the factory query command.

type QueryCurrentConfig

type QueryCurrentConfig struct {
	Server    string
	SessionID string
}

QueryCurrentConfig holds parameters for querying the current factory.

type SaveCurrentConfig

type SaveCurrentConfig struct {
	Server      string
	SessionID   string
	JSON        bool
	Verbose     bool
	Output      io.Writer
	Diagnostics io.Writer
}

SaveCurrentConfig holds parameters for persisting the live current factory.

type SaveFromFileConfig

type SaveFromFileConfig struct {
	Name       string
	From       string
	Dir        string
	SetCurrent bool
	JSON       bool
	Output     io.Writer
}

SaveFromFileConfig holds parameters for persisting a new named factory from disk.

type SaveFromFileResult

type SaveFromFileResult struct {
	Name       string `json:"name"`
	FactoryDir string `json:"factoryDir"`
}

SaveFromFileResult reports a successful file-based factory save.

type UpdateFromFileConfig

type UpdateFromFileConfig struct {
	Name   string
	From   string
	Dir    string
	JSON   bool
	Output io.Writer
}

UpdateFromFileConfig holds parameters for replacing an existing named factory from disk.

type UpdateFromFileResult

type UpdateFromFileResult struct {
	Name       string `json:"name"`
	FactoryDir string `json:"factoryDir"`
}

UpdateFromFileResult reports a successful file-based factory update.

Jump to

Keyboard shortcuts

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