archive

package
v0.0.0-...-54000e6 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxManifestBytes           int64 = 16 << 20
	MaxArchiveEntryBytes       int64 = 4 << 30
	MaxBundleBytes             int64 = 2 << 30
	MaxBundleUncompressedBytes int64 = 8 << 30
	MaxChecksumBytes           int64 = 1 << 20
	MaxManifestFiles                 = 200000
)

Variables

This section is empty.

Functions

func CanonicalManifest

func CanonicalManifest(m model.Manifest) ([]byte, error)

func CopyFile

func CopyFile(src, dst string) error

func CopyFileHashed

func CopyFileHashed(src, dst string) (string, error)

func CopyFileHashedLimit

func CopyFileHashedLimit(src, dst string, maxBytes int64) (string, error)

func FileSHA256

func FileSHA256(path string) (string, error)

func ManifestStateSHA256

func ManifestStateSHA256(m model.Manifest) string

func ReadBundle

func ReadBundle(path string) (model.Manifest, map[string][]byte, []byte, string, error)

func ReadManifest

func ReadManifest(path string) (model.Manifest, error)

func StableCopy

func StableCopy(path, dir string) (string, string, int64, string, error)

func StableRead

func StableRead(path string) ([]byte, string, error)

func StreamFiles

func StreamFiles(path string, fn func(name string, data []byte) error) error

func StreamManifestFiles

func StreamManifestFiles(path string, fn func(mf model.ManifestFile, r io.Reader) error) error

func StreamReaders

func StreamReaders(path string, fn func(name string, size int64, r io.Reader) error) error

func ValidateManifestBudgets

func ValidateManifestBudgets(manifest model.Manifest) error

func ValidateManifestSemantics

func ValidateManifestSemantics(m model.Manifest) error

func WalkBundle

func WalkBundle(path string, fn func(name string, size int64, r io.Reader) error) error

func Write

func Write(path string, b Bundle) (string, error)

Types

type Bundle

type Bundle struct {
	Manifest model.Manifest
	Files    []model.CapturedFile
	TempDir  string
}

func Capture

func Capture(ctx context.Context, cfg model.Config, registry map[string]adapters.SourceAdapter, opts Options) (Bundle, error)

type Options

type Options struct {
	CapturedAt     string
	BundleID       string
	SessionFilters []string
	MaxSessions    int
	Clock          ahaclock.Clock
}

type UnsupportedSchemaError

type UnsupportedSchemaError struct {
	Schema string
}

func (UnsupportedSchemaError) Error

func (e UnsupportedSchemaError) Error() string

type WriteInfo

type WriteInfo struct {
	Path           string
	BundleSHA256   string
	SizeBytes      int64
	ManifestSHA256 string
	StateSHA256    string
}

func WriteWithInfo

func WriteWithInfo(path string, b Bundle) (WriteInfo, error)

Jump to

Keyboard shortcuts

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