unstructured

package
v0.0.0-...-445da97 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIntField

func GetIntField(obj map[string]interface{}, fieldPath string, defaultValue int) int

GetIntField return field as string defaulting to value if not found

func GetStringField

func GetStringField(obj map[string]interface{}, fieldPath string, defaultValue string) string

GetStringField return field as string defaulting to value if not found

Types

type BasicCondition

type BasicCondition struct {
	// Type Condition type
	Type string `json:"type"`
	// Status is one of True,False,Unknown
	Status string `json:"status"`
	// Reason simple single word reason in CamleCase
	// +optional
	Reason string `json:"reason,omitempty"`
	// Message human readable reason
	// +optional
	Message string `json:"message,omitempty"`
}

BasicCondition fields that are expected in a condition

type ConditionStatus

type ConditionStatus struct {
	// Array of Conditions as expected to be present in kubernetes resources
	Conditions []BasicCondition `json:"conditions"`
}

ConditionStatus represent status with condition array

type ObjWithConditions

type ObjWithConditions struct {
	// Status as expected to be present in most compliant kubernetes resources
	Status ConditionStatus `json:"status"`
}

ObjWithConditions Represent meta object with status.condition array

func GetObjectWithConditions

func GetObjectWithConditions(in map[string]interface{}) *ObjWithConditions

GetObjectWithConditions return typed object

Jump to

Keyboard shortcuts

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