client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Copyright © 2022 Johnson Shi <Johnson.Shi@microsoft.com>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageClient

type ImageClient struct {
	Username           string
	Password           string
	DockerEngineClient *client.Client
	ImageRef           registry.Reference
	OrasRepoClient     *remote.Repository
}

func NewImageClient

func NewImageClient(username, password, imageRefStr string) (ImageClient, error)

NewImageClient returns a new ImageClient.

func (*ImageClient) EnsureImageIsPulled

func (imageClient *ImageClient) EnsureImageIsPulled(ctx context.Context) error

EnsureImageIsPulled ensures that the image is pulled and present in the Docker Engine (Docker daemon).

func (*ImageClient) GetImageLayerHistory

func (imageClient *ImageClient) GetImageLayerHistory(ctx context.Context) ([]image.HistoryResponseItem, error)

GetImageHistory returns the image layer history. The image layer history is sorted from top layers (most recent layers) to bottom layers (base image layers). See https://docs.docker.com/engine/reference/commandline/image_history/.

func (*ImageClient) GetImageManifest

func (imageClient *ImageClient) GetImageManifest(ctx context.Context) (ocispec.Manifest, error)

GetImageManifest returns the OCI image manifest. See https://github.com/opencontainers/image-spec/blob/main/manifest.md.

Jump to

Keyboard shortcuts

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