gvk

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gvk

type Gvk struct {
	Group   string `json:"group,omitempty" yaml:"group,omitempty"`
	Version string `json:"version,omitempty" yaml:"version,omitempty"`
	Kind    string `json:"kind,omitempty" yaml:"kind,omitempty"`
}

Gvk identifies a Kubernetes API type. https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md

func FromKind

func FromKind(k string) Gvk

FromKind makes a Gvk with only the kind specified.

func FromString

func FromString(s string) Gvk

FromString makes a Gvk with a string, which is constructed by String() function

func (Gvk) Equals

func (x Gvk) Equals(o Gvk) bool

Equals returns true if the Gvk's have equal fields.

func (Gvk) IsLessThan

func (x Gvk) IsLessThan(o Gvk) bool

IsLessThan returns true if self is less than the argument.

func (Gvk) IsNamespaceableKind

func (x Gvk) IsNamespaceableKind() bool

IsNamespaceableKind returns true if x is a namespaceable Gvk Implements https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#not-all-objects-are-in-a-namespace

func (Gvk) IsSelected

func (x Gvk) IsSelected(selector *Gvk) bool

IsSelected returns true if `selector` selects `x`; otherwise, false. If `selector` and `x` are the same, return true. If `selector` is nil, it is considered a wildcard match, returning true. If selector fields are empty, they are considered wildcards matching anything in the corresponding fields, e.g.

this item:

<Group: "extensions", Version: "v1beta1", Kind: "Deployment">

is selected by

<Group: "",           Version: "",        Kind: "Deployment">

but rejected by

<Group: "apps",       Version: "",        Kind: "Deployment">

func (Gvk) String

func (x Gvk) String() string

String returns a string representation of the GVK.

Jump to

Keyboard shortcuts

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