oci

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 13 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

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

Artifact is used to download artifacts such as vulnerability database and policies from OCI registries.

func NewArtifact

func NewArtifact(repo, mediaType string, quiet, insecure bool, opts ...Option) (*Artifact, error)

NewArtifact returns a new artifact

func (Artifact) Digest

func (a Artifact) Digest() (string, error)

func (Artifact) Download

func (a Artifact) Download(ctx context.Context, dir string) error

type Option

type Option func(*options)

Option is a functional option

func WithImage

func WithImage(img v1.Image) Option

WithImage takes an OCI v1 Image

Jump to

Keyboard shortcuts

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