library

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLibraryPullUnsigned = errors.New("failed to verify container")

ErrLibraryPullUnsigned indicates that the interactive portion of the pull was aborted.

Functions

func DownloadImage

func DownloadImage(ctx context.Context, c *libClient.Client, imagePath, arch string, libraryRef *libClient.Ref, pb libClient.ProgressBar) error

DownloadImage is a helper function to wrap library image download operation

func DownloadImageNoProgress

func DownloadImageNoProgress(ctx context.Context, c *libClient.Client, imagePath, arch string, libraryRef *libClient.Ref) error

DownloadImageNoProgress downloads an image from the library without displaying a progress bar while doing so

func GetIdentity added in v1.3.0

func GetIdentity(config *containerclient.Config) (user, email string, err error)

GetIdentity returns the username and email for the logged in user.

func GetOCIToken added in v1.3.0

func GetOCIToken(config *containerclient.Config) (string, error)

GetOCIToken retrieves the OCI registry token for the logged in user.

func NormalizeLibraryRef

func NormalizeLibraryRef(ref string) (*libClient.Ref, error)

NormalizeLibraryRef parses library ref and sets default tag, if necessary.

func Pull

func Pull(ctx context.Context, imgCache *cache.Handle, pullFrom *libClient.Ref, arch string, tmpDir string, libraryConfig *libClient.Config) (imagePath string, err error)

Pull will pull a library image to the cache or direct to a temporary file if cache is disabled

func PullToFile

func PullToFile(ctx context.Context, imgCache *cache.Handle, pullTo string, pullFrom *libClient.Ref, arch string, tmpDir string, libraryConfig *libClient.Config, co []keyClient.Option) (imagePath string, err error)

PullToFile will pull a library image to the specified location, through the cache, or directly if cache is disabled

func Push added in v1.3.0

func Push(ctx context.Context, sourceFile string, destRef *scslibrary.Ref, desc string, libraryConfig *scslibrary.Config) (uploadResponse *scslibrary.UploadImageComplete, err error)

Push will upload an image file to the library. Returns the upload completion response on success, containing container path and quota usage.

func SearchLibrary

func SearchLibrary(ctx context.Context, c *libClient.Client, value, arch string, signed bool) error

SearchLibrary searches the library and outputs results to stdout

Types

This section is empty.

Jump to

Keyboard shortcuts

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