oci

package
v0.0.79 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package oci provides a client for interacting with OCI registries

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OCI

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

OCI is the struct that contains the OCI client

func New

func New(cred provifv1.Credential, registry, baseURL string) *OCI

New creates a new OCI client

func (*OCI) CanImplement

func (_ *OCI) CanImplement(trait minderv1.ProviderType) bool

CanImplement returns true/false depending on whether the OCI client can implement the specified trait

func (*OCI) GetArtifactVersions

func (ov *OCI) GetArtifactVersions(
	ctx context.Context,
	artifact *minderv1.Artifact,
	filter provifv1.GetArtifactVersionsFilter,
) ([]*minderv1.ArtifactVersion, error)

GetArtifactVersions returns the artifact versions for the given artifact

func (*OCI) GetAuthenticator

func (o *OCI) GetAuthenticator() (authn.Authenticator, error)

GetAuthenticator returns the authenticator for the OCI provider

func (*OCI) GetDigest

func (o *OCI) GetDigest(ctx context.Context, contname, tag string) (string, error)

GetDigest returns the digest for a given tag

func (*OCI) GetManifest

func (o *OCI) GetManifest(ctx context.Context, contname, tag string) (*v1.Manifest, error)

GetManifest returns the manifest for the given tag of the given container in the given namespace for the OCI provider. It returns the manifest as a golang struct given the OCI spec.

func (*OCI) GetReferrer

func (o *OCI) GetReferrer(ctx context.Context, contname, tag, artifactType string) (any, error)

GetReferrer returns the referrer for the given tag of the given container in the given namespace for the OCI provider. It returns the referrer as a golang struct given the OCI spec.

func (*OCI) GetRegistry

func (o *OCI) GetRegistry() string

GetRegistry returns the registry name

func (*OCI) ListTags

func (o *OCI) ListTags(ctx context.Context, contname string) ([]string, error)

ListTags lists the tags for a given container

Jump to

Keyboard shortcuts

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