oci

package
v0.0.0-...-b8c384c Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 36 Imported by: 1

Documentation

Overview

OCI Repository Adapter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenRepository

func OpenRepository(name string, namespace string, content configapi.RepositoryContent, spec *configapi.OciRepository, cacheDir string) (repository.Repository, error)

Types

type ImageDigestName

type ImageDigestName struct {
	Image  string
	Digest string
}

ImageDigestName holds an image we know by digest (which is immutable and more cacheable)

func (ImageDigestName) String

func (i ImageDigestName) String() string

type ImageTagName

type ImageTagName struct {
	Image string
	Tag   string
}

ImageTagName holds an image we know by tag (but tags are mutable, so this often implies lookups)

func ParseImageTagName

func ParseImageTagName(s string) (*ImageTagName, error)

func (ImageTagName) String

func (i ImageTagName) String() string

type Storage

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

Storage provides helper functions specifically for OCI storage. It abstracts and simplifies the go-containerregistry library, but is agnostic to the contents of the images etc.

func NewStorage

func NewStorage(cacheDir string) (*Storage, error)

NewStorage creates a Storage for managing OCI images.

func (*Storage) LoadResources

func (r *Storage) LoadResources(ctx context.Context, imageName *ImageDigestName) (*repository.Resources, error)

func (*Storage) LookupImageTag

func (r *Storage) LookupImageTag(ctx context.Context, imageName ImageTagName) (*ImageDigestName, error)

Jump to

Keyboard shortcuts

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