Documentation
¶
Index ¶
- func BuildTransformSummary(inventory *devicetypes.Inventory) visual.ImportSummary
- func SetProviderGetter(getter func() interface{ ... })
- func SetSystemProviderGetter(getter func() interface{ ... })
- func Transform(existing devicetypes.Inventory) (*devicetypes.TransformResult, error)
- func TransformSystem(existing devicetypes.Inventory, data *import_.SystemCSV) (*devicetypes.TransformResult, error)
- type CreatedItems
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTransformSummary ¶
func BuildTransformSummary(inventory *devicetypes.Inventory) visual.ImportSummary
BuildTransformSummary creates a summary of transformed items for display.
func SetProviderGetter ¶
SetProviderGetter allows the parent package to provide singleton access.
func SetSystemProviderGetter ¶
func SetSystemProviderGetter(getter func() interface {
GetSystemRecords() *import_.SystemCSV
IsSystemImport() bool
})
SetSystemProviderGetter allows the parent package to provide system CSV access.
func Transform ¶
func Transform(existing devicetypes.Inventory) (*devicetypes.TransformResult, error)
Transform converts raw records into CaniDeviceType, CaniRackType, and CaniCableType objects. Uses three passes: racks first, then devices (with parenting), then cables (with linking). Returns a TransformResult containing all created items.
func TransformSystem ¶
func TransformSystem(existing devicetypes.Inventory, data *import_.SystemCSV) (*devicetypes.TransformResult, error)
TransformSystem converts parsed system CSV data into a TransformResult. Uses a 5-pass algorithm: roles → racks → devices → modules → connections.
Types ¶
type CreatedItems ¶
type CreatedItems struct {
Racks []*devicetypes.CaniRackType
Devices []*devicetypes.CaniDeviceType
}
CreatedItems holds items created from a single CSV record for step display.