apiresource

package
v1.21.0 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: 8 Imported by: 0

Documentation

Overview

Package apiresource resolves API resources and GVKs associated with CLI commands.

Index

Constants

View Source
const Tag = "api-resource"

Tag is the struct tag used when a command name differs from its target API resource (e.g. "clusters" acting on "kubernetesclusters").

Variables

This section is empty.

Functions

func FindKind

func FindKind(scheme *runtime.Scheme, resource string) (schema.GroupVersionKind, error)

FindKind resolves a resource name (singular, plural, or hyphenated) to its Nine API schema.GroupVersionKind.

func FindListKind

func FindListKind(scheme *runtime.Scheme, resource string) (schema.GroupVersionKind, error)

FindListKind resolves a resource name to its list schema.GroupVersionKind.

func OfCommand

func OfCommand(node *kong.Node) string

OfCommand returns the API resource name declared in the node tag, or the node name if unset.

Types

This section is empty.

Jump to

Keyboard shortcuts

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