v1alpha1

package
v0.0.0-...-b25b198 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 8

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the cli v1alpha1 API group +kubebuilder:object:generate=true +groupName=cli.tanzu.vmware.com

Index

Constants

View Source
const (
	// NativePluginCompletion indicates command line completion is determined using the built in
	// cobra.Command __complete mechanism.
	NativePluginCompletion PluginCompletionType = iota
	// StaticPluginCompletion indicates command line completion will be done by using a statically
	// defined list of options.
	StaticPluginCompletion
	// DynamicPluginCompletion indicates command line completion will be retrieved from the plugin
	// at runtime.
	DynamicPluginCompletion

	// RunCmdGroup are commands associated with Tanzu Run.
	RunCmdGroup CmdGroup = "Run"

	// ManageCmdGroup are commands associated with Tanzu Manage.
	ManageCmdGroup CmdGroup = "Manage"

	// BuildCmdGroup are commands associated with Tanzu Build.
	BuildCmdGroup CmdGroup = "Build"

	// ObserveCmdGroup are commands associated with Tanzu Observe.
	ObserveCmdGroup CmdGroup = "Observe"

	// SystemCmdGroup are system commands.
	SystemCmdGroup CmdGroup = "System"

	// TargetCmdGroup are various target commands.
	TargetCmdGroup CmdGroup = "Target"

	// VersionCmdGroup are version commands.
	VersionCmdGroup CmdGroup = "Version"

	// AdminCmdGroup are admin commands.
	AdminCmdGroup CmdGroup = "Admin"

	// TestCmdGroup is the test command group.
	TestCmdGroup CmdGroup = "Test"

	// ExtraCmdGroup is the extra command group.
	ExtraCmdGroup CmdGroup = "Extra"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "cli.tanzu.vmware.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme

	// GroupVersionKindCatalog has information about group, version and kind of Catalog object.
	GroupVersionKindCatalog = GroupVersion.WithKind("Catalog")
)

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// PluginDescriptors is a list of PluginDescriptor
	PluginDescriptors []*PluginDescriptor `json:"pluginDescriptors,omitempty" yaml:"pluginDescriptors"`

	// IndexByPath of PluginDescriptors for all installed plugins by installation path.
	IndexByPath map[string]PluginDescriptor `json:"indexByPath,omitempty"`
	// IndeByName of all plugin installation paths by name.
	IndexByName map[string][]string `json:"indexByName,omitempty"`
	// StandAlonePlugins is a set of stand-alone plugin installations aggregated across all context types.
	// Note: Shall be reduced to only those stand-alone plugins that are common to all context types.
	StandAlonePlugins PluginAssociation `json:"standAlonePlugins,omitempty"`
	// ServerPlugins links a server and a set of associated plugin installations.
	ServerPlugins map[string]PluginAssociation `json:"serverPlugins,omitempty"`
}

Catalog is the Schema for the catalogs API

func (*Catalog) DeepCopy

func (in *Catalog) DeepCopy() *Catalog

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Catalog.

func (*Catalog) DeepCopyInto

func (in *Catalog) DeepCopyInto(out *Catalog)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Catalog) DeepCopyObject

func (in *Catalog) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CatalogList

type CatalogList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Catalog `json:"items"`
}

CatalogList contains a list of Catalog

func (*CatalogList) DeepCopy

func (in *CatalogList) DeepCopy() *CatalogList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatalogList.

func (*CatalogList) DeepCopyInto

func (in *CatalogList) DeepCopyInto(out *CatalogList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CatalogList) DeepCopyObject

