swaggerstore

package
v1.5.1 Latest Latest
Warning

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

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

Documentation

Overview

Package swaggerstore provides a store based on a Kubernetes Swagger API definitions

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

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 ManifestsFiles

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

type SwaggerStore

type SwaggerStore struct {
	// contains filtered or unexported fields
}

func NewSwaggerStoreFromBytes

func NewSwaggerStoreFromBytes(data []byte) (*SwaggerStore, error)

NewSwaggerStoreFromReader allows setting a reader as a database. It should contain a valid Kubernetes swagger definition

func NewSwaggerStoreFromFile

func NewSwaggerStoreFromFile(swaggerfile string) (*SwaggerStore, error)

func (*SwaggerStore) GetAPIDefinition

func (s *SwaggerStore) GetAPIDefinition(_ context.Context, group, version, kind string) (description string, deprecated bool, err error)

Jump to

Keyboard shortcuts

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