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

resourcekind

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matcher

type Matcher struct {
	// contains filtered or unexported fields
}

Matcher provides functionality to match and resolve Kubernetes resource kinds

func NewMatcher

func NewMatcher() *Matcher

NewMatcher creates a new Matcher with common Kubernetes resource kinds

func (*Matcher) Match

func (m *Matcher) Match(kind, filter string) bool

Match checks if a resource kind matches a given filter The filter can be a short name, singular, or plural form

func (*Matcher) MatchesAny

func (m *Matcher) MatchesAny(kind string, filters []string) bool

MatchesAny checks if a resource kind matches any of the filters

func (*Matcher) ParseList

func (m *Matcher) ParseList(list string) []string

ParseList parses a comma-separated list of resource kinds Returns a slice of canonical Kind names

func (*Matcher) Resolve

func (m *Matcher) Resolve(name string) (string, bool)

Resolve resolves a resource name (short, singular, or plural) to its canonical Kind Returns the canonical Kind name and true if found, empty string and false otherwise

type ResourceKind

type ResourceKind struct {
	Kind       string   // Canonical kind name (e.g., "Deployment")
	Singular   string   // Singular form (e.g., "deployment")
	Plural     string   // Plural form (e.g., "deployments")
	ShortNames []string // Short names (e.g., ["deploy"])
}

ResourceKind represents a Kubernetes resource with its various name forms

Jump to

Keyboard shortcuts

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