targets

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: BSD-3-Clause Imports: 7 Imported by: ? 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 targets implements the traversal of targets delegations and the generation of hashed bin delegations.

Deprecated: The legacy go-tuf module is deprecated in favour of github.com/theupdateframework/go-tuf/v2.

Index

Constants

View Source
const MaxDelegationHashPrefixBitLen = 32
View Source
const MinDelegationHashPrefixBitLen = 1

Variables

View Source
var ErrTopLevelTargetsRoleMissing = errors.New("tuf: top level targets role missing from top level keys DB")

Functions

func NewDelegationsIterator

func NewDelegationsIterator(target string, topLevelKeysDB *verify.DB) (*delegationsIterator, error)

NewDelegationsIterator initialises an iterator with a first step on top level targets.

Types

type Delegation

type Delegation struct {
	Delegator string
	Delegatee data.DelegatedRole
	DB        *verify.DB
}

type HashBin added in v0.2.0

type HashBin struct {
	// contains filtered or unexported fields
}

HashBin represents a hex prefix range. First should be less than Last.

func (*HashBin) HashPrefixes added in v0.2.0

func (b *HashBin) HashPrefixes() []string

HashPrefixes returns a slice of all hash prefixes in the bin.

func (*HashBin) RoleName added in v0.2.0

func (b *HashBin) RoleName() string

RoleName returns the name of the role that signs for the HashBin.

type HashBins added in v0.2.0

type HashBins struct {
	// contains filtered or unexported fields
}

HashBins represents an ordered list of hash bin target roles, which together partition the space of target path hashes equal-sized buckets based on path has prefix.

func NewHashBins added in v0.2.0

func NewHashBins(rolePrefix string, bitLen int) (*HashBins, error)

NewHashBins creates a HashBins partitioning with 2^bitLen buckets.

func (*HashBins) GetBin added in v0.2.0

func (hb *HashBins) GetBin(i uint64) *HashBin

GetBin returns the HashBin at index i, or nil if i is out of bounds.

func (*HashBins) NumBins added in v0.2.0

func (hb *HashBins) NumBins() uint64

NumBins returns the number of hash bin partitions.

Jump to

Keyboard shortcuts

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