manifest

package
v1.8.7-beta.6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder is the builder to build DockerV2ListMediaType manifest.

func NewBuilder

func NewBuilder(o *BuilderOpts) (*Builder, error)

func (*Builder) Add

func (b *Builder) Add(p *Image)

func (*Builder) Images

func (b *Builder) Images() int

func (*Builder) Push

func (b *Builder) Push(ctx context.Context) error

func (*Builder) String added in v1.8.7

func (b *Builder) String() (string, error)

type BuilderOpts

type BuilderOpts struct {
	ReferenceName string
	SystemContext *typesv5.SystemContext
	// RetryOpts is the options to retry on error, can be nil
	RetryOpts *retry.Options
}

type Image

type Image struct {
	Size        int64
	Digest      digest.Digest
	MediaType   string
	Annotations map[string]string // OCI image index v1 supports annotations
	// contains filtered or unexported fields
}

func NewImage

func NewImage(
	digest digest.Digest, mime string, size int64, annotations map[string]string,
) *Image

func NewImageByInspect

func NewImageByInspect(
	ctx context.Context, referenceName string, sysContext *typesv5.SystemContext,
) (*Image, error)

func (*Image) DeepCopy added in v1.8.5

func (p *Image) DeepCopy() *Image

func (*Image) Equal

func (p *Image) Equal(d *Image) bool

func (*Image) SetArch

func (p *Image) SetArch(arch string)

func (*Image) SetOS

func (p *Image) SetOS(os string)

func (*Image) SetOsFeature

func (p *Image) SetOsFeature(v []string)

func (*Image) SetOsVersion

func (p *Image) SetOsVersion(v string)

func (*Image) SetVariant

func (p *Image) SetVariant(variant string)

func (*Image) UpdatePlatform

func (p *Image) UpdatePlatform(
	arch, variant, os, osVersion string, osFeatures []string,
)

type Images

type Images []*Image

func (Images) ContainDigest

func (images Images) ContainDigest(d digest.Digest) bool

func (Images) Contains

func (images Images) Contains(d *Image) bool

func (Images) Equal

func (images Images) Equal(d Images) bool

func (Images) FindDigestIndex added in v1.8.4

func (images Images) FindDigestIndex(p *Image) int

func (Images) FindPlatformIndex

func (images Images) FindPlatformIndex(p *Image) int

func (Images) FindSLSAIndex added in v1.8.7

func (images Images) FindSLSAIndex(p *Image) int

type Inspector

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

Inspector provides similar functions of 'skopeo inspect' command.

func NewInspector

func NewInspector(ctx context.Context, o *InspectorOption) (*Inspector, error)

func (*Inspector) Close

func (p *Inspector) Close() error

func (*Inspector) Config

func (p *Inspector) Config(ctx context.Context) ([]byte, error)

func (*Inspector) ConfigInfo

func (p *Inspector) ConfigInfo(ctx context.Context) (*typesv5.BlobInfo, error)

func (*Inspector) Inspect

func (p *Inspector) Inspect(ctx context.Context) (*typesv5.ImageInspectInfo, error)

func (*Inspector) Raw

func (p *Inspector) Raw(ctx context.Context) ([]byte, string, error)

type InspectorOption

type InspectorOption struct {
	// Reference of the image to be inspected (Optional)
	Reference typesv5.ImageReference
	// ReferenceName of the image (Optional)
	ReferenceName string
	// SystemContext pointer, can be nil.
	SystemContext *typesv5.SystemContext
	// The number of times to possibly retry.
	RetryOpts *retry.Options
}

Jump to

Keyboard shortcuts

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