tuf

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientFromRemote

func ClientFromRemote(_ context.Context, mirror string, rootJSON []byte, targets string) (*client.Client, error)

ClientFromRemote will construct a TUF client from a root, and mirror

func ClientFromSerializedMirror

func ClientFromSerializedMirror(_ context.Context, repo, rootJSON []byte, targets, stripPrefix string) (*client.Client, error)

ClientFromSerializedMirror will construct a TUF client by unzip/untar the repository and constructing an in-memory TUF client for it. Will also Init/Update it.

func CompressFS

func CompressFS(fsys fs.FS, buf io.Writer, skipDirs map[string]bool) error

func FromContextOrDefaults added in v0.13.0

func FromContextOrDefaults(ctx context.Context) time.Duration

FromContextOrDefaults returns a stored trustrootResyncPeriod if attached. If not found, it returns a default duration

func GetTrustedRoot added in v0.13.0

func GetTrustedRoot(ctx context.Context) (*root.TrustedRoot, error)

GetTrustedRoot returns the trusted root for the TUF repository.

func ToContext added in v0.13.0

func ToContext(ctx context.Context, duration time.Duration) context.Context

ToContext returns a context that includes a key trustrootResyncPeriod set to the included duration

func Uncompress

func Uncompress(src io.Reader, dst string) error

func UncompressMemFS

func UncompressMemFS(src io.Reader, stripPrefix string) (fs.FS, error)

UncompressMemFS takes a TUF repository that's been compressed with CompressFS and returns FS backed by memory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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