results

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Overview

Package results provide types and methods used to assemble the results of deprecated objects

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Scope      string `json:"scope,omitempty" yaml:"scope,omitempty"`
	ObjectName string `json:"objectname,omitempty" yaml:"objectname,omitempty"`
	Namespace  string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
	Location   string `json:"location,omitempty" yaml:"location,omitempty"`
}

Item definition of the Items inside a deprecated API

func ListObjects

func ListObjects(items []unstructured.Unstructured) (deprecatedItems []Item)

ListObjects is a generic function that receives unstructured Kubernetes objects and convert to deprecatedItem to be used later in the results

type Result

type Result struct {
	DeprecatedAPIs []ResultItem `json:"deprecated_apis" yaml:"deprecated_apis"`
	DeletedAPIs    []ResultItem `json:"deleted_apis" yaml:"deleted_apis"`
}

Result to show final user

type ResultItem

type ResultItem struct {
	Group       string                     `json:"group,omitempty" yaml:"group,omitempty"`
	Kind        string                     `json:"kind,omitempty" yaml:"kind,omitempty"`
	Version     string                     `json:"version,omitempty" yaml:"version,omitempty"`
	Replacement *v1alpha1.GroupVersionKind `json:"replacement,omitempty" yaml:"replacement,omitempty"`
	// K8sVersion defines which k8s version this API was flagged
	K8sVersion  string `json:"k8sversion,omitempty" yaml:"k8sversion,omitempty"`
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	Items       []Item `json:"deleted_items,omitempty" yaml:"deleted_items,omitempty"`
}

func CreateItem

func CreateItem(group, version, kind string, items []Item) ResultItem

Jump to

Keyboard shortcuts

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