parser

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientsGeneratedForType

func ClientsGeneratedForType(info *markers.TypeInfo) bool

ClientsGeneratedForType verifies if the genclient marker is enabled for this type or not.

func CollectKinds

func CollectKinds(ctx *genall.GenerationContext, verbs ...string) (map[Group]map[types.PackageVersion][]Kind, error)

CollectKinds finds all groupVersionKinds for which the k8s client-generators are run and the set of verbs are supported. When we are looking at a package, we can determine the group and version by copying the upstream logic: https://github.com/kubernetes/kubernetes/blob/f046bdf24e69ac31d3e1ed56926d9a7c715f1cc8/staging/src/k8s.io/code-generator/cmd/lister-gen/generators/lister.go#L93-L106

func GenclientMarker

func GenclientMarker() *markers.Definition

func GroupGoNameMarker

func GroupGoNameMarker() *markers.Definition

func GroupNameMarker

func GroupNameMarker() *markers.Definition

func IsClusterScoped

func IsClusterScoped(info *markers.TypeInfo) bool

IsClusterScoped verifies if the genclient marker for this type is namespaced or clusterscoped.

func IsNamespaced

func IsNamespaced(info *markers.TypeInfo) bool

IsNamespaced verifies if the genclient marker for this type is namespaced.

func NoStatusMarker

func NoStatusMarker() *markers.Definition

func NoVerbsMarker

func NoVerbsMarker() *markers.Definition

func NonNamespacedMarker

func NonNamespacedMarker() *markers.Definition

func OnlyVerbsMarker

func OnlyVerbsMarker() *markers.Definition

func ReadOnlyMarker

func ReadOnlyMarker() *markers.Definition

func SkipVerbsMarker

func SkipVerbsMarker() *markers.Definition

func SupportedVerbs

func SupportedVerbs(info *markers.TypeInfo) (sets.Set[string], error)

SupportedVerbs determines which verbs the type supports.

func SupportsVerbs

func SupportsVerbs(info *markers.TypeInfo, verbs ...string) (bool, error)

SupportsVerbs determines if the type supports all the verbs.

Types

type Extension

type Extension struct {
	Method      string
	Verb        string
	Subresource string
	InputPath   string
	InputType   string
	ResultPath  string
	ResultType  string
}

func ClientExtensions

func ClientExtensions(info *markers.TypeInfo) []Extension

type Group

type Group struct {
	types.Group
	GoName string
}

type Kind

type Kind struct {
	SupportedVerbs sets.Set[string]
	Extensions     []Extension
	// contains filtered or unexported fields
}

func NewKind

func NewKind(kind string, namespaced bool, supportedVerbs sets.Set[string], extensions []Extension) Kind

func (*Kind) IsNamespaced

func (k *Kind) IsNamespaced() bool

func (*Kind) Plural

func (k *Kind) Plural() string

func (*Kind) String

func (k *Kind) String() string

func (*Kind) SupportsListWatch

func (k *Kind) SupportsListWatch() bool

Jump to

Keyboard shortcuts

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