inventorybundle

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package inventorybundle parses disconnected inventory uploads: a single JSON inventory or a ZIP (inventory.json + subsets/<groupId>.json).

Index

Constants

View Source
const (
	// MaxFileSize is the cap on an uploaded JSON or ZIP file (50 MiB).
	MaxFileSize = 50 << 20
	// MaxRequestSize is MaxFileSize plus allowance for multipart wrappers.
	MaxRequestSize = MaxFileSize + (1 << 20)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Parsed

type Parsed struct {
	MainInventory []byte
	VCenterID     string
	AgentID       *uuid.UUID
	Subsets       []Subset
}

Parsed is the result of Parse. It is the full new inventory state from the uploaded file: main inventory plus exactly the subsets present in the file (none for JSON or a ZIP without subsets/).

func Parse

func Parse(data []byte) (Parsed, error)

Parse reads a JSON inventory or a disconnected ZIP bundle.

type Subset

type Subset struct {
	ID        uuid.UUID
	Name      string
	VCenterID string
	VMsCount  int
	Inventory []byte
}

Subset is one group inventory from a disconnected ZIP bundle.

Jump to

Keyboard shortcuts

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