config

package
v0.0.0-...-9d6bfa7 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: BSD-2-Clause Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UpdaterConfig

type UpdaterConfig struct {
	// TUF configuration
	MaxRootRotations   int64
	MaxDelegations     int
	RootMaxLength      int64
	TimestampMaxLength int64
	SnapshotMaxLength  int64
	TargetsMaxLength   int64
	// Updater configuration
	Fetcher               fetcher.Fetcher
	LocalTrustedRoot      []byte
	LocalMetadataDir      string
	LocalTargetsDir       string
	RemoteMetadataURL     string
	RemoteTargetsURL      string
	DisableLocalCache     bool
	PrefixTargetsWithHash bool
	// UnsafeLocalMode only uses the metadata as written on disk
	// if the metadata is incomplete, calling updater.Refresh will fail
	UnsafeLocalMode bool
}

func New

func New(remoteURL string, rootBytes []byte) (*UpdaterConfig, error)

New creates a new UpdaterConfig instance used by the Updater to store configuration

func (*UpdaterConfig) EnsurePathsExist

func (cfg *UpdaterConfig) EnsurePathsExist() error

Jump to

Keyboard shortcuts

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