Documentation
¶
Index ¶
- func NewAddCommand(ctx context.Context) *cobra.Command
- func NewGenerateOverwriteCommand(ctx context.Context) *cobra.Command
- func NewImageVectorCommand(ctx context.Context) *cobra.Command
- func ResolveComponentDescriptor(ctx context.Context, fs vfs.FileSystem, resolver ctf.ComponentResolver, ...) (*cdv2.ComponentDescriptor, error)
- func ResolveComponentDescriptorFromComponentRefOrPath(ctx context.Context, fs vfs.FileSystem, resolver ctf.ComponentResolver, ...) (*cdv2.ComponentDescriptor, error)
- type AddOptions
- type ComponentRefOrPath
- type GenerateOverwriteOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAddCommand ¶
NewAddCommand creates a command to add additional resources to a component descriptor.
func NewGenerateOverwriteCommand ¶
NewGenerateOverwriteCommand creates a command to add additional resources to a component descriptor.
func NewImageVectorCommand ¶
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 ¶
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 ¶
func (o *GenerateOverwriteOptions) Run(ctx context.Context, log logr.Logger, fs vfs.FileSystem) error