apiobject

package module
v0.0.0-...-11c4752 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

README

pgk apiobject

This package contains a general Kubernetes API Object handling.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiObject

type ApiObject struct {
	Kind     string
	Metadata struct {
		Name      string
		Namespace string
	}
}

ApiObject holds the object information of the API Object

func New

func New(r io.Reader) (ao *ApiObject, err error)

New parses a YAML of a Kubernetes Object description returns an initialized API Object returns an error, if the Reader contains no valid yaml object

func (*ApiObject) Exists

func (ao *ApiObject) Exists() bool

Exists returns a bool. true if the Object exists in the cluster, false if not It returns also false, when there is no information if the object is namespaced

func (*ApiObject) Namespaced

func (ao *ApiObject) Namespaced() (b bool, err error)

Namespaced returns a bool if the API Object is namespaced or not returns an error if Kind is not found TODO must be made dynamic by fetching supported API-Resources from current cluster

Jump to

Keyboard shortcuts

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