imagevector

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddCommand

func NewAddCommand(ctx context.Context) *cobra.Command

NewAddCommand creates a command to add additional resources to a component descriptor.

func NewGenerateOverwriteCommand

func NewGenerateOverwriteCommand(ctx context.Context) *cobra.Command

NewGenerateOverwriteCommand creates a command to add additional resources to a component descriptor.

func NewImageVectorCommand

func NewImageVectorCommand(ctx context.Context) *cobra.Command

NewImageVectorCommand creates a new command to to modify component references of a component descriptor.

func ResolveComponentDescriptor

func ResolveComponentDescriptor(ctx context.Context,
	fs vfs.FileSystem,
	resolver ctf.ComponentResolver,
	repoCtx cdv2.Repository,
	comp ComponentRefOrPath) (*cdv2.ComponentDescriptor, error)

ResolveComponentDescriptor resolves a component descriptor from a ComponentRefOrPath

func ResolveComponentDescriptorFromComponentRefOrPath

func ResolveComponentDescriptorFromComponentRefOrPath(
	ctx context.Context,
	fs vfs.FileSystem,
	resolver ctf.ComponentResolver,
	repoCtx cdv2.Repository,
	compStr string) (*cdv2.ComponentDescriptor, error)

ResolveComponentDescriptorFromComponentRefOrPath resolves a component descriptor from a ComponentRefOrPath

Types

type AddOptions

type AddOptions struct {
	// ComponentDescriptorPath is the path to the component descriptor
	ComponentDescriptorPath string
	// ImageVectorPath defines the path to the image vector defined as yaml or json
	ImageVectorPath string

	iv.ParseImageOptions
	// GenericDependencies is a comma separated list of generic dependency names.
	// The list will be merged with the parse image options names.
	GenericDependencies string

	// OciOptions contains all exposed options to configure the oci client.
	OciOptions ociopts.Options
}

AddOptions defines the options that are used to add resources defined by a image vector to a component descriptor

func (*AddOptions) AddFlags

func (o *AddOptions) AddFlags(set *pflag.FlagSet)

func (*AddOptions) Complete

func (o *AddOptions) Complete(args []string) error

func (*AddOptions) Run

func (o *AddOptions) Run(ctx context.Context, log logr.Logger, fs vfs.FileSystem) error

type ComponentRefOrPath

type ComponentRefOrPath struct {
	Name    string
	Version string
	Path    string
}

func ParseComponentRefOrPath

func ParseComponentRefOrPath(c string) (ComponentRefOrPath, error)

ParseComponentRefOrPath parses a component that is either defined by a component ref or a path.

type GenerateOverwriteOptions

type GenerateOverwriteOptions struct {
	// BaseURL defines the repository base url of the remote repository
	// +optional
	BaseURL string
	// ComponentRefOrPath is the name and version of the main component or a path to the local component descriptor
	// the component ref is expected to be of the format "<component-name>:<component-version>"
	// +optional
	ComponentRefOrPath string

	// AdditionalComponentsRefOrPath is a list of  name and version of the main component or a path to the local component descriptors
	// +optional
	AdditionalComponentsRefOrPath []string

	// ImageVectorPath defines the path to the image vector defined as yaml or json
	ImageVectorPath string
	// ResolveTags enables
	ResolveTags bool

	// OciOptions contains all exposed options to configure the oci client.
	OciOptions ociopts.Options

	ComponentRepository cdv2.Repository
}

GenerateOverwriteOptions defines the options that are used to generate a image vector from component descriptors

func (*GenerateOverwriteOptions) AddFlags

func (o *GenerateOverwriteOptions) AddFlags(fs *pflag.FlagSet)

func (*GenerateOverwriteOptions) Complete

func (o *GenerateOverwriteOptions) Complete(args []string) error

func (*GenerateOverwriteOptions) Run

Jump to

Keyboard shortcuts

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