ref(helm): export DescriptorPullSummary fields

Exporting those fields enable 3rd party users to build their own mocked PullResult responses.

Related #10623

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
pull/11129/head
Antonio Gamez Diaz 3 years ago
parent 80bc7df782
commit 62be6f1af6
No known key found for this signature in database
GPG Key ID: 96108DED40068D35

@ -248,21 +248,21 @@ type (
// PullResult is the result returned upon successful pull.
PullResult struct {
Manifest *descriptorPullSummary `json:"manifest"`
Config *descriptorPullSummary `json:"config"`
Chart *descriptorPullSummaryWithMeta `json:"chart"`
Prov *descriptorPullSummary `json:"prov"`
Manifest *DescriptorPullSummary `json:"manifest"`
Config *DescriptorPullSummary `json:"config"`
Chart *DescriptorPullSummaryWithMeta `json:"chart"`
Prov *DescriptorPullSummary `json:"prov"`
Ref string `json:"ref"`
}
descriptorPullSummary struct {
DescriptorPullSummary struct {
Data []byte `json:"-"`
Digest string `json:"digest"`
Size int64 `json:"size"`
}
descriptorPullSummaryWithMeta struct {
descriptorPullSummary
DescriptorPullSummaryWithMeta struct {
DescriptorPullSummary
Meta *chart.Metadata `json:"meta"`
}
@ -361,16 +361,16 @@ func (c *Client) Pull(ref string, options ...PullOption) (*PullResult, error) {
}
}
result := &PullResult{
Manifest: &descriptorPullSummary{
Manifest: &DescriptorPullSummary{
Digest: manifest.Digest.String(),
Size: manifest.Size,
},
Config: &descriptorPullSummary{
Config: &DescriptorPullSummary{
Digest: configDescriptor.Digest.String(),
Size: configDescriptor.Size,
},
Chart: &descriptorPullSummaryWithMeta{},
Prov: &descriptorPullSummary{},
Chart: &DescriptorPullSummaryWithMeta{},
Prov: &DescriptorPullSummary{},
Ref: parsedRef.String(),
}
var getManifestErr error

Loading…
Cancel
Save