MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / certFile

Function certFile

internal/pgbackrest/certificates.go:41–53  ·  view source on GitHub ↗

certFile concatenates the results of multiple PEM-encoding marshalers.

(texts ...encoding.TextMarshaler)

Source from the content-addressed store, hash-verified

39
40// certFile concatenates the results of multiple PEM-encoding marshalers.
41func certFile(texts ...encoding.TextMarshaler) ([]byte, error) {
42 var out []byte
43
44 for i := range texts {
45 if b, err := texts[i].MarshalText(); err == nil {
46 out = append(out, b...)
47 } else {
48 return nil, err
49 }
50 }
51
52 return out, nil
53}
54
55// clientCertificates returns projections of CAs, keys, and certificates to
56// include in a configuration volume from the pgBackRest Secret.

Callers 3

TestCertFileFunction · 0.70
InstanceCertificatesFunction · 0.70
SecretFunction · 0.70

Calls 1

MarshalTextMethod · 0.45

Tested by 1

TestCertFileFunction · 0.56