source

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const MediaTypeSourceImageConfig = "application/vnd.oci.source.image.config.v1+json"

MediaTypeSourceImageConfig specifies the media type of a source-image config.

Variables

This section is empty.

Functions

func Add

func Add(ctx context.Context, sourcePath string, artifactPath string, options AddOptions) error

Add adds the specified source artifact at `artifactPath` to the source image at `sourcePath`. Note that the artifact will be added as a gzip-compressed tar ball. Add attempts to auto-tar and auto-compress only if necessary.

func Create

func Create(ctx context.Context, sourcePath string, options CreateOptions) error

Create creates an empty source image at the specified `sourcePath`. Note that `sourcePath` must not exist.

func Pull

func Pull(ctx context.Context, imageInput string, sourcePath string, options PullOptions) error

Pull `imageInput` from a container registry to `sourcePath`.

func Push

func Push(ctx context.Context, sourcePath string, imageInput string, options PushOptions) error

Push the source image at `sourcePath` to `imageInput` at a container registry.

Types

type AddOptions

type AddOptions struct {
	// Annotations for the source artifact.
	Annotations []string
}

AddOptions include data to alter certain knobs when adding a source artifact to a source image.

type CreateOptions

type CreateOptions struct {
	// Author is the author of the source image.
	Author string
	// TimeStamp controls whether a "created" timestamp is set or not.
	TimeStamp bool
}

CreateOptions includes data to alter certain knobs when creating a source image.

type ImageConfig

type ImageConfig struct {
	// Created is the combined date and time at which the layer was created, formatted as defined by RFC 3339, section 5.6.
	Created *time.Time `json:"created,omitempty"`

	// Author is the author of the source image.
	Author string `json:"author,omitempty"`
}

ImageConfig specifies the config of a source image.

type PullOptions

type PullOptions struct {
	// Require HTTPS and verify certificates when accessing the registry.
	TLSVerify bool
	// [username[:password] to use when connecting to the registry.
	Credentials string
}

PullOptions includes data to alter certain knobs when pulling a source image.

type PushOptions

type PushOptions struct {
	// Require HTTPS and verify certificates when accessing the registry.
	TLSVerify bool
	// [username[:password] to use when connecting to the registry.
	Credentials string
}

PushOptions includes data to alter certain knobs when pushing a source image.

Jump to

Keyboard shortcuts

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