Documentation
¶
Index ¶
- Constants
- Variables
- func NewMockTufClient(srcPath string, dstPath string) *mockTufClient
- type ImageCache
- type Layer
- type Layers
- type RegistryFetcher
- type TUFClient
- type TufClient
- func (t *TufClient) DownloadTarget(target string, filePath string) (actualFilePath string, data []byte, err error)
- func (t *TufClient) GetMetadata() trustedmetadata.TrustedMetadata
- func (t *TufClient) GetPriorRoots(metadataURL string) (map[string][]byte, error)
- func (t *TufClient) LoadDelegatedTargets(roleName, parentName string) (*metadata.Metadata[metadata.TargetsType], error)
- func (t *TufClient) MaxRootLength() int64
- func (t *TufClient) SetRemoteTargetsURL(url string)
- type TufRole
- type TufSource
Constants ¶
View Source
const (
TufFileNameAnnotation = "tuf.io/filename"
)
Variables ¶
Functions ¶
func NewMockTufClient ¶
Types ¶
type ImageCache ¶
type ImageCache struct {
// contains filtered or unexported fields
}
func NewImageCache ¶
func NewImageCache() *ImageCache
type RegistryFetcher ¶
type RegistryFetcher struct {
// contains filtered or unexported fields
}
RegistryFetcher implements Fetcher
func NewRegistryFetcher ¶
func NewRegistryFetcher(metadataRepo, metadataTag, targetsRepo string) *RegistryFetcher
func (*RegistryFetcher) DownloadFile ¶
func (d *RegistryFetcher) DownloadFile(urlPath string, maxLength int64, timeout time.Duration) ([]byte, error)
DownloadFile downloads a file from an OCI registry, errors out if it failed, its length is larger than maxLength or the timeout is reached.
type TufClient ¶
type TufClient struct {
// contains filtered or unexported fields
}
func NewTufClient ¶
func NewTufClient(initialRoot []byte, tufPath, metadataSource, targetsSource string) (*TufClient, error)
NewTufClient creates a new TUF client
func (*TufClient) DownloadTarget ¶
func (t *TufClient) DownloadTarget(target string, filePath string) (actualFilePath string, data []byte, err error)
DownloadTarget downloads the target file using Updater. The Updater gets the target information, verifies if the target is already cached, and if it is not cached, downloads the target file.
func (*TufClient) GetMetadata ¶
func (t *TufClient) GetMetadata() trustedmetadata.TrustedMetadata
func (*TufClient) GetPriorRoots ¶
func (*TufClient) LoadDelegatedTargets ¶
func (t *TufClient) LoadDelegatedTargets(roleName, parentName string) (*metadata.Metadata[metadata.TargetsType], error)
Derived from updater.loadTargets() in theupdateframework/go-tuf
func (*TufClient) MaxRootLength ¶
func (*TufClient) SetRemoteTargetsURL ¶
Click to show internal directories.
Click to hide internal directories.