clusters

package
v0.9.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteClusters

func DeleteClusters(params DeleteClustersParams, r ClustersRetriever, w io.Writer) error

func GetClusterByName

func GetClusterByName(name string, r ClustersRetriever, w io.Writer) error

GetClusterByName uses a ClustersRetriever adapter to show a cluster to the console given its name.

func GetClusterKubeconfig

func GetClusterKubeconfig(name string, r ClustersRetriever, w io.Writer) error

func GetClusters

func GetClusters(r ClustersRetriever, w io.Writer) error

GetClusters uses a ClustersRetriever adapter to show a list of clusters to the console.

Types

type Cluster

type Cluster struct {
	Name       string      `json:"name"`
	Conditions []Condition `json:"conditions"`
}

type ClustersRetriever

type ClustersRetriever interface {
	Source() string
	RetrieveClusters() ([]Cluster, error)
	GetClusterKubeconfig(string) (string, error)
	DeleteClusters(DeleteClustersParams) (string, error)
}

ClustersRetriever defines the interface that adapters need to implement in order to return an array of clusters.

type Condition added in v0.8.1

type Condition struct {
	Type    string `json:"type"`
	Status  string `json:"status"`
	Message string `json:"message"`
}

type DeleteClustersParams

type DeleteClustersParams struct {
	GitProviderToken string
	RepositoryURL    string
	HeadBranch       string
	BaseBranch       string
	Title            string
	Description      string
	ClustersNames    []string
	CommitMessage    string
}

Jump to

Keyboard shortcuts

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