func (in *CatalogList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CmdGroup

type CmdGroup string

CmdGroup is a group of CLI commands.

type Distro

type Distro []string

Distro is the Schema for the catalogs API

func (Distro) DeepCopy

func (in Distro) DeepCopy() Distro

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Distro.

func (Distro) DeepCopyInto

func (in Distro) DeepCopyInto(out *Distro)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Hook

type Hook func() error

Hook is the mechanism used to define function for plugin hooks

func (*Hook) DeepCopyInto

func (in *Hook) DeepCopyInto(out *Hook)

DeepCopyInto is an deepcopy function implementation of Hook currently there is nothing that we need to copy hence keeping this empty

type PluginAssociation

type PluginAssociation map[string]string

PluginAssociation is a set of plugin names and their associated installation paths.

func (PluginAssociation) Add

func (pa PluginAssociation) Add(pluginName, installationPath string)

Add adds plugin entry to the map

func (PluginAssociation) DeepCopy

func (in PluginAssociation) DeepCopy() PluginAssociation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginAssociation.

func (PluginAssociation) DeepCopyInto

func (in PluginAssociation) DeepCopyInto(out *PluginAssociation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PluginAssociation) Get

func (pa PluginAssociation) Get(pluginName string) string

Get returns installation path for the plugin If plugin doesn't exists in map it will return empty string

func (PluginAssociation) Map

func (pa PluginAssociation) Map() map[string]string

Map returns associated list of plugins as a map

func (PluginAssociation) Remove

func (pa PluginAssociation) Remove(pluginName string)

Remove deletes plugin entry from the map

type PluginCompletionType

type PluginCompletionType int

PluginCompletionType is the mechanism used for determining command line completion options.

type PluginDescriptor

type PluginDescriptor struct {
	// Name is the name of the plugin.
	Name string `json:"name" yaml:"name"`

	// Description is the plugin's description.
	Description string `json:"description" yaml:"description"`

	// Version of the plugin. Must be a valid semantic version https://semver.org/
	Version string `json:"version" yaml:"version"`

	// BuildSHA is the git commit hash the plugin was built with.
	BuildSHA string `json:"buildSHA" yaml:"buildSHA"`

	// Digest is the SHA256 hash of the plugin binary.
	Digest string `json:"digest" yaml:"digest"`

	// Command group for the plugin.
	Group CmdGroup `json:"group" yaml:"group"`

	// DocURL for the plugin.
	DocURL string `json:"docURL" yaml:"docURL"`

	// Hidden tells whether the plugin should be hidden from the help command.
	Hidden bool `json:"hidden,omitempty" yaml:"hidden,omitempty"`

	// CompletionType determines how command line completion will be determined.
	CompletionType PluginCompletionType `json:"completionType" yaml:"completionType"`

	// CompletionArgs contains the valid command line completion values if `CompletionType`
	// is set to `StaticPluginCompletion`.
	CompletionArgs []string `json:"completionArgs,omitempty" yaml:"completionArgs,omitempty"`

	// CompletionCommand is the command to call from the plugin to retrieve a list of
	// valid completion nouns when `CompletionType` is set to `DynamicPluginCompletion`.
	CompletionCommand string `json:"completionCmd,omitempty" yaml:"completionCmd,omitempty"`

	// Aliases are other text strings used to call this command
	Aliases []string `json:"aliases,omitempty" yaml:"aliases,omitempty"`

	// InstallationPath is a relative installation path for a plugin binary.
	// E.g., cluster/v0.3.2@sha256:...
	InstallationPath string `json:"installationPath"`

	// Discovery is the name of the discovery from where
	// this plugin is discovered.
	Discovery string `json:"discovery"`

	// Scope is the scope of the plugin. Stand-Alone or Context
	Scope string `json:"scope"`

	// Status is the current plugin installation status
	Status string `json:"status"`

	// DiscoveredRecommendedVersion specifies the recommended version of the plugin that was discovered
	DiscoveredRecommendedVersion string `json:"discoveredRecommendedVersion"`

	// Target specifies the target of the plugin
	Target cliv1alpha1.Target `json:"target"`

	// PostInstallHook is function to be run post install of a plugin.
	PostInstallHook Hook `json:"-" yaml:"-"`

	// DefaultFeatureFlags is default featureflags to be configured if missing when invoking plugin
	DefaultFeatureFlags map[string]bool `json:"defaultFeatureFlags"`
}

PluginDescriptor describes a plugin binary.

func (*PluginDescriptor) DeepCopy

func (in *PluginDescriptor) DeepCopy() *PluginDescriptor

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginDescriptor.

func (*PluginDescriptor) DeepCopyInto

func (in *PluginDescriptor) DeepCopyInto(out *PluginDescriptor)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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