results

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

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 DeletedAPI

type DeletedAPI struct {
	Group   string `json,yaml:"group,omitempty"`
	Kind    string `json,yaml:"kind,omitempty"`
	Version string `json,yaml:"version,omitempty"`
	Name    string `json,yaml:"name,omitempty"`
	// TODO: What is this boolean for? All APIs here aren't already marked as Deleted?
	Deleted bool   `json,yaml:"deleted,omitempty"`
	Items   []Item `json,yaml:"deleted_items,omitempty"`
}

DeletedAPI definition of an API

type DeprecatedAPI

type DeprecatedAPI struct {
	Description string `json,yaml:"description,omitempty"`
	Group       string `json,yaml:"group,omitempty"`
	Kind        string `json,yaml:"kind,omitempty"`
	Version     string `json,yaml:"version,omitempty"`
	Name        string `json,yaml:"name,omitempty"`
	// TODO: What is this boolean for? All APIs here aren't already marked as Deprecated?
	Deprecated bool   `json,yaml:"deprecated,omitempty"`
	Items      []Item `json,yaml:"deprecated_items,omitempty"`
}

DeprecatedAPI definition of an API

type Item

type Item struct {
	Scope      string `json,yaml:"scope,omitempty"`
	ObjectName string `json,yaml:"objectname,omitempty"`
	Namespace  string `json,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 []DeprecatedAPI `json,yaml:"deprecated_apis,omitempty"`
	DeletedAPIs    []DeletedAPI    `json,yaml:"deleted_apis,omitempty"`
}

Result to show final user

Jump to

Keyboard shortcuts

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