clusters

package
v0.5.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 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      `json:"name"`
	Status      string      `json:"status"`
	PullRequest PullRequest `json:"pullRequest"`
}

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 {
	GitProviderToken string
	RepositoryURL    string
	HeadBranch       string
	BaseBranch       string
	Title            string
	Description      string
	ClustersNames    []string
	CommitMessage    string
}

type PullRequest added in v0.5.0

type PullRequest struct {
	Type string `json:"type"`
	Url  string `json:"url"`
}

Jump to

Keyboard shortcuts

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