catalog

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComponentExists

func ComponentExists(client *occlient.Client, componentType string, componentVersion string) (bool, error)

ComponentExists returns true if the given component type and the version are valid, false if not

func GetDevfileRegistries

func GetDevfileRegistries(registryName string) (map[string]Registry, error)

GetDevfileRegistries gets devfile registries from preference file, if registry name is specified return the specific registry, otherwise return all registries

func IsComponentTypeSupported

func IsComponentTypeSupported(client *occlient.Client, componentType string) (bool, error)

IsComponentTypeSupported takes the componentType e.g. java:8 and return true if it is fully supported i.e. debug mode and more.

func SearchComponent

func SearchComponent(client *occlient.Client, name string) ([]string, error)

SearchComponent searches for the component

func SliceSupportedTags

func SliceSupportedTags(component ComponentType) ([]string, []string)

SliceSupportedTags splits the tags in to fully supported and unsupported tags

Types

type ComponentSpec

type ComponentSpec struct {
	AllTags         []string               `json:"allTags"`
	NonHiddenTags   []string               `json:"nonHiddenTags"`
	SupportedTags   []string               `json:"supportedTags"`
	ImageStreamTags []imagev1.TagReference `json:"imageStreamTags"`
}

ComponentSpec is the spec for ComponentType

type ComponentType

type ComponentType struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ComponentSpec `json:"spec,omitempty"`
}

ComponentType is the main struct for catalog components

type ComponentTypeList

type ComponentTypeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ComponentType `json:"items"`
}

ComponentTypeList lists all the ComponentType's

func ListComponents

func ListComponents(client *occlient.Client) (ComponentTypeList, error)

ListComponents lists all the available component types

type DevfileComponentType

type DevfileComponentType struct {
	Name        string
	DisplayName string
	Description string
	Link        string
	Registry    Registry
}

DevfileComponentType is the main struct for devfile catalog components

type DevfileComponentTypeList

type DevfileComponentTypeList struct {
	DevfileRegistries map[string]Registry
	Items             []DevfileComponentType
}

DevfileComponentTypeList lists all the DevfileComponentType's

func ListDevfileComponents

func ListDevfileComponents(registryName string) (DevfileComponentTypeList, error)

ListDevfileComponents lists all the available devfile components

type DevfileIndexEntry

type DevfileIndexEntry struct {
	Name              string   `json:"name"`
	DisplayName       string   `json:"displayName"`
	Description       string   `json:"description"`
	Supported         bool     `json:"supported"`
	Tags              []string `json:"tags"`
	Icon              string   `json:"icon"`
	GlobalMemoryLimit string   `json:"globalMemoryLimit"`
	Registry          Registry `json:"registry"`
	Links             struct {
		Link string `json:"self"`
	} `json:"links"`
}

DevfileIndexEntry is the main struct of index.json from devfile registry

type Registry

type Registry struct {
	Name string
	URL  string
}

Registry is the main struct of devfile registry

type ServiceSpec

type ServiceSpec struct {
	Hidden   bool     `json:"hidden"`
	PlanList []string `json:"planList"`
}

ServiceSpec is the spec for ServiceType

type ServiceType

type ServiceType struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ServiceSpec `json:"spec,omitempty"`
}

ServiceType is the main struct for catalog services

type ServiceTypeList

type ServiceTypeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ServiceType `json:"items"`
}

ServiceTypeList lists all the ServiceType's

func ListServices

func ListServices(client *occlient.Client) (ServiceTypeList, error)

ListServices lists all the available service types

func SearchService

func SearchService(client *occlient.Client, name string) (ServiceTypeList, error)

SearchService searches for the services

Jump to

Keyboard shortcuts

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