image

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 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 NamespacedRegistry added in v0.37.0

func NamespacedRegistry(ref name.Reference) string

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 DockerConfig added in v0.37.0

type DockerConfig struct {
	Auths map[string]RegistryAuth `json:"auths"`
}

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

type ImageWithIndex added in v0.32.0

type ImageWithIndex interface {
	Image
	Index() *v1.IndexManifest
}

func NewFromContainerdDaemon

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

func NewFromContainerdHostFS

func NewFromContainerdHostFS(imageID string, config hostfs.ContainerdHostFSConfig) (ImageWithIndex, func(), error)

func NewFromDockerDaemon

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

func NewFromDockerDaemonTarFile added in v0.23.0

func NewFromDockerDaemonTarFile(imageName, localTarPath string, ref name.Reference) (ImageWithIndex, func(), error)

func NewFromRemote

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

type RegistryAuth added in v0.37.0

type RegistryAuth struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Token    string `json:"auth"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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