v1

package
v0.0.61 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const TypeCloudProviderDescribe workloadinterface.ObjectType = "CloudProviderDescribe"
View Source
const Version = "v1"

Variables

This section is empty.

Functions

func IsTypeDescriptiveInfoFromCloudProvider

func IsTypeDescriptiveInfoFromCloudProvider(object map[string]interface{}) bool

DEPRECATED - Use apis.IsTypeDescriptiveInfoFromCloudProvider instead

Types

type CloudProviderDescribe

type CloudProviderDescribe struct {
	ApiVersion string                 `json:"apiVersion"`
	Kind       string                 `json:"kind"`
	Metadata   CloudProviderMetadata  `json:"metadata"`
	Data       map[string]interface{} `json:"data"`
}

CloudProviderDescribe: =========================

CloudProviderDescribe is the desc

func GetClusterDescribeEKS

func GetClusterDescribeEKS(eksSupport IEKSSupport, cluster string, region string) (*CloudProviderDescribe, error)

Get descriptive info about cluster running in EKS.

func GetClusterDescribeGKE

func GetClusterDescribeGKE(gkeSupport IGKESupport, cluster string, region string, project string) (*CloudProviderDescribe, error)

Get descriptive info about cluster running in GKE.

func NewDescriptiveInfoFromCloudProvider

func NewDescriptiveInfoFromCloudProvider(object map[string]interface{}) *CloudProviderDescribe

NewDescriptiveInfoFromCloudProvider construct a CloudProviderDescribe from map[string]interface{}. If the map does not match the object, will return nil

func (*CloudProviderDescribe) GetApiVersion

func (description *CloudProviderDescribe) GetApiVersion() string

func (*CloudProviderDescribe) GetData

func (description *CloudProviderDescribe) GetData() map[string]interface{}

func (*CloudProviderDescribe) GetID

func (description *CloudProviderDescribe) GetID() string

ApiVersion/Kind/Name

func (*CloudProviderDescribe) GetKind

func (description *CloudProviderDescribe) GetKind() string

func (*CloudProviderDescribe) GetName

func (description *CloudProviderDescribe) GetName() string

func (*CloudProviderDescribe) GetNamespace

func (description *CloudProviderDescribe) GetNamespace() string

Compatible with the IMetadata interface

func (*CloudProviderDescribe) GetObject

func (description *CloudProviderDescribe) GetObject() map[string]interface{}

func (*CloudProviderDescribe) GetObjectType

func (description *CloudProviderDescribe) GetObjectType() workloadinterface.ObjectType

func (*CloudProviderDescribe) GetProvider

func (description *CloudProviderDescribe) GetProvider() string

provider -> eks/gke/etc.

func (*CloudProviderDescribe) GetWorkload

func (description *CloudProviderDescribe) GetWorkload() map[string]interface{}

func (*CloudProviderDescribe) SetApiVersion

func (description *CloudProviderDescribe) SetApiVersion(apiVersion string)

func (*CloudProviderDescribe) SetData

func (description *CloudProviderDescribe) SetData(data map[string]interface{})

func (*CloudProviderDescribe) SetKind

func (description *CloudProviderDescribe) SetKind(kind string)

func (*CloudProviderDescribe) SetName

func (description *CloudProviderDescribe) SetName(name string)

func (*CloudProviderDescribe) SetNamespace

func (description *CloudProviderDescribe) SetNamespace(namespace string)

========================================================================================================== ============================== CloudProviderDescribe ================================================== ========================================================================================================== Setters

func (*CloudProviderDescribe) SetObject

func (description *CloudProviderDescribe) SetObject(object map[string]interface{})

func (*CloudProviderDescribe) SetProvider

func (description *CloudProviderDescribe) SetProvider(provider string)

func (*CloudProviderDescribe) SetWorkload

func (description *CloudProviderDescribe) SetWorkload(object map[string]interface{})

type CloudProviderMetadata

type CloudProviderMetadata struct {
	Name     string `json:"name"`
	Provider string `json:"provider"`
}

CloudProviderMetadata: ===================== Metadata of a cloud provider object. This object may be any configuration object supported by the cloud provider

Name: Object name Provider: CloudProvider name eks/gke/etc.

func (*CloudProviderMetadata) GetName

func (cloudProviderMetadata *CloudProviderMetadata) GetName() string

getters

func (*CloudProviderMetadata) GetProvider

func (cloudProviderMetadata *CloudProviderMetadata) GetProvider() string

func (*CloudProviderMetadata) SetName

func (cloudProviderMetadata *CloudProviderMetadata) SetName(name string)

setters

func (*CloudProviderMetadata) SetProvider

func (cloudProviderMetadata *CloudProviderMetadata) SetProvider(provider string)

type EKSSupport

type EKSSupport struct {
}

func NewEKSSupport

func NewEKSSupport() *EKSSupport

func (*EKSSupport) GetClusterDescribe

func (eksSupport *EKSSupport) GetClusterDescribe(cluster string, region string) (*eks.DescribeClusterOutput, error)

func (*EKSSupport) GetName

func (eksSupport *EKSSupport) GetName(describe *eks.DescribeClusterOutput) string

getName get cluster name from describe

type EKSSupportMock

type EKSSupportMock struct {
}

func NewEKSSupportMock

func NewEKSSupportMock() *EKSSupportMock

func (*EKSSupportMock) GetClusterDescribe

func (eksSupportM *EKSSupportMock) GetClusterDescribe(currContext string, region string) (*eks.DescribeClusterOutput, error)

Get descriptive info about cluster running in EKS.

func (*EKSSupportMock) GetName

func (eksSupportM *EKSSupportMock) GetName(describe *eks.DescribeClusterOutput) string

getName get cluster name from describe

type GKESupport

type GKESupport struct {
}

func NewGKESupport

func NewGKESupport() *GKESupport

func (*GKESupport) GetAuthorizationKey added in v0.0.61

func (gkeSupport *GKESupport) GetAuthorizationKey() (string, error)

func (*GKESupport) GetClusterDescribe

func (gkeSupport *GKESupport) GetClusterDescribe(cluster string, region string, project string) (*containerpb.Cluster, error)

Get descriptive info about cluster running in GKE.

func (*GKESupport) GetName

func (gkeSupport *GKESupport) GetName(clusterDescribe *containerpb.Cluster) string

type GKESupportMock

type GKESupportMock struct {
}

func NewGKESupportMock

func NewGKESupportMock() *GKESupportMock

func (*GKESupportMock) GetClusterDescribe

func (gkeSupportM *GKESupportMock) GetClusterDescribe(cluster string, region string, project string) (*containerpb.Cluster, error)

Get descriptive info about cluster running in GKE.

func (*GKESupportMock) GetName

func (gkeSupportM *GKESupportMock) GetName(clusterDescribe *containerpb.Cluster) string

type IEKSSupport

type IEKSSupport interface {
	GetClusterDescribe(currContext string, region string) (*eks.DescribeClusterOutput, error)
	GetName(*eks.DescribeClusterOutput) string
}

type IGKESupport

type IGKESupport interface {
	GetClusterDescribe(cluster string, region string, project string) (*containerpb.Cluster, error)
	GetName(clusterDescribe *containerpb.Cluster) string
}

Jump to

Keyboard shortcuts

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