oci

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SpdxJson   = "application/spdx+json"
	InTotoJson = "application/vnd.in-toto+json"
)

OCI artifact types

View Source
const (
	OCICollector = "OCICollector"
)
View Source
const (
	OCIRegistryCollector = "OCIRegistryCollector"
)

Variables

This section is empty.

Functions

func BuildRegClientOptions added in v1.0.2

func BuildRegClientOptions(hosts []string, opts OCIClientOptions) []regclient.Opt

BuildRegClientOptions constructs regclient options for OCI operations. The opts parameter allows configuration of TLS settings for the specified hosts.

func ExtractRegistryHosts added in v1.0.2

func ExtractRegistryHosts(imagePaths []string) []string

ExtractRegistryHosts extracts unique registry hosts from image references. For image paths like "registry.example.com:5000/repo/image:tag", it returns "registry.example.com:5000".

func GetRegClientOptions added in v1.0.2

func GetRegClientOptions() []regclient.Opt

GetRegClientOptions returns the default regclient options with Docker credentials, certificates, and user agent configured.

func NewOCICollector

func NewOCICollector(ctx context.Context, collectDataSource datasource.CollectSource, poll bool, interval time.Duration, rcOpts ...regclient.Opt) *ociCollector

NewOCICollector initializes the oci collector by passing in the repo and tag being collected. Note: OCI collector can be called upon by a upstream registry collector in the future to collect from all repos in a given registry. For further details see issue #298

Interval should be set to about 5 mins or more for production so that it doesn't clobber registries.

func NewOCIRegistryCollector added in v0.12.0

func NewOCIRegistryCollector(ctx context.Context, collectDataSource datasource.CollectSource, poll bool, interval time.Duration, rcOpts ...regclient.Opt) *ociRegistryCollector

NewOCIRegistryCollector initializes the oci registry collector that will collect from all repos in the given registry

Types

type OCIClientOptions added in v1.0.2

type OCIClientOptions struct {
	// InsecureSkipTLSVerify disables TLS entirely (uses HTTP)
	InsecureSkipTLSVerify bool
}

OCIClientOptions contains configuration for OCI registry connections. New fields should always have sensible zero-value defaults for backward compatibility.

Jump to

Keyboard shortcuts

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