Documentation ¶
Overview ¶
Package descriptor declares several structs that describe the information that formally describes the capabilities provided by each plugin. The plugin implementation has to provide this information and the plugin user has to evaluate this information.
Index ¶
- Constants
- Variables
- type AccessMethodDescriptor
- type ActionDescriptor
- type ArtifactContext
- func (k ArtifactContext) Describe() string
- func (k ArtifactContext) GetArtifactType() string
- func (k ArtifactContext) GetMediaType() string
- func (k ArtifactContext) IsValid() bool
- func (k ArtifactContext) SetArtifact(arttype, mediatype string) ArtifactContext
- func (k ArtifactContext) String() string
- type CLIOption
- type CommandDescriptor
- type ConfigTypeDescriptor
- type Descriptor
- type DownloaderDescriptor
- type DownloaderKey
- type DownloaderRegistration
- type Element
- type LabelMergeSpecification
- type List
- type Named
- type RepositoryContext
- type StringName
- type UploaderDescriptor
- type UploaderKey
- type UploaderKeySet
- type ValueMergeHandlerDescriptor
- type ValueSetDefinition
- type ValueSetDescriptor
- type ValueTypeDefinition
Constants ¶
View Source
const ( KIND_PLUGIN = "plugin" KIND_DOWNLOADER = "downloader" KIND_UPLOADER = "uploader" KIND_ACCESSMETHOD = errkind.KIND_ACCESSMETHOD KIND_ACTION = action.KIND_ACTION KIND_VALUESET = "value set" KIND_PURPOSE = "purposet" )
View Source
const PURPOSE_ROUTINGSLIP = "routingslip"
View Source
const VERSION = "v1"
Variables ¶
View Source
var REALM = ocmlog.DefineSubRealm("OCM plugin handling", "plugins")
Functions ¶
This section is empty.
Types ¶
type AccessMethodDescriptor ¶
type AccessMethodDescriptor struct {
ValueSetDefinition `json:",inline"`
}
type ActionDescriptor ¶
type ActionDescriptor struct { Name string `json:"name"` Versions []string `json:"versions,omitempty"` Description string `json:"description,omitempty"` ConsumerType string `json:"consumerType,omitempty"` DefaultSelectors []string `json:"defaultSelectors,omitempty"` }
func (ActionDescriptor) GetDescription ¶
func (a ActionDescriptor) GetDescription() string
func (ActionDescriptor) GetName ¶
func (a ActionDescriptor) GetName() string
type ArtifactContext ¶
type ArtifactContext struct { ArtifactType string `json:"artifactType"` MediaType string `json:"mediaType"` }
func (ArtifactContext) Describe ¶
func (k ArtifactContext) Describe() string
func (ArtifactContext) GetArtifactType ¶
func (k ArtifactContext) GetArtifactType() string
func (ArtifactContext) GetMediaType ¶
func (k ArtifactContext) GetMediaType() string
func (ArtifactContext) IsValid ¶
func (k ArtifactContext) IsValid() bool
func (ArtifactContext) SetArtifact ¶
func (k ArtifactContext) SetArtifact(arttype, mediatype string) ArtifactContext
func (ArtifactContext) String ¶
func (k ArtifactContext) String() string
type CommandDescriptor ¶ added in v0.12.0
type CommandDescriptor struct { Name string `json:"name"` Description string `json:"description,omitempty"` ObjectType string `json:"objectName,omitempty"` Usage string `json:"usage,omitempty"` Short string `json:"short,omitempty"` Example string `json:"example,omitempty"` Realm string `json:"realm,omitempty"` Verb string `json:"verb,omitempty"` CLIConfigRequired bool `json:"cliconfig,omitempty"` }
func (CommandDescriptor) GetDescription ¶ added in v0.12.0
func (a CommandDescriptor) GetDescription() string
func (CommandDescriptor) GetName ¶ added in v0.12.0
func (a CommandDescriptor) GetName() string
type ConfigTypeDescriptor ¶ added in v0.12.0
type ConfigTypeDescriptor = ValueTypeDefinition
type Descriptor ¶
type Descriptor struct { Version string `json:"version,omitempty"` PluginName string `json:"pluginName"` PluginVersion string `json:"pluginVersion"` Short string `json:"shortDescription"` Long string `json:"description"` ForwardLogging bool `json:"forwardLogging"` Actions []ActionDescriptor `json:"actions,omitempty"` AccessMethods []AccessMethodDescriptor `json:"accessMethods,omitempty"` Uploaders List[UploaderDescriptor] `json:"uploaders,omitempty"` Downloaders List[DownloaderDescriptor] `json:"downloaders,omitempty"` ValueMergeHandlers List[ValueMergeHandlerDescriptor] `json:"valueMergeHandlers,omitempty"` LabelMergeSpecifications List[LabelMergeSpecification] `json:"labelMergeSpecifications,omitempty"` ValueSets List[ValueSetDescriptor] `json:"valuesets,omitempty"` Commands List[CommandDescriptor] `json:"commands,omitempty"` ConfigTypes List[ConfigTypeDescriptor] `json:"configTypes,omitempty"` }
func (*Descriptor) Capabilities ¶ added in v0.4.1
func (d *Descriptor) Capabilities() []string
type DownloaderDescriptor ¶
type DownloaderDescriptor struct { Name string `json:"name"` Description string `json:"description"` Constraints []DownloaderKey `json:"constraints,omitempty"` ConfigScheme string `json:"configScheme,omitempty"` AutoRegistration []DownloaderRegistration `json:"autoRegistration,omitempty"` }
func (DownloaderDescriptor) GetConstraints ¶
func (d DownloaderDescriptor) GetConstraints() []DownloaderKey
func (DownloaderDescriptor) GetDescription ¶
func (d DownloaderDescriptor) GetDescription() string
func (DownloaderDescriptor) GetName ¶
func (d DownloaderDescriptor) GetName() string
type DownloaderKey ¶
type DownloaderKey = ArtifactContext
func NewDownloaderKey ¶
func NewDownloaderKey(arttype, mediatype string) DownloaderKey
type DownloaderRegistration ¶
type DownloaderRegistration struct { DownloaderKey `json:",inline"` Priority int `json:"priority,omitempty"` }
type LabelMergeSpecification ¶ added in v0.4.1
type LabelMergeSpecification struct { Name string `json:"name"` Version string `json:"version,omitempty"` Description string `json:"description,omitempty"` metav1.MergeAlgorithmSpecification `json:",inline"` }
func (LabelMergeSpecification) GetAlgorithm ¶ added in v0.4.1
func (a LabelMergeSpecification) GetAlgorithm() string
func (LabelMergeSpecification) GetConfig ¶ added in v0.4.1
func (a LabelMergeSpecification) GetConfig() json.RawMessage
func (LabelMergeSpecification) GetDescription ¶ added in v0.4.1
func (a LabelMergeSpecification) GetDescription() string
func (LabelMergeSpecification) GetName ¶ added in v0.4.1
func (a LabelMergeSpecification) GetName() string
type RepositoryContext ¶
type RepositoryContext struct { ContextType string `json:"contextType"` RepositoryType string `json:"repositoryType"` }
func (RepositoryContext) Describe ¶
func (k RepositoryContext) Describe() string
func (RepositoryContext) HasRepo ¶
func (k RepositoryContext) HasRepo() bool
func (RepositoryContext) IsValid ¶
func (k RepositoryContext) IsValid() bool
func (RepositoryContext) String ¶
func (k RepositoryContext) String() string
type StringName ¶
type StringName string
func (StringName) GetName ¶
func (e StringName) GetName() string
type UploaderDescriptor ¶
type UploaderDescriptor struct { Name string `json:"name"` Description string `json:"description"` Constraints []UploaderKey `json:"constraints,omitempty"` }
func (UploaderDescriptor) GetConstraints ¶
func (d UploaderDescriptor) GetConstraints() []UploaderKey
func (UploaderDescriptor) GetDescription ¶
func (d UploaderDescriptor) GetDescription() string
func (UploaderDescriptor) GetName ¶
func (d UploaderDescriptor) GetName() string
type UploaderKey ¶
type UploaderKey struct { RepositoryContext `json:",inline"` ArtifactContext `json:",inline"` }
func (UploaderKey) Describe ¶
func (k UploaderKey) Describe() string
func (UploaderKey) IsValid ¶
func (k UploaderKey) IsValid() bool
func (UploaderKey) SetArtifact ¶
func (k UploaderKey) SetArtifact(arttype, mediatype string) UploaderKey
func (UploaderKey) SetRepo ¶
func (k UploaderKey) SetRepo(contexttype, repotype string) UploaderKey
func (UploaderKey) String ¶
func (k UploaderKey) String() string
type UploaderKeySet ¶
type UploaderKeySet = set.Set[UploaderKey]
type ValueMergeHandlerDescriptor ¶ added in v0.4.1
type ValueMergeHandlerDescriptor struct { Name string `json:"name"` Description string `json:"description,omitempty"` }
func (ValueMergeHandlerDescriptor) GetDescription ¶ added in v0.4.1
func (a ValueMergeHandlerDescriptor) GetDescription() string
func (ValueMergeHandlerDescriptor) GetName ¶ added in v0.4.1
func (a ValueMergeHandlerDescriptor) GetName() string
type ValueSetDefinition ¶ added in v0.4.1
type ValueSetDefinition struct { ValueTypeDefinition CLIOptions []CLIOption `json:"options,omitempty"` }
type ValueSetDescriptor ¶ added in v0.4.1
type ValueSetDescriptor struct { ValueSetDefinition `json:",inline"` Purposes []string `json:"purposes"` }
type ValueTypeDefinition ¶ added in v0.12.0
type ValueTypeDefinition struct { Name string `json:"name"` Version string `json:"version,omitempty"` Description string `json:"description"` Format string `json:"format"` }
func (ValueTypeDefinition) GetDescription ¶ added in v0.12.0
func (d ValueTypeDefinition) GetDescription() string
func (ValueTypeDefinition) GetName ¶ added in v0.12.0
func (d ValueTypeDefinition) GetName() string
Click to show internal directories.
Click to hide internal directories.