schema

package
v0.0.0-...-a134451 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyObjectKind = emptyObjectKind{}

EmptyObjectKind implements the ObjectKind interface as a noop

View Source
var SchemeGroupVersion = GroupVersion{Group: constant.GroupName, Version: "v1"}

Functions

This section is empty.

Types

type GroupKind

type GroupKind struct {
	Group string
	Kind  string
}

GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types

func (GroupKind) Empty

func (gk GroupKind) Empty() bool

func (GroupKind) String

func (gk GroupKind) String() string

func (GroupKind) WithVersion

func (gk GroupKind) WithVersion(version string) GroupVersionKind

type GroupResource

type GroupResource struct {
	Group    string
	Resource string
}

GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types

func (GroupResource) Empty

func (gr GroupResource) Empty() bool

func (GroupResource) String

func (gr GroupResource) String() string

func (GroupResource) WithVersion

func (gr GroupResource) WithVersion(version string) GroupVersionResource

type GroupVersion

type GroupVersion struct {
	Group   string
	Version string
}

GroupVersion contains the "group" and the "version", which uniquely identifies the API.

func (GroupVersion) Empty

func (gv GroupVersion) Empty() bool

Empty returns true if group and version are empty

func (GroupVersion) Identifier

func (gv GroupVersion) Identifier() string

Identifier implements runtime.GroupVersioner interface.

func (GroupVersion) KindForGroupVersionKinds

func (gv GroupVersion) KindForGroupVersionKinds(kinds []GroupVersionKind) (target GroupVersionKind, ok bool)

KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false if none of the options match the group. It prefers a match to group and version over just group.

func (GroupVersion) String

func (gv GroupVersion) String() string

String puts "group" and "version" into a single "group/version" string. For the legacy v1 it returns "v1".

func (GroupVersion) WithKind

func (gv GroupVersion) WithKind(kind string) GroupVersionKind

WithKind creates a GroupVersionKind based on the method receiver's GroupVersion and the passed Kind.

func (GroupVersion) WithResource

func (gv GroupVersion) WithResource(resource string) GroupVersionResource

WithResource creates a GroupVersionResource based on the method receiver's GroupVersion and the passed Resource.

type GroupVersionKind

type GroupVersionKind struct {
	Group   string
	Version string
	Kind    string
}

GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling

func (GroupVersionKind) Empty

func (gvk GroupVersionKind) Empty() bool

Empty returns true if group, version, and kind are empty

func (GroupVersionKind) GroupKind

func (gvk GroupVersionKind) GroupKind() GroupKind

func (GroupVersionKind) GroupVersion

func (gvk GroupVersionKind) GroupVersion() GroupVersion

func (GroupVersionKind) String

func (gvk GroupVersionKind) String() string

type GroupVersionResource

type GroupVersionResource struct {
	Group    string
	Version  string
	Resource string
}

GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling

func (GroupVersionResource) Empty

func (gvr GroupVersionResource) Empty() bool

func (GroupVersionResource) GroupResource

func (gvr GroupVersionResource) GroupResource() GroupResource

func (GroupVersionResource) GroupVersion

func (gvr GroupVersionResource) GroupVersion() GroupVersion

func (GroupVersionResource) String

func (gvr GroupVersionResource) String() string

type ObjectKind

type ObjectKind interface {
	// SetGroupVersionKind sets or clears the intended serialized kind of an object. Passing kind nil
	// should clear the current setting.
	SetGroupVersionKind(kind GroupVersionKind)
	// GroupVersionKind returns the stored group, version, and kind of an object, or an empty struct
	// if the object does not expose or provide these fields.
	GroupVersionKind() GroupVersionKind
}

ObjectKind All objects that are serialized from a Scheme encode their type information. This interface is used by serialization to set type information from the Scheme onto the serialized version of an object. For objects that cannot be serialized or have unique requirements, this interface may be a no-op.

Jump to

Keyboard shortcuts

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