supportbundle

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SchemaVersion is the version of the support bundle manifest schema.
	SchemaVersion = 1

	// ManifestFilename is the canonical manifest name at the root of the bundle.
	ManifestFilename = "manifest.json"
)

Variables

This section is empty.

Functions

func SHA256Hex

func SHA256Hex(data []byte) string

Types

type File

type File struct {
	Path             string            `json:"path"`
	SHA256           string            `json:"sha256"`
	SizeBytes        int64             `json:"size_bytes"`
	RedactionSummary *RedactionSummary `json:"redaction_summary,omitempty"`
}

File describes a single file included in the support bundle.

func NewFile

func NewFile(path string, data []byte, redactionSummary *RedactionSummary) File

type Host

type Host struct {
	OS   string `json:"os"`
	Arch string `json:"arch"`
}

Host describes the environment the bundle was generated on.

func DefaultHost

func DefaultHost() Host

type Manifest

type Manifest struct {
	SchemaVersion int       `json:"schema_version"`
	GeneratedAt   time.Time `json:"generated_at"`
	NTMVersion    string    `json:"ntm_version"`
	Host          Host      `json:"host"`
	Files         []File    `json:"files"`
}

Manifest is a versioned, machine-readable index of a support bundle's contents.

Schema v1 (intentionally small, extensible):

  • Root: manifest.json
  • Manifest.Files[].Path MUST be a relative path within the bundle archive.

func NewManifest

func NewManifest(ntmVersion string) Manifest

type RedactionSummary

type RedactionSummary struct {
	Total      int                        `json:"total"`
	ByCategory map[redaction.Category]int `json:"by_category,omitempty"`
}

RedactionSummary captures counts of redaction findings for a file. It must never include raw matched secrets.

func SummarizeRedactionFindings

func SummarizeRedactionFindings(findings []redaction.Finding) RedactionSummary

Jump to

Keyboard shortcuts

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