types

package
v3.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiVersion

func ApiVersion(version string) string

Types

type Wrapper

type Wrapper struct {
	corev2.TypeMeta

	// Value is a valid Resource of concrete type Type.
	Value interface{} `json:"spec" yaml:"spec"`
}

Wrapper is a generic wrapper, with a type field for distinguishing its contents.

func WrapResource

func WrapResource(r interface{}) Wrapper

WrapResource wraps a Resource in a Wrapper that contains TypeMeta and ObjectMeta.

func (Wrapper) MarshalYAML

func (w Wrapper) MarshalYAML() (interface{}, error)

MarshalYAML implements yaml.Marshaler

func (*Wrapper) UnmarshalJSON

func (w *Wrapper) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

Jump to

Keyboard shortcuts

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