bundle

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MediaTypeOLMOperatorFrameworkRegistryV1 = "olm.operatorframework.io/registry+v1"
)

Variables

This section is empty.

Functions

func BuildFile

func BuildFile(fileName string, b Bundle, imageReference string) (reference.NamedTagged, ocispec.Descriptor, error)

func BuildWriter

func BuildWriter(w io.Writer, b Bundle, imageReference string) (reference.NamedTagged, ocispec.Descriptor, error)

BuildWriter writes a bundle to a writer

func ReadSpec

func ReadSpec(specReader io.Reader) (*specsv1.Bundle, error)

func ReadSpecFile

func ReadSpecFile(specFileName string) (*specsv1.Bundle, error)

func StringFromBundleTemplate added in v0.0.2

func StringFromBundleTemplate(tmplStr string) func(b Bundle) (string, error)

Types

type BuildResult added in v0.0.6

type BuildResult struct {
	FilePath    string             `json:"filePath"`
	Repository  string             `json:"imageRepository"`
	Tag         string             `json:"imageTag"`
	Descriptor  ocispec.Descriptor `json:"imageDescriptor"`
	PackageName string             `json:"bundlePackageName"`
	Version     semver.Version     `json:"bundleVersion"`
}

func BuildFromSpecFile

func BuildFromSpecFile(_ context.Context, specFileName string, filenameFunc func(Bundle) (string, error)) (*BuildResult, error)

type Bundle

type Bundle interface {
	FS() fs.FS
	PackageName() string
	Version() semver.Version
	Annotations() map[string]string
	WriteOCIArchive(w io.Writer, tagged reference.NamedTagged) (ocispec.Descriptor, error)
}

func LoadFromSpec

func LoadFromSpec(spec specsv1.Bundle, baseDir string) (Bundle, error)

func NewRegistry

func NewRegistry(root fs.FS, extraAnnotations map[string]string) (Bundle, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