LoadEncryptedFile loads the contents of an encrypted yaml file onto a sops.Tree runtime object
(in []byte)
| 302 | // LoadEncryptedFile loads the contents of an encrypted yaml file onto a |
| 303 | // sops.Tree runtime object |
| 304 | func (store *Store) LoadEncryptedFile(in []byte) (sops.Tree, error) { |
| 305 | branches, err := store.LoadPlainFile(in) |
| 306 | if err != nil { |
| 307 | return sops.Tree{}, err |
| 308 | } |
| 309 | branches, metadata, err := stores.ExtractMetadata(branches, stores.MetadataOpts{ |
| 310 | Flatten: stores.MetadataFlattenNone, |
| 311 | }) |
| 312 | if err != nil { |
| 313 | return sops.Tree{}, err |
| 314 | } |
| 315 | return sops.Tree{ |
| 316 | Branches: branches, |
| 317 | Metadata: metadata, |
| 318 | }, nil |
| 319 | } |
| 320 | |
| 321 | // LoadPlainFile loads the contents of a plaintext yaml file onto a |
| 322 | // sops.Tree runtime object |
nothing calls this directly
no test coverage detected