Documentation
¶
Index ¶
- type HTTPClient
- func (c *HTTPClient) ConfigureClientWithOptions(opts *config.Options, out io.Writer) error
- func (c *HTTPClient) CreatePullRequestFromTemplate(params templates.CreatePullRequestFromTemplateParams) (string, error)
- func (c *HTTPClient) DeleteClusters(params clusters.DeleteClustersParams) (string, error)
- func (c *HTTPClient) EnableCLIAuth() *HTTPClient
- func (c *HTTPClient) GetBaseClient() *http.Client
- func (c *HTTPClient) GetClient() *resty.Client
- func (c *HTTPClient) GetClusterKubeconfig(name string) (string, error)
- func (c *HTTPClient) RenderTemplateWithParameters(kind templates.TemplateKind, name string, parameters map[string]string, ...) (string, error)
- func (c *HTTPClient) RetrieveClusters() ([]clusters.Cluster, error)
- func (c *HTTPClient) RetrieveCredentials() ([]templates.Credentials, error)
- func (c *HTTPClient) RetrieveCredentialsByName(name string) (templates.Credentials, error)
- func (c *HTTPClient) RetrieveProfiles() (*pb.GetProfilesResponse, error)
- func (c *HTTPClient) RetrieveTemplate(name string, kind templates.TemplateKind) (*templates.Template, error)
- func (c *HTTPClient) RetrieveTemplateParameters(kind templates.TemplateKind, name string) ([]templates.TemplateParameter, error)
- func (c *HTTPClient) RetrieveTemplateProfiles(name string) ([]templates.Profile, error)
- func (c *HTTPClient) RetrieveTemplates(kind templates.TemplateKind) ([]templates.Template, error)
- func (c *HTTPClient) RetrieveTemplatesByProvider(kind templates.TemplateKind, provider string) ([]templates.Template, error)
- func (c *HTTPClient) SetTLSClientConfig(config *tls.Config)
- func (c *HTTPClient) SetTransport(transport http.RoundTripper)
- func (c *HTTPClient) Source() string
- type ServiceError
- type TemplateParameterValuesAndCredentials
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
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 TemplateParameterValuesAndCredentials ¶ added in v0.4.1
type TemplateParameterValuesAndCredentials struct { Values map[string]string `json:"values"` Credentials templates.Credentials `json:"credentials"` }
POST request payload