clusters

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 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
	Status          string
	PullRequestType string
}

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 DeleteClustersParams

type DeleteClustersParams struct {
	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