Documentation ¶
Overview ¶
Package openapi is a collection of libraries for fetching the openapi spec from a Kubernetes server and then indexing the type definitions. The openapi spec contains the object model definitions and extensions metadata such as the patchStrategy and patchMergeKey for creating patches.
Index ¶
Constants ¶
const PrintColumnsKey = "x-kubernetes-print-columns"
Variables ¶
This section is empty.
Functions ¶
func GetPrintColumns ¶
func GetPrintColumns(extensions spec.Extensions) (string, bool)
GetPrintColumns looks for the open API extension for the display columns.
func ParseGroupVersionKind ¶
func ParseGroupVersionKind(s *openapi_v2.Schema) string
Get and parse GroupVersionKind from the extension. Returns empty if it doesn't have one.
Types ¶
type Getter ¶
type Getter interface { // OpenAPIData returns the parsed OpenAPIData Get() (openapi.Resources, error) }
Getter is an interface for fetching openapi specs and parsing them into an Resources struct
func NewOpenAPIGetter ¶
func NewOpenAPIGetter(openAPIClient discovery.OpenAPISchemaInterface) Getter
NewOpenAPIGetter returns an object to return OpenAPIDatas which reads from a server, and then stores in memory for subsequent invocations