image

package
v0.19.9 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ID

func ID(img v1.Image) (string, error)

func LayerIDs

func LayerIDs(img v1.Image) ([]string, error)

func NewFromContainerdDaemon

func NewFromContainerdDaemon(ctx context.Context, imageName string) (types.Image, func(), error)

func NewFromContainerdHostFS

func NewFromContainerdHostFS(imageID string, config *hostfs.ContainerdHostFSConfig) (types.Image, func(), error)

func NewFromDockerDaemon

func NewFromDockerDaemon(imageName string, ref name.Reference) (types.Image, func(), error)

func NewFromRemote

func NewFromRemote(ctx context.Context, imageName string, option DockerOption) (types.Image, error)

Types

type Artifact

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

func NewArtifact

func NewArtifact(img types.Image, log logrus.FieldLogger, c blobscache.Client, opt artifact.Option) (*Artifact, error)

func (Artifact) Clean

func (Artifact) Inspect

func (a Artifact) Inspect(ctx context.Context) (*ArtifactReference, error)

type ArtifactOption

type ArtifactOption = artifact.Option

type ArtifactReference

type ArtifactReference struct {
	BlobsInfo    []types.BlobInfo
	ConfigFile   *v1.ConfigFile
	ArtifactInfo *types.ArtifactInfo
	OsInfo       *types.OS
}

type DockerOption

type DockerOption struct {
	// Auth
	UserName string `yaml:"user_name"`
	Password string `yaml:"password"`

	// RegistryToken is a bearer token to be sent to a registry
	RegistryToken string `yaml:"registry_token"`

	// ECR
	AwsAccessKey    string `yaml:"aws_access_key"`
	AwsSecretKey    string `yaml:"aws_secret_key"`
	AwsSessionToken string `yaml:"aws_session_token"`
	AwsRegion       string `yaml:"aws_region"`

	// GCP
	GcpCredPath string `yaml:"gcp_cred_path"`

	// SSL/TLS
	InsecureSkipTLSVerify bool `yaml:"insecure_skip_tls_verify"`
	NonSSL                bool `yaml:"non_ssl"`
}

type Image

type Image = types.Image

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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