oci

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CreatedAnnotation is the OpenContainers annotation for specifying
	// the date and time on which the OCI artifact was built (RFC 3339).
	CreatedAnnotation = "org.opencontainers.image.created"

	// ConfigMediaType is the OpenContainers artifact media type for the config layer.
	ConfigMediaType = "application/vnd.genval.config.v1+json"

	// ContentMediaType is the OpenContainers artifact media type for the content layer.
	ContentMediaType = "application/vnd.genval.content.v1.tar+gzip"

	ContentTypeAnnotation = "genval.content.type"

	// SourceAnnotation is the OpenContainers annotation for specifying
	// the upstream source of an OCI artifact.
	SourceAnnotation = "org.opencontainers.image.source"

	URLPrefix = "oci://"
)

Variables

This section is empty.

Functions

func CheckTagAndPullArchive added in v0.1.1

func CheckTagAndPullArchive(url, tool string, archivePath *os.File) error

CheckTagAndPullArchive checks for provided tag to be available in the remote, if available pulls the archive and stores it in the specified directory and retuens an error if encountered.

func CreateTarball

func CreateTarball(sourcePath, outputPath string) error

CreateTarball creates a tarball from a file or directory.

func CreateWorkspace

func CreateWorkspace(desiredTool, ociURL string) error

func ExtractTarContents

func ExtractTarContents(tarReader *tar.Reader, destinationDir string) error

ExtractTarContents extracts the contents of a tar.Reader to the specified directory.

func GetCreds

func GetCreds() ([]crane.Option, error)

func GetGitRemoteURL

func GetGitRemoteURL() (string, error)

GetGitRemoteURL fetches the remote url of the project

func ParseAnnotations

func ParseAnnotations(args []string) (map[string]string, error)

func PullArtifact

func PullArtifact(ctx context.Context, dest, path string) error

PullArtifact checks if tag exists and pull's the artifact from remote repository and writes to disk

func SignCosign

func SignCosign(imageRef, keyRef string) error

SignCosign signs an image (`imageRef`) in Keyless mode https://github.com/sigstore/cosign/blob/main/KEYLESS.md.

func VerifyArifact

func VerifyArifact(ctx context.Context, url, key string) (verified bool, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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