regbottle

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTagNotFound is returned when a tag is not found.
	ErrTagNotFound = fmt.Errorf("tag %w", errdef.ErrNotFound)

	// ErrNoMetadata is returned when metadata is not found.
	ErrNoMetadata = fmt.Errorf("metadata %w", errdef.ErrNotFound)
)

Functions

func Copy

func Copy(ctx context.Context, src oras.ReadOnlyGraphTarget, dst oras.GraphTarget, btl *BottleIndex) error

Copy copies all bottle artifacts.

func CopyGeneralMetadata

func CopyGeneralMetadata(ctx context.Context, src oras.ReadOnlyGraphTarget, dst oras.GraphTarget, btl *BottleIndex) error

CopyGeneralMetadata copies all bottle metadata artifacts.

func CopyPlatformMetadata

func CopyPlatformMetadata(ctx context.Context, src oras.ReadOnlyGraphTarget, dst oras.GraphTarget, btl *BottleIndex, plat platform.Platform) error

CopyPlatformMetadata copies all bottle artifacts for a given platform.

func CopyTargetPlatform

func CopyTargetPlatform(ctx context.Context, src oras.ReadOnlyGraphTarget, dst oras.GraphTarget, btl *BottleIndex, plat platform.Platform) error

CopyTargetPlatform copies all bottle artifacts for a given platform.

Types

type BottleIndex

type BottleIndex struct {
	ocispec.Descriptor // descriptor of the index
	// contains filtered or unexported fields
}

BottleIndex represents a versioned bottle.

func ResolveVersion

func ResolveVersion(ctx context.Context, repo oras.ReadOnlyGraphTarget, version string) (*BottleIndex, error)

ResolveVersion resolves a bottle version.

func (*BottleIndex) GeneralMetadata

func (btl *BottleIndex) GeneralMetadata(ctx context.Context, repo oras.ReadOnlyGraphTarget) (*brewv1.Info, error)

GeneralMetadata returns the full metadata for the bottle.

func (*BottleIndex) PlatformMetadata

func (btl *BottleIndex) PlatformMetadata(ctx context.Context, repo oras.ReadOnlyGraphTarget, plat platform.Platform) (*brewv1.PlatformInfo, error)

PlatformMetadata returns platform-specific metadata for a bottle.

func (*BottleIndex) ResolveBottle

func (btl *BottleIndex) ResolveBottle(ctx context.Context, repo oras.ReadOnlyGraphTarget, plat platform.Platform) (ocispec.Descriptor, error)

ResolveBottle resolves the bottle artifact from a platform manifest.

func (*BottleIndex) ResolvePlatformMetadata

func (btl *BottleIndex) ResolvePlatformMetadata(ctx context.Context, repo oras.ReadOnlyGraphTarget, plat platform.Platform) (ocispec.Descriptor, error)

ResolvePlatformMetadata resolves the platform-specific metadata for a bottle.

Jump to

Keyboard shortcuts

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