archive

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 18 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 archive verifies and installs platform release archives.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractBinaryBytes added in v0.6.1

func ExtractBinaryBytes(archive []byte, archiveName, binaryName string) ([]byte, error)

ExtractBinaryBytes 从发布归档中提取唯一预期二进制并返回其字节。 归档内存在重复、非普通文件或缺失该二进制都会显式报错。

Types

type Release

type Release = model.Release

Release 与 ReleaseAsset 保持 archive 包内部使用同一 wire model。

type ReleaseAsset

type ReleaseAsset = model.ReleaseAsset

type ReleaseInstaller

type ReleaseInstaller interface {
	Install(context.Context, model.Release) error
}

ReleaseInstaller installs an already verified release for the current platform.

func NewReleaseInstaller

func NewReleaseInstaller(options ReleaseInstallerOptions) ReleaseInstaller

NewReleaseInstaller creates the production archive updater. Every write is delayed until the signed release manifest, its Ed25519 signatures, the archive SHA-256 and the extracted binary SHA-256 all match.

type ReleaseInstallerOptions

type ReleaseInstallerOptions struct {
	HTTPClient        *http.Client
	ExecutablePath    func() (string, error)
	GOOS              string
	GOARCH            string
	Keyring           *manifest.Keyring
	Replacer          func(string, string) error
	AssetURLValidator func(model.Release, model.ReleaseAsset) error
}

ReleaseInstallerOptions injects system boundaries for deterministic tests.

Jump to

Keyboard shortcuts

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