util

package
v0.28.12 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 214

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReadonlyVerbs = []string{
	"get",
	"list",
	"watch",
}

ReadonlyVerbs represents a list of read-only verbs.

View Source
var SupportedVerbs = []string{
	"create",
	"update",
	"updateStatus",
	"delete",
	"deleteCollection",
	"get",
	"list",
	"watch",
	"patch",
	"apply",
	"applyStatus",
}

SupportedVerbs is a list of supported verbs for +onlyVerbs and +skipVerbs.

Functions

func ParsePathGroupVersion added in v0.21.0

func ParsePathGroupVersion(pgvString string) (gvPath string, gvString string)

Types

type Tags

type Tags struct {
	// +genclient
	GenerateClient bool
	// +genclient:nonNamespaced
	NonNamespaced bool
	// +genclient:noStatus
	NoStatus bool
	// +genclient:noVerbs
	NoVerbs bool
	// +genclient:skipVerbs=get,update
	// +genclient:onlyVerbs=create,delete
	SkipVerbs []string
	// +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale
	Extensions []extension
}

Tags represents a genclient configuration for a single type.

func MustParseClientGenTags

func MustParseClientGenTags(lines []string) Tags

MustParseClientGenTags calls ParseClientGenTags but instead of returning error it panics.

func ParseClientGenTags

func ParseClientGenTags(lines []string) (Tags, error)

ParseClientGenTags parse the provided genclient tags and validates that no unknown tags are provided.

func (Tags) HasVerb

func (t Tags) HasVerb(verb string) bool

HasVerb returns true if we should include the given verb in final client interface and generate the function for it.

Jump to

Keyboard shortcuts

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