distributionutil

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBlobList

func GetBlobList(blobListJSON distribution.Manifest) ([]digest.Digest, error)

func GetImageManifestDigest

func GetImageManifestDigest(payload []byte, plat v1.Platform) (digest.Digest, error)

func Login

func Login(ctx context.Context, authConfig *types.AuthConfig) error

func NewRepository

func NewRepository(ctx context.Context, authConfig types.AuthConfig, repoName string, config registryConfig, actions ...string) (distribution.Repository, error)

func NewV2Repository

func NewV2Repository(named reference.Named, actions ...string) (distribution.Repository, error)

func PlatformSpecFromOCI

func PlatformSpecFromOCI(p *v1.Platform) *manifestlist.PlatformSpec

PlatformSpecFromOCI creates a platform spec from OCI platform

Types

type BlobList

type BlobList struct {
	Layers    []distribution.Descriptor `json:"layers"`
	Config    distribution.Descriptor   `json:"config"`
	MediaType string                    `json:"mediaType"`
	Schema    int                       `json:"schemaVersion"`
}

BlobList this package unmarshal blobs from json into a BlobList struct then return a slice of blob digest

type Config

type Config struct {
	LayerStore     store.LayerStore
	ProgressOutput progress.Output
	Named          reference.Named
}

type ImageManifest

type ImageManifest struct {
	Digest    string `json:"digest"`
	MediaType string `json:"mediaType"`
	Platform  v1.Platform
	Size      int
}

type ImagePuller

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

func (*ImagePuller) Pull

func (puller *ImagePuller) Pull(ctx context.Context, named reference.Named, manifest schema2.Manifest) (*v1.Image, error)

type ImagePusher

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

func (*ImagePusher) Push

func (pusher *ImagePusher) Push(ctx context.Context, named reference.Named) error

type ManifestList

type ManifestList struct {
	List      []ImageManifest `json:"manifests"`
	MediaType string          `json:"mediaType"`
	Schema    int             `json:"schemaVersion"`
}

ManifestList this package unmarshal manifests from json into a ManifestList struct then choose corresponding manifest by platform

type Puller

type Puller interface {
	Pull(ctx context.Context, named reference.Named, manifest schema2.Manifest) (*v1.Image, error)
}

func NewPuller

func NewPuller(repo distribution.Repository, config Config) (Puller, error)

type Pusher

type Pusher interface {
	Push(ctx context.Context, named reference.Named) error
}

func NewPusher

func NewPusher(named reference.Named, config Config) (Pusher, error)

Jump to

Keyboard shortcuts

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