Documentation
¶
Overview ¶
Package factory implements factory inspection command behavior.
Index ¶
- Variables
- func Delete(cfg DeleteConfig) error
- func List(cfg ListConfig) error
- func Query(cfg QueryConfig) error
- func QueryCurrent(cfg QueryCurrentConfig) (factoryapi.Factory, error)
- func RenderCurrentFactory(current factoryapi.Factory, output io.Writer) error
- func SaveCurrent(cfg SaveCurrentConfig) error
- func SaveFromFile(cfg SaveFromFileConfig) error
- func UpdateFromFile(cfg UpdateFromFileConfig) error
- type DeleteConfig
- type DeleteResult
- type ListConfig
- type QueryConfig
- type QueryCurrentConfig
- type SaveCurrentConfig
- type SaveFromFileConfig
- type SaveFromFileResult
- type UpdateFromFileConfig
- type UpdateFromFileResult
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 ¶
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 ¶
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 ¶
SaveFromFileResult reports a successful file-based factory save.
type UpdateFromFileConfig ¶
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.