parser

package
v1.5.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package parser provide types and methods used to convert the swagger.json into a valid KubeAPI structure

Index

Constants

View Source
const (
	CoreAPI = "CORE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIGroups

type APIGroups map[string]APIKinds

APIGroups contains a map of groups of APIs that exists. Eg.: networking.k8s.io

func NewAPIGroupsFromSwaggerFile

func NewAPIGroupsFromSwaggerFile(swaggerfile string) (APIGroups, error)

func (APIGroups) CheckForItem

func (db APIGroups) CheckForItem(group, version, kind, resource string, itemlister ListerFunc) (*results.ResultItem, bool, error)

CheckForItem verifies for an item inside a database and returns: An item (may be null case not found/not deprecated) A bool that indicate if the field was deleted. False indicates it was deprecated An error

type APIKinds

type APIKinds map[string]APIVersion

APIKind contains a Kind of API (like "Ingress") and may also be populated with the resource name

type APIVersion

type APIVersion map[string]APIVersionStatus

APIVersion is an APIVersion of a group/kind that will be queried on description and if it is deprecated

type APIVersionStatus

type APIVersionStatus struct {
	Description string
	Deprecated  bool
}

APIVersionStatus represents the status of a group/kind/version

type ListerFunc

type ListerFunc func(group, version, resource, kind string) (results.ResultItem, error)

type ManifestsFiles

type ManifestsFiles map[string]struct {
	Filename  string
	APIGroups APIGroups
}

Jump to

Keyboard shortcuts

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