MCPcopy
hub / github.com/helm/helm / encodeRelease

Function encodeRelease

pkg/storage/driver/util.go:38–54  ·  view source on GitHub ↗

encodeRelease encodes a release returning a base64 encoded gzipped string representation, or error.

(rls *rspb.Release)

Source from the content-addressed store, hash-verified

36// encodeRelease encodes a release returning a base64 encoded
37// gzipped string representation, or error.
38func encodeRelease(rls *rspb.Release) (string, error) {
39 b, err := json.Marshal(rls)
40 if err != nil {
41 return "", err
42 }
43 var buf bytes.Buffer
44 w, err := gzip.NewWriterLevel(&buf, gzip.BestCompression)
45 if err != nil {
46 return "", err
47 }
48 if _, err = w.Write(b); err != nil {
49 return "", err
50 }
51 w.Close()
52
53 return b64.EncodeToString(buf.Bytes()), nil
54}
55
56// decodeRelease decodes the bytes of data into a release
57// type. Data must contain a base64 encoded gzipped string of a

Callers 11

CreateMethod · 0.85
UpdateMethod · 0.85
newConfigMapsObjectFunction · 0.85
newSecretsObjectFunction · 0.85
TestSQLGetFunction · 0.85
TestSQLListFunction · 0.85
TestSqlCreateFunction · 0.85
TestSqlUpdateFunction · 0.85
TestSqlQueryFunction · 0.85
TestSqlDeleteFunction · 0.85

Calls 2

CloseMethod · 0.80
WriteMethod · 0.45

Tested by 7

TestSQLGetFunction · 0.68
TestSQLListFunction · 0.68
TestSqlCreateFunction · 0.68
TestSqlUpdateFunction · 0.68
TestSqlQueryFunction · 0.68
TestSqlDeleteFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…