Help us shape the future of Go! Take the 2026 Go Developer Survey

convert

package
v2.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Scheme = func() *runtime.Scheme {
	scheme := runtime.NewScheme()
	internalacmeinstall.Install(scheme)
	internalcertmanagerinstall.Install(scheme)
	internalmetainstall.Install(scheme)

	listGroupVersion := schema.GroupVersionKind{Group: "", Version: runtime.APIVersionInternal, Kind: "List"}
	scheme.AddKnownTypeWithName(listGroupVersion, &metainternalversion.List{})
	metav1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"})

	utilruntime.Must(kscheme.AddToScheme(scheme))
	utilruntime.Must(metainternalversion.AddToScheme(scheme))

	_ = scheme.AddConversionFunc((*corev1.List)(nil), (*metainternalversion.List)(nil), func(a, b any, scope conversion.Scope) error {
		metaList := &metav1.List{}
		metaList.Items = a.(*corev1.List).Items
		return metainternalversion.Convert_v1_List_To_internalversion_List(metaList, b.(*metainternalversion.List), scope)
	})

	_ = scheme.AddConversionFunc((*metainternalversion.List)(nil), (*corev1.List)(nil), func(a, b any, scope conversion.Scope) error {
		metaList := &metav1.List{}
		err := metainternalversion.Convert_internalversion_List_To_v1_List(a.(*metainternalversion.List), metaList, scope)
		if err != nil {
			return err
		}
		b.(*corev1.List).Items = metaList.Items
		return nil
	})

	return scheme
}()

Functions

func NewCmdConvert

func NewCmdConvert(setupCtx context.Context, ioStreams genericclioptions.IOStreams) *cobra.Command

NewCmdConvert returns a cobra command for converting cert-manager resources

Types

type Options

Options is a struct to support convert command

func NewOptions

func NewOptions(ioStreams genericclioptions.IOStreams) *Options

NewOptions returns initialized Options

func (*Options) Complete

func (o *Options) Complete() error

Complete collects information required to run Convert command from command line.

func (*Options) Run

func (o *Options) Run(ctx context.Context) error

Run executes convert command

Directories

Path Synopsis
internal
apis/acme
Package acme is the internal version of the API.
Package acme is the internal version of the API.
apis/acme/install
Package install installs the API group, making it available as an option to all of the API encoding/decoding machinery.
Package install installs the API group, making it available as an option to all of the API encoding/decoding machinery.
apis/acme/v1
+groupName=acme.cert-manager.io
+groupName=acme.cert-manager.io
apis/acme/v1alpha2
+groupName=acme.cert-manager.io
+groupName=acme.cert-manager.io
apis/acme/v1alpha3
+groupName=acme.cert-manager.io
+groupName=acme.cert-manager.io
apis/acme/v1beta1
+groupName=acme.cert-manager.io
+groupName=acme.cert-manager.io
apis/certmanager
Package certmanager is the internal version of the API.
Package certmanager is the internal version of the API.
apis/certmanager/install
Package install installs the API group, making it available as an option to all of the API encoding/decoding machinery.
Package install installs the API group, making it available as an option to all of the API encoding/decoding machinery.
apis/certmanager/v1
+groupName=cert-manager.io
+groupName=cert-manager.io
apis/certmanager/v1alpha2
+groupName=cert-manager.io
+groupName=cert-manager.io
apis/certmanager/v1alpha3
+groupName=cert-manager.io
+groupName=cert-manager.io
apis/certmanager/v1beta1
+groupName=cert-manager.io
+groupName=cert-manager.io
apis/meta
Package meta is the internal version of the API.
Package meta is the internal version of the API.
apis/meta/install
Package install installs the API group, making it available as an option to all of the API encoding/decoding machinery.
Package install installs the API group, making it available as an option to all of the API encoding/decoding machinery.
apis/meta/v1
+groupName=meta.cert-manager.io
+groupName=meta.cert-manager.io

Jump to

Keyboard shortcuts

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