adapters

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MPL-2.0 Imports: 15 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 added in v0.9.1

func NewHTTPClient() *HTTPClient

NewHTTPClient returns a new HTTP client for requests to Weave GitOps services.

func (*HTTPClient) ConfigureClientWithOptions added in v0.9.1

func (c *HTTPClient) ConfigureClientWithOptions(opts *config.Options, out io.Writer) error

ConfigureClientWithOptions accepts a config.Options object that configures the client with the necessary options to make a request.

func (*HTTPClient) CreatePullRequestFromTemplate added in v0.3.2

func (c *HTTPClient) CreatePullRequestFromTemplate(params templates.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) EnableCLIAuth added in v0.9.1

func (c *HTTPClient) EnableCLIAuth() *HTTPClient

EnableCLIAuth configures client to authenticate automatically with with either username or password, or kubeconfig, when a request is executed.

func (*HTTPClient) GetBaseClient added in v0.9.1

func (c *HTTPClient) GetBaseClient() *http.Client

GetBaseClient returns the underlying http.Client object.

func (*HTTPClient) GetClient added in v0.9.1

func (c *HTTPClient) GetClient() *resty.Client

GetClient returns the internal *resty.Client object.

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(kind templates.TemplateKind, name string, parameters map[string]string, creds templates.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() ([]templates.Credentials, error)

RetrieveCredentials returns a list of all CAPI credentials.

func (*HTTPClient) RetrieveCredentialsByName added in v0.3.2

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

RetrieveCredentialsByName returns a specific set of CAPI credentials.

func (*HTTPClient) RetrieveProfiles added in v0.8.1

func (c *HTTPClient) RetrieveProfiles() (*pb.GetProfilesResponse, error)

func (*HTTPClient) RetrieveTemplate added in v0.8.1

func (c *HTTPClient) RetrieveTemplate(name string, kind templates.TemplateKind) (*templates.Template, error)

RetrieveTemplate returns a template from the cluster service.

func (*HTTPClient) RetrieveTemplateParameters added in v0.3.2

func (c *HTTPClient) RetrieveTemplateParameters(kind templates.TemplateKind, name string) ([]templates.TemplateParameter, error)

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

func (*HTTPClient) RetrieveTemplateProfiles added in v0.6.1

func (c *HTTPClient) RetrieveTemplateProfiles(name string) ([]templates.Profile, error)

RetrieveTemplateProfiles returns the list of all profiles of the specified template.

func (*HTTPClient) RetrieveTemplates added in v0.3.2

func (c *HTTPClient) RetrieveTemplates(kind templates.TemplateKind) ([]templates.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(kind templates.TemplateKind, provider string) ([]templates.Template, error)

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

func (*HTTPClient) SetTLSClientConfig added in v0.9.1

func (c *HTTPClient) SetTLSClientConfig(config *tls.Config)

SetTLSClientConfig method sets TLSClientConfig for underling client Transport.

func (*HTTPClient) SetTransport added in v0.9.1

func (c *HTTPClient) SetTransport(transport http.RoundTripper)

SetTransport method sets custom `*http.Transport` or any `http.RoundTripper` compatible interface implementation in the client.

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 templates.Credentials `json:"credentials"`
}

POST request payload

Jump to

Keyboard shortcuts

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