certFile concatenates the results of multiple PEM-encoding marshalers.
(texts ...encoding.TextMarshaler)
| 39 | |
| 40 | // certFile concatenates the results of multiple PEM-encoding marshalers. |
| 41 | func 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. |