Documentation ¶
Index ¶
- Constants
- func CheckHint(v ocm.ComponentVersionAccess, elem addhdlrs.Element, acc compdesc.AccessSpec) error
- func CompleteOptionsWithSession(ctx clictx.Context, session ocm.Session, all ...bool) options.OptionsProcessor
- func ConsumeIdentities(pattern bool, args []string, stop ...string) ([]metav1.Identity, []string, error)
- func FilterSettings(args ...string) (attrs map[string]string, addArgs []string)
- func IsVersionSet(vers string) bool
- func MapArgsToIdentities(args ...string) ([]metav1.Identity, error)
- func MapArgsToIdentityPattern(args ...string) (metav1.Identity, error)
- func MapLabelSpecs(d interface{}) (interface{}, error)
- func NewElementFileSource(path string, fss ...vfs.FileSystem) addhdlrs.ElementSource
- func NewModifiedResourceSpecificationsFile(data string, path string, fss ...vfs.FileSystem) addhdlrs.ElementSource
- func ParseSettings(args []string, kinds ...string) (map[string]string, error)
- func ProcessElements(ictx inputs.Context, cv ocm.ComponentVersionAccess, elems []addhdlrs.Element, ...) error
- type ContentResourceSpecificationsProvider
- func (a *ContentResourceSpecificationsProvider) AddFlags(fs *pflag.FlagSet)
- func (a *ContentResourceSpecificationsProvider) Complete() error
- func (a *ContentResourceSpecificationsProvider) Description() string
- func (a *ContentResourceSpecificationsProvider) Get() (string, error)
- func (a *ContentResourceSpecificationsProvider) IsSpecified() bool
- func (a *ContentResourceSpecificationsProvider) ParsedMeta() (flagsets.Config, error)
- func (a *ContentResourceSpecificationsProvider) Resources() ([]addhdlrs.ElementSource, error)
- type ElementFileSource
- type ElementMetaDataSpecificationsProvider
- func (a *ElementMetaDataSpecificationsProvider) AddFlags(fs *pflag.FlagSet)
- func (a *ElementMetaDataSpecificationsProvider) Complete() error
- func (a *ElementMetaDataSpecificationsProvider) Description() string
- func (a *ElementMetaDataSpecificationsProvider) ElementType() string
- func (a *ElementMetaDataSpecificationsProvider) IsSpecified() bool
- func (a *ElementMetaDataSpecificationsProvider) Origin() addhdlrs.SourceInfo
- func (a *ElementMetaDataSpecificationsProvider) ParsedMeta() (flagsets.Config, error)
- type ElementSpecificationsProvider
- type ModifiedResourceSpecificationsFile
- type OptionWithSessionCompleter
- type ResourceAdderCommand
- type ResourceConfigAdderCommand
- type ResourceSpecHandler
Constants ¶
View Source
const ComponentVersionTag = "<componentversion>"
Variables ¶
This section is empty.
Functions ¶
func CheckHint ¶
func CheckHint(v ocm.ComponentVersionAccess, elem addhdlrs.Element, acc compdesc.AccessSpec) error
func CompleteOptionsWithSession ¶
func CompleteOptionsWithSession(ctx clictx.Context, session ocm.Session, all ...bool) options.OptionsProcessor
CompleteOptionsWithSession provides an options.OptionsProcessor completing options by passing a session object using the OptionWithSessionCompleter interface. If an optional argument true is given, it also tries the other standard completion methods possible for an options object.
func ConsumeIdentities ¶
func FilterSettings ¶
func IsVersionSet ¶
func MapLabelSpecs ¶
func MapLabelSpecs(d interface{}) (interface{}, error)
func NewElementFileSource ¶
func NewElementFileSource(path string, fss ...vfs.FileSystem) addhdlrs.ElementSource
func NewModifiedResourceSpecificationsFile ¶
func NewModifiedResourceSpecificationsFile(data string, path string, fss ...vfs.FileSystem) addhdlrs.ElementSource
func ProcessElements ¶
func ProcessElements(ictx inputs.Context, cv ocm.ComponentVersionAccess, elems []addhdlrs.Element, h ResourceSpecHandler) error
ProcessElements add a list of evaluated elements to a component version.
Types ¶
type ContentResourceSpecificationsProvider ¶
type ContentResourceSpecificationsProvider struct { *ElementMetaDataSpecificationsProvider DefaultType string // contains filtered or unexported fields }
func NewContentResourceSpecificationProvider ¶
func NewContentResourceSpecificationProvider(ctx clictx.Context, name string, adder flagsets.ConfigAdder, deftype string, types ...flagsets.ConfigOptionType) *ContentResourceSpecificationsProvider
func (*ContentResourceSpecificationsProvider) AddFlags ¶
func (a *ContentResourceSpecificationsProvider) AddFlags(fs *pflag.FlagSet)
func (*ContentResourceSpecificationsProvider) Complete ¶
func (a *ContentResourceSpecificationsProvider) Complete() error
func (*ContentResourceSpecificationsProvider) Description ¶
func (a *ContentResourceSpecificationsProvider) Description() string
func (*ContentResourceSpecificationsProvider) Get ¶
func (a *ContentResourceSpecificationsProvider) Get() (string, error)
func (*ContentResourceSpecificationsProvider) IsSpecified ¶
func (a *ContentResourceSpecificationsProvider) IsSpecified() bool
func (*ContentResourceSpecificationsProvider) ParsedMeta ¶
func (a *ContentResourceSpecificationsProvider) ParsedMeta() (flagsets.Config, error)
func (*ContentResourceSpecificationsProvider) Resources ¶
func (a *ContentResourceSpecificationsProvider) Resources() ([]addhdlrs.ElementSource, error)
type ElementFileSource ¶
type ElementFileSource struct {
// contains filtered or unexported fields
}
func (*ElementFileSource) Get ¶
func (r *ElementFileSource) Get() (string, error)
func (*ElementFileSource) Origin ¶
func (r *ElementFileSource) Origin() addhdlrs.SourceInfo
type ElementMetaDataSpecificationsProvider ¶
type ElementMetaDataSpecificationsProvider struct {
// contains filtered or unexported fields
}
func NewElementMetaDataSpecificationsProvider ¶
func NewElementMetaDataSpecificationsProvider(name string, adder flagsets.ConfigAdder, types ...flagsets.ConfigOptionType) *ElementMetaDataSpecificationsProvider
func (*ElementMetaDataSpecificationsProvider) AddFlags ¶
func (a *ElementMetaDataSpecificationsProvider) AddFlags(fs *pflag.FlagSet)
func (*ElementMetaDataSpecificationsProvider) Complete ¶
func (a *ElementMetaDataSpecificationsProvider) Complete() error
func (*ElementMetaDataSpecificationsProvider) Description ¶
func (a *ElementMetaDataSpecificationsProvider) Description() string
func (*ElementMetaDataSpecificationsProvider) ElementType ¶
func (a *ElementMetaDataSpecificationsProvider) ElementType() string
func (*ElementMetaDataSpecificationsProvider) IsSpecified ¶
func (a *ElementMetaDataSpecificationsProvider) IsSpecified() bool
func (*ElementMetaDataSpecificationsProvider) Origin ¶
func (a *ElementMetaDataSpecificationsProvider) Origin() addhdlrs.SourceInfo
func (*ElementMetaDataSpecificationsProvider) ParsedMeta ¶
func (a *ElementMetaDataSpecificationsProvider) ParsedMeta() (flagsets.Config, error)
type ModifiedResourceSpecificationsFile ¶
type ModifiedResourceSpecificationsFile struct { ElementFileSource // contains filtered or unexported fields }
func (*ModifiedResourceSpecificationsFile) Get ¶
func (r *ModifiedResourceSpecificationsFile) Get() (string, error)
type OptionWithSessionCompleter ¶
type OptionWithSessionCompleter interface {
CompleteWithSession(ctx clictx.OCM, session ocm.Session) error
}
OptionWithSessionCompleter describes the interface for option objects requiring a completion with a session.
type ResourceAdderCommand ¶
type ResourceAdderCommand struct { utils.BaseCommand Adder ElementSpecificationsProvider Resources []addhdlrs.ElementSource Envs []string Archive string Handler ResourceSpecHandler }
func NewResourceAdderCommand ¶
func NewResourceAdderCommand(ctx clictx.Context, h ResourceSpecHandler, provider ElementSpecificationsProvider, opts ...options.Options) ResourceAdderCommand
func (*ResourceAdderCommand) AddFlags ¶
func (o *ResourceAdderCommand) AddFlags(fs *pflag.FlagSet)
func (*ResourceAdderCommand) Complete ¶
func (o *ResourceAdderCommand) Complete(args []string) error
func (*ResourceAdderCommand) ProcessResourceDescriptions ¶
func (o *ResourceAdderCommand) ProcessResourceDescriptions() error
type ResourceConfigAdderCommand ¶
type ResourceConfigAdderCommand struct { utils.BaseCommand Adder ElementSpecificationsProvider ConfigFile string Resources []addhdlrs.ElementSource Envs []string }
func NewResourceConfigAdderCommand ¶
func NewResourceConfigAdderCommand(ctx clictx.Context, adder ElementSpecificationsProvider, opts ...options.Options) ResourceConfigAdderCommand
NewCommand creates a new ctf command.
func (*ResourceConfigAdderCommand) AddFlags ¶
func (o *ResourceConfigAdderCommand) AddFlags(fs *pflag.FlagSet)
func (*ResourceConfigAdderCommand) Complete ¶
func (o *ResourceConfigAdderCommand) Complete(args []string) error
func (*ResourceConfigAdderCommand) ProcessResourceDescriptions ¶
func (o *ResourceConfigAdderCommand) ProcessResourceDescriptions(h ResourceSpecHandler) error
type ResourceSpecHandler ¶
type ResourceSpecHandler interface { addhdlrs.ElementSpecHandler Set(v ocm.ComponentVersionAccess, r addhdlrs.Element, acc compdesc.AccessSpec) error }
Click to show internal directories.
Click to hide internal directories.