client

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: 10 Imported by: 2 modules, 8 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 client provides a client.LocalStore that stores TUF metadata as JSON files in a directory.

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileJSONStore

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

FileJSONStore represents a local metadata cache relying on raw JSON files as retrieved from the remote repository.

func NewFileJSONStore

func NewFileJSONStore(baseDir string) (*FileJSONStore, error)

NewFileJSONStore returns a new metadata cache, implemented using raw JSON files, stored in a directory provided by the client. If the provided directory does not exist on disk, it will be created. The provided metadata cache is safe for concurrent access.

func (*FileJSONStore) Close

func (f *FileJSONStore) Close() error

Close closes the metadata cache. This is a no-op.

func (*FileJSONStore) DeleteMeta

func (f *FileJSONStore) DeleteMeta(name string) error

DeleteMeta deletes a metadata file from the cache. If the file does not exist, an *os.PathError is returned.

func (*FileJSONStore) GetMeta

func (f *FileJSONStore) GetMeta() (map[string]json.RawMessage, error)

GetMeta returns the currently cached set of metadata files.

func (*FileJSONStore) SetMeta

func (f *FileJSONStore) SetMeta(name string, meta json.RawMessage) error

SetMeta stores a metadata file in the cache. If the metadata file exist, it will be overwritten.

Jump to

Keyboard shortcuts

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