orasmirror

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MirrorFileConfigType          = "application/vnd.ciq.mirror.file.v1.config+json"
	MirrorFileLayerType           = "application/vnd.ciq.mirror.v1.file"
	MirrorFileModeAnnotationType  = "application/vnd.ciq.mirror.v1.file.mode"
	MirrorFileMTimeAnnotationType = "application/vnd.ciq.mirror.v1.file.mtime"
)

Variables

View Source
var ErrNoMirrorFileConfig = errors.New("mirror file config not found")

Functions

func FileReference

func FileReference(filename, repo string, opts ...name.Option) (name.Reference, error)

func NewStaticFilePusher

func NewStaticFilePusher(path, repo string, opts ...name.Option) (oras.Pusher, error)

func NewStaticFileStreamPusher

func NewStaticFileStreamPusher(stream io.Reader, filename, repo string, opts ...name.Option) (oras.Pusher, error)

Types

type MirrorPuller

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

MirrorPuller type to pull mirror file from registry.

func NewMirrorPuller

func NewMirrorPuller(ref name.Reference, writer io.Writer) *MirrorPuller

NewMirrorPuller returns a puller instance to pull file from the reference and write image content to the writer.

func (*MirrorPuller) Config

func (rp *MirrorPuller) Config(config v1.Descriptor) error

Config validates the config mediatype.

func (*MirrorPuller) IndexManifest

func (rp *MirrorPuller) IndexManifest(index *v1.IndexManifest) *v1.Hash

IndexManifest returns the manifest digest corresponding to the current architecture.

func (*MirrorPuller) Layers

func (rp *MirrorPuller) Layers(layers []v1.Layer) error

Layers copy layers to the pull writer.

func (*MirrorPuller) RawConfig

func (rp *MirrorPuller) RawConfig(_ []byte) error

RawConfig sets the raw config, ignored for mirror files.

func (*MirrorPuller) Reference

func (rp *MirrorPuller) Reference() name.Reference

Reference returns the reference for the puller.

Jump to

Keyboard shortcuts

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