wheelinventory

package
v0.0.0-...-e84d2fa Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 7 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 wheelinventory performs the bounded, content-free structural walk shared by Python wheel consumers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	File             *zip.File
	Path             string
	Kind             Kind
	UncompressedSize uint64
}

type Inventory

type Inventory struct {
	Files   []*zip.File
	Entries []Entry
	// contains filtered or unexported fields
}

Inventory is returned only after the complete archive structure has passed validation. Files are the corresponding archive/zip entries and must not be used after Close.

func Open

func Open(ctx context.Context, filename string) (*Inventory, error)

Open opens and validates one regular wheel file. The descriptor remains owned by the returned inventory until Close.

func Read

func Read(ctx context.Context, reader io.ReaderAt, size int64) (*Inventory, error)

Read validates a wheel from a descriptor-stable ReaderAt. It never opens a member and performs the complete structural inventory before returning.

func (*Inventory) Close

func (i *Inventory) Close() error

type Kind

type Kind string
const (
	Regular   Kind = "regular"
	Directory Kind = "directory"
)

Jump to

Keyboard shortcuts

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