supported

package
v0.0.0-...-ada06ba Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Keywords are the supported filter words
	Keywords = []string{
		constants.KeyWordLocation,
		constants.KeyWordInstanceType,
		constants.KeyWordKubernetesVersion,
		constants.KeyWordImage,
	}
)

Functions

func ProcessFilter

ProcessFilter returns the proper supported fields, the CloudInfoRequest decide which

Types

type AmazonInfo

type AmazonInfo struct {
	BaseFields
}

AmazonInfo describes AWS with supported info

func (*AmazonInfo) GetImages

func (a *AmazonInfo) GetImages(filter *components.ImageFilter) (map[string][]string, error)

GetImages returns supported AMIs

func (*AmazonInfo) GetKubernetesVersion

func (a *AmazonInfo) GetKubernetesVersion(*components.KubernetesFilter) (interface{}, error)

GetKubernetesVersion returns supported k8s versions

func (*AmazonInfo) GetLocations

func (a *AmazonInfo) GetLocations() ([]string, error)

GetLocations returns supported locations

func (*AmazonInfo) GetMachineTypes

func (a *AmazonInfo) GetMachineTypes() (map[string]components.MachineType, error)

GetMachineTypes returns supported machine types

func (*AmazonInfo) GetMachineTypesWithFilter

func (a *AmazonInfo) GetMachineTypesWithFilter(filter *components.InstanceFilter) (map[string]components.MachineType, error)

GetMachineTypesWithFilter returns supported machine types by location

func (*AmazonInfo) GetNameRegexp

func (a *AmazonInfo) GetNameRegexp() string

GetNameRegexp returns regexp for cluster name

func (*AmazonInfo) GetType

func (a *AmazonInfo) GetType() string

GetType returns cloud type

type AzureInfo

type AzureInfo struct {
	BaseFields
}

AzureInfo describes AKS with supported info

func (*AzureInfo) GetImages

func (a *AzureInfo) GetImages(filter *components.ImageFilter) (map[string][]string, error)

GetImages returns with the supported images (in case of AKS is undefined)

func (*AzureInfo) GetKubernetesVersion

func (a *AzureInfo) GetKubernetesVersion(filter *components.KubernetesFilter) (interface{}, error)

GetKubernetesVersion returns supported k8s versions

func (*AzureInfo) GetLocations

func (a *AzureInfo) GetLocations() ([]string, error)

GetLocations returns supported locations

func (*AzureInfo) GetMachineTypes

func (a *AzureInfo) GetMachineTypes() (map[string]components.MachineType, error)

GetMachineTypes returns supported machine types

func (*AzureInfo) GetMachineTypesWithFilter

func (a *AzureInfo) GetMachineTypesWithFilter(filter *components.InstanceFilter) (map[string]components.MachineType, error)

GetMachineTypesWithFilter returns supported machine types by location

func (*AzureInfo) GetNameRegexp

func (a *AzureInfo) GetNameRegexp() string

GetNameRegexp returns regexp for cluster name

func (*AzureInfo) GetType

func (a *AzureInfo) GetType() string

GetType returns cloud type

type BaseFields

type BaseFields struct {
	OrgId    uint
	SecretId string
}

BaseFields for cloud info types

type CloudInfoProvider

type CloudInfoProvider interface {
	GetType() string
	GetNameRegexp() string
	GetLocations() ([]string, error)
	GetMachineTypes() (map[string]components.MachineType, error)
	GetMachineTypesWithFilter(*components.InstanceFilter) (map[string]components.MachineType, error)
	GetKubernetesVersion(*components.KubernetesFilter) (interface{}, error)
	GetImages(*components.ImageFilter) (map[string][]string, error)
}

CloudInfoProvider interface for cloud supports

func GetCloudInfoModel

func GetCloudInfoModel(cloudType string, r *components.CloudInfoRequest) (CloudInfoProvider, error)

GetCloudInfoModel creates CloudInfoProvider

type GoogleInfo

type GoogleInfo struct {
	BaseFields
}

GoogleInfo describes GKE with supported info

func (*GoogleInfo) GetImages

func (g *GoogleInfo) GetImages(filter *components.ImageFilter) (map[string][]string, error)

GetImages returns with the supported images (in case of GKE is undefined)

func (*GoogleInfo) GetKubernetesVersion

func (g *GoogleInfo) GetKubernetesVersion(filter *components.KubernetesFilter) (interface{}, error)

GetKubernetesVersion returns supported k8s versions

func (*GoogleInfo) GetLocations

func (g *GoogleInfo) GetLocations() ([]string, error)

GetLocations returns supported locations

func (*GoogleInfo) GetMachineTypes

func (g *GoogleInfo) GetMachineTypes() (map[string]components.MachineType, error)

GetMachineTypes returns supported machine types

func (*GoogleInfo) GetMachineTypesWithFilter

func (g *GoogleInfo) GetMachineTypesWithFilter(filter *components.InstanceFilter) (map[string]components.MachineType, error)

GetMachineTypesWithFilter returns supported machine types by location

func (*GoogleInfo) GetNameRegexp

func (g *GoogleInfo) GetNameRegexp() string

GetNameRegexp returns regexp for cluster name

func (*GoogleInfo) GetType

func (g *GoogleInfo) GetType() string

GetType returns cloud type

Jump to

Keyboard shortcuts

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