mirror

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMetadataURL = "https://docker.github.io/tuf-staging/metadata"
	DefaultTargetsURL  = "https://docker.github.io/tuf-staging/targets"
)

Variables

Functions

func PushToRegistry

func PushToRegistry(image any, imageName string) error

func SaveAsOCILayout

func SaveAsOCILayout(image any, path string) error

Types

type DelegatedTargetMetadata

type DelegatedTargetMetadata struct {
	Name    string
	Version string
	Data    []byte
}

type MirrorImage

type MirrorImage struct {
	Image *v1.Image
	Tag   string
}

type MirrorIndex

type MirrorIndex struct {
	Index *v1.ImageIndex
	Tag   string
}

type TufMetadata

type TufMetadata struct {
	Root      map[string][]byte
	Snapshot  map[string][]byte
	Targets   map[string][]byte
	Timestamp []byte
}

type TufMirror

type TufMirror struct {
	TufClient *tuf.TufClient
	// contains filtered or unexported fields
}

func NewTufMirror

func NewTufMirror(root []byte, tufPath, metadataURL, targetsURL string) (*TufMirror, error)

func (*TufMirror) GetDelegatedMetadataMirrors

func (m *TufMirror) GetDelegatedMetadataMirrors() ([]*MirrorImage, error)

GetDelegatedMetadataMirrors returns a list of mirrors (image/tag pairs) for each delegated targets role metadata

func (*TufMirror) GetDelegatedTargetMirrors

func (m *TufMirror) GetDelegatedTargetMirrors() ([]*MirrorIndex, error)

GetDelegatedTargetMirrors returns a list of delegated target files as MirrorIndexes (image index with tag) each image in the index contains a delegated target file

func (*TufMirror) GetMetadataManifest

func (m *TufMirror) GetMetadataManifest(metadataURL string) (*v1.Image, error)

GetMetadataManifest returns an image with TUF root metadata as layers

func (*TufMirror) GetTufTargetMirrors

func (m *TufMirror) GetTufTargetMirrors() ([]*MirrorImage, error)

GetTufTargetMirrors returns a list of top-level target files as MirrorImages (image with tag)

type TufRole

type TufRole string

Jump to

Keyboard shortcuts

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