ocistorage

package
v0.13.9 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OCISecretUsername      = "username"
	OCISecretPassword      = "password"
	OCISecretAgentUsername = "agentUsername"
	OCISecretAgentPassword = "agentPassword"
	OCISecretReference     = "reference"
	OCISecretBasicHTTP     = "basicHTTP"
	OCISecretInsecure      = "insecure"
)
View Source
const (
	OCIStorageFlag = "OCI_STORAGE"
)

Variables

This section is empty.

Functions

func OCIIsEnabled

func OCIIsEnabled() bool

OCIIsEnabled returns true if the OCI_STORAGE env variable is not set or if it's set to true

Types

type OCIOpts

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

func ReadOptsFromSecret

func ReadOptsFromSecret(ctx context.Context, c client.Reader, ns client.ObjectKey) (OCIOpts, error)

ReadOptsFromSecret reads the secret identified by the given NamespacedName and returns an OCIOpts structure filled with the information obtained from that secret.

type OCIWrapper

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

func NewOCIWrapper

func NewOCIWrapper() *OCIWrapper

func (*OCIWrapper) DeleteManifest

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

DeleteManifest deletes the OCI manifest identified by the given id and "latest" tag from a remote OCI registry.

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