catalog

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DevfileRegistries = []string{
	"https://raw.githubusercontent.com/elsony/devfile-registry/master",
	"https://che-devfile-registry.openshift.io/",
}

DevfileRegistries contains the links of all devfile registries

Functions

func ComponentExists added in v1.0.0

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 IsComponentTypeSupported added in v1.0.0

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 IsDevfileComponentSupported added in v1.1.1

func IsDevfileComponentSupported(devfile Devfile) bool

IsDevfileComponentSupported checks if the devfile is supported The supported devfile should satisfy the following conditions: 1. Devfile has dockerimage as component type 2. Devfile has alias 3. Devfile has run command 4. Devfile has build command

func SearchComponent added in v1.0.0

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

SearchComponent searches for the component

func SliceSupportedTags added in v1.0.0

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

SliceSupportedTags splits the tags in to fully supported and unsupported tags

Types

type ComponentSpec added in v1.0.0

type ComponentSpec struct {
	AllTags        []string            `json:"allTags"`
	NonHiddenTags  []string            `json:"nonHiddenTags"`
	SupportedTags  []string            `json:"supportedTags"`
	ImageStreamRef imagev1.ImageStream `json:"-"`
}

ComponentSpec is the spec for ComponentType

type ComponentType added in v1.0.0

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 added in v1.0.0

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

ComponentTypeList lists all the ComponentType's

func ListComponents added in v1.0.0

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

ListComponents lists all the available component types

type Devfile added in v1.1.1

type Devfile struct {
	APIVersion string `yaml:"apiVersion"`
	MetaData   struct {
		GenerateName string `yaml:"generateName"`
	} `yaml:"metadata"`
	Components []struct {
		Type  string `yaml:"type"`
		Alias string `yaml:"alias"`
	} `yaml:"components"`
	Commands []struct {
		Name string `yaml:"name"`
	} `yaml:"commands"`
}

Devfile is the main structure of devfile from devfile registry

func GetDevfile added in v1.1.1

func GetDevfile(devfileLink string) (Devfile, error)

GetDevfile loads the devfile

type DevfileComponentType added in v1.1.1

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

DevfileComponentType is the main struct for devfile catalog components

type DevfileComponentTypeList added in v1.1.1

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

DevfileComponentTypeList lists all the DevfileComponentType's

func ListDevfileComponents added in v1.1.1

func ListDevfileComponents() (DevfileComponentTypeList, error)

ListDevfileComponents lists all the available devfile components

type DevfileIndexEntry added in v1.1.1

type DevfileIndexEntry struct {
	DisplayName       string   `json:"displayName"`
	Description       string   `json:"description"`
	Tags              []string `json:"tags"`
	Icon              string   `json:"icon"`
	GlobalMemoryLimit string   `json:"globalMemoryLimit"`
	Links             struct {
		Link string `json:"self"`
	} `json:"links"`
}

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

func GetDevfileIndex added in v1.1.1

func GetDevfileIndex(devfileIndexLink string) ([]DevfileIndexEntry, error)

GetDevfileIndex loads the devfile registry index.json

type ServiceSpec added in v1.0.0

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

ServiceSpec is the spec for ServiceType

type ServiceType added in v1.0.0

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 added in v1.0.0

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

ServiceTypeList lists all the ServiceType's

func ListServices added in v1.0.0

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

ListServices lists all the available service types

func SearchService added in v1.0.0

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