lock

package
v1.2.29 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 2 modules, 1 package

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.14.1

type Config struct {
	Name string `json:"name,omitempty"`
	// This checksum also covers included files and command-line settings that influence the artifacts resolution.
	DeepChecksum string `json:"checksum,omitempty"`
}

Origin describes the source file used to generate the lock file. Used to detect that the origin got changed without regenerating the lockfile.

type Lock

type Lock struct {
	Version  string       `json:"version"`
	Config   *Config      `json:"config,omitempty"`
	Contents LockContents `json:"contents"`
}

func FromFile

func FromFile(lockFile string) (Lock, error)

func (Lock) Arch2LockedPackages added in v0.27.2

func (lock Lock) Arch2LockedPackages(archs []types.Architecture) map[string][]string

Arch2LockedPackages returns map: for each arch -> list of {package_name}={version} in archs.

func (Lock) SaveToFile

func (lock Lock) SaveToFile(lockFile string) error

type LockContents

type LockContents struct {
	Keyrings                []LockKeyring `json:"keyring"`
	BuildRepositories       []LockRepo    `json:"build_repositories"`
	RuntimeOnlyRepositories []LockRepo    `json:"runtime_repositories"`
	Repositories            []LockRepo    `json:"repositories"`
	// Packages in order of installation -> for a single architecture.
	Packages []LockPkg `json:"packages"`
}

type LockKeyring

type LockKeyring struct {
	Name string `json:"name"`
	URL  string `json:"url"`
	// Content is the raw keyring content (typically a PEM-encoded public key).
	Content string `json:"content,omitempty"`
}

type LockPkg

type LockPkg struct {
	Name         string                  `json:"name"`
	URL          string                  `json:"url"`
	Version      string                  `json:"version"`
	Architecture string                  `json:"architecture"`
	Signature    LockPkgRangeAndChecksum `json:"signature"`
	Control      LockPkgRangeAndChecksum `json:"control"`
	Data         LockPkgRangeAndChecksum `json:"data"`
	// Checksum is APK-style: 'Q1' prefixed SHA1 hash of the second gzip stream (control stream) in the package.
	// For data-consistency checks use Signature, Control & Data above.
	// Populated since Apko 0.13.
	Checksum string `json:"checksum"`
}

type LockPkgRangeAndChecksum

type LockPkgRangeAndChecksum struct {
	Range    string `json:"range"`
	Checksum string `json:"checksum"`
}

type LockRepo

type LockRepo struct {
	Name         string `json:"name"`
	URL          string `json:"url"`
	Architecture string `json:"architecture"`
}

Jump to

Keyboard shortcuts

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