oci

package
v1.15.21 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package oci defines general purpose oci push and pull operations backed by oras.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePlatform

func ParsePlatform(platform string) (*ocispec.Platform, error)

ParsePlatform accepts an "os/architecture/variant"-formatted string and returns a pointer to an ocispec.Platform.

func PlatformToString

func PlatformToString(p *ocispec.Platform) string

PlatformToString accepts a pointer to an ocispec.Platform and turns it into an "os/architecture/variant"-formatted string.

func PushDirOp

func PushDirOp(ctx context.Context, dir string, target oras.Target, ref string,
	platform *ocispec.Platform, legacy, reproducible bool,
) (ocispec.Descriptor, error)

PushDirOp pushes a directory as the single layer in a OCI image.

Types

type Action

type Action struct {
	*actions.DataTool
}

Action represents a general oci action.

type PushDir

type PushDir struct {
	*Action

	Platform platformValue

	// Use legacy media types
	Legacy bool

	// Reproducible removes timestamps.
	Reproducible bool
}

PushDir represents the oci pushdir action.

func (*PushDir) Run

func (action *PushDir) Run(ctx context.Context, dir, ref string) error

Run performs the pushdir operation.

type Tree

type Tree struct {
	*Action

	OCILayout bool

	Depth int

	ShowBlobs       bool
	ShortDigests    bool
	ShowAnnotations bool

	OnlyReferrers bool
	ArtifactType  string
}

Tree represents the oci tree action.

func (*Tree) Run

func (action *Tree) Run(ctx context.Context, out io.Writer, rawRef string) error

Run performs the oci tree operation.

Jump to

Keyboard shortcuts

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