ociwrapper

package
v0.10.0-rc.19 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OCISecretUsername  = "username"
	OCISecretPassword  = "password"
	OCISecretReference = "reference"
	OCISecretBasicHTTP = "http"
	OCISecretInsecure  = "insecure"
)

Variables

This section is empty.

Functions

func ExperimentalOCIIsEnabled

func ExperimentalOCIIsEnabled() bool

ExperimentalOCIIsEnabled returns true if the EXPERIMENTAL_OCI_STORAGE env variable is set to true returns false otherwise

Types

type OCIOpts

type OCIOpts struct {
	Reference       string
	Username        string
	Password        string
	BasicHTTP       bool
	InsecureSkipTLS bool
}

type OCIWrapper

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

func NewOCIWrapper

func NewOCIWrapper() *OCIWrapper

func (*OCIWrapper) PullManifest

func (o *OCIWrapper) PullManifest(ctx context.Context, opts OCIOpts, id string) (*manifest.Manifest, error)

PullManifest pulls the OCI manifest identified by the given id from a remote OCI registry and fills and returns a fleet manifest with the contents.

func (*OCIWrapper) PushManifest

func (o *OCIWrapper) PushManifest(ctx context.Context, opts OCIOpts, id string, m *manifest.Manifest) error

PushManifest creates and pushes an OCI manifest to a remote OCI registry with the contents of the given fleet manifest. The OCI manifest will be named after the given id.

type OrasOperator

type OrasOperator struct{}

func (*OrasOperator) Copy

func (o *OrasOperator) Copy(ctx context.Context, src oras.ReadOnlyTarget, srcRef string, dst oras.Target, dstRef string, opts oras.CopyOptions) (ocispec.Descriptor, error)

func (*OrasOperator) NewStore

func (o *OrasOperator) NewStore() oras.Target

func (*OrasOperator) PackManifest

func (o *OrasOperator) PackManifest(ctx context.Context, pusher content.Pusher, packManifestVersion oras.PackManifestVersion, artifactType string, opts oras.PackManifestOptions) (ocispec.Descriptor, error)

type OrasOps

type OrasOps interface {
	PackManifest(ctx context.Context, pusher content.Pusher, packManifestVersion oras.PackManifestVersion, artifactType string, opts oras.PackManifestOptions) (ocispec.Descriptor, error)
	Copy(ctx context.Context, src oras.ReadOnlyTarget, srcRef string, dst oras.Target, dstRef string, opts oras.CopyOptions) (ocispec.Descriptor, error)
	NewStore() oras.Target
}

Jump to

Keyboard shortcuts

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