adapters

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	Group     string
	Version   string
	Kind      string
	Name      string
	Namespace string
}

type DeleteClustersPullRequestRequest

type DeleteClustersPullRequestRequest struct {
	RepositoryUrl string
	HeadBranch    string
	BaseBranch    string
	Title         string
	Description   string
	ClusterNames  []string
	CommitMessage string
	Credentials   Credential
}

type GetKubeconfigResponse

type GetKubeconfigResponse struct {
	Kubeconfig string
}

type HttpClient

type HttpClient struct {
	// contains filtered or unexported fields
}

An HTTP client of the cluster service.

func NewHttpClient

func NewHttpClient(endpoint string, client *resty.Client, out io.Writer) (*HttpClient, error)

NewHttpClient creates a new HTTP client of the cluster service. The endpoint is expected to be an absolute HTTP URI.

func (*HttpClient) CreatePullRequestFromTemplate

func (c *HttpClient) CreatePullRequestFromTemplate(params capi.CreatePullRequestFromTemplateParams) (string, error)

CreatePullRequestFromTemplate commits the YAML template to the specified branch and creates a pull request of that branch.

func (*HttpClient) DeleteClusters

func (c *HttpClient) DeleteClusters(params clusters.DeleteClustersParams) (string, error)

DeleteClusters deletes CAPI cluster using its name

func (*HttpClient) GetClusterKubeconfig

func (c *HttpClient) GetClusterKubeconfig(name string) (string, error)

func (*HttpClient) RenderTemplateWithParameters

func (c *HttpClient) RenderTemplateWithParameters(name string, parameters map[string]string, creds capi.Credentials) (string, error)

RenderTemplateWithParameters returns a YAML representation of the specified template populated with the supplied parameters.

func (*HttpClient) RetrieveClusters

func (c *HttpClient) RetrieveClusters() ([]clusters.Cluster, error)

RetrieveClusters returns the list of all clusters from the cluster service.

func (*HttpClient) RetrieveCredentials

func (c *HttpClient) RetrieveCredentials() ([]capi.Credentials, error)

RetrieveCredentials returns a list of all CAPI credentials.

func (*HttpClient) RetrieveCredentialsByName

func (c *HttpClient) RetrieveCredentialsByName(name string) (capi.Credentials, error)

RetrieveCredentialsByName returns a specific set of CAPI credentials.

func (*HttpClient) RetrieveTemplateParameters

func (c *HttpClient) RetrieveTemplateParameters(name string) ([]capi.TemplateParameter, error)

RetrieveTemplateParameters returns the list of all parameters of the specified template.

func (*HttpClient) RetrieveTemplates

func (c *HttpClient) RetrieveTemplates() ([]capi.Template, error)

RetrieveTemplates returns the list of all templates from the cluster service.

func (*HttpClient) Source

func (c *HttpClient) Source() string

Source returns the endpoint of the cluster service.

type ServiceError

type ServiceError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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