adapters

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient added in v0.3.2

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 added in v0.3.2

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 added in v0.3.2

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

DeleteClusters deletes CAPI cluster using its name

func (*HTTPClient) GetClusterKubeconfig added in v0.3.2

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

func (*HTTPClient) RenderTemplateWithParameters added in v0.3.2

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 added in v0.3.2

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

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

func (*HTTPClient) RetrieveCredentials added in v0.3.2

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

RetrieveCredentials returns a list of all CAPI credentials.

func (*HTTPClient) RetrieveCredentialsByName added in v0.3.2

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

RetrieveCredentialsByName returns a specific set of CAPI credentials.

func (*HTTPClient) RetrieveTemplateParameters added in v0.3.2

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

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

func (*HTTPClient) RetrieveTemplates added in v0.3.2

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

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

func (*HTTPClient) RetrieveTemplatesByProvider added in v0.3.2

func (c *HTTPClient) RetrieveTemplatesByProvider(provider string) ([]capi.Template, error)

RetrieveTemplatesByProvider returns the list of all templates for a given provider from the cluster service.

func (*HTTPClient) Source added in v0.3.2

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"`
}

type TemplateParameterValuesAndCredentials added in v0.4.1

type TemplateParameterValuesAndCredentials struct {
	Values      map[string]string `json:"values"`
	Credentials capi.Credentials  `json:"credentials"`
}

POST request payload

Jump to

Keyboard shortcuts

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