Documentation ¶
Overview ¶
Package apprclient holds the client code required to interact with a CNR backend.
Index ¶
- func IsInvalidConfig(err error) bool
- func IsInvalidStatusCode(err error) bool
- func IsUnknownStatus(err error) bool
- type Client
- func (c *Client) DeleteRelease(ctx context.Context, name, release string) error
- func (c *Client) GetReleaseVersion(ctx context.Context, name, channel string) (string, error)
- func (c *Client) PromoteChart(ctx context.Context, name, release, channel string) error
- func (c *Client) PullChartTarball(ctx context.Context, name, channel string) (string, error)
- func (c *Client) PullChartTarballFromRelease(ctx context.Context, name, release string) (string, error)
- func (c *Client) PushChartTarball(ctx context.Context, name, release, tarballPath string) error
- type Config
- type Interface
- type Payload
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsInvalidStatusCode ¶
IsInvalidStatusCode asserts invalidStatusCodeError.
func IsUnknownStatus ¶
IsUnknownStatus asserts unknownStatusError.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client knows how to talk with a CNR server.
func (*Client) DeleteRelease ¶
DeleteRelease removes a release from the server.
func (*Client) GetReleaseVersion ¶
GetReleaseVersion queries CNR for the release version of the chart represented by the given name and channel.
func (*Client) PromoteChart ¶
PromoteChart puts a release of the given chart in a channel.
func (*Client) PullChartTarball ¶
PullChartTarball downloads a tarball with the chart described by the given chart name and channel, returning the file path.
type Interface ¶
type Interface interface { // DeleteRelease removes a release from the server. DeleteRelease(ctx context.Context, name, release string) error // GetReleaseVersion queries CNR for the release version of the chart // represented by the given name and channel. GetReleaseVersion(ctx context.Context, name, channel string) (string, error) // PromoteChart puts a release of the given chart in a channel. PromoteChart(ctx context.Context, name, release, channel string) error // PullChartTarball downloads a tarball with the chart described by // the given chart name and channel, returning the file path. PullChartTarball(ctx context.Context, name, channel string) (string, error) // PullChartTarballFromRelease downloads a tarball with the chart described // by the given chart name and release, returning the file path. PullChartTarballFromRelease(ctx context.Context, name, release string) (string, error) // PushChartTarball sends a tarball to the server to be installed for the given // name and release. PushChartTarball(ctx context.Context, name, release, tarballPath string) error }
Interface describes the methods provided by the appr client.