inventorybundle

package
v0.33.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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