LoadCreationRuleForFile load the configuration for a given SOPS file from the config file at confPath. A kmsEncryptionContext should be provided for configurations that do not contain key groups, as there's no way to specify context inside a SOPS config file outside of key groups.
(confPath string, filePath string, kmsEncryptionContext map[string]*string)
| 614 | // should be provided for configurations that do not contain key groups, as there's no way to specify context inside |
| 615 | // a SOPS config file outside of key groups. |
| 616 | func LoadCreationRuleForFile(confPath string, filePath string, kmsEncryptionContext map[string]*string) (*Config, error) { |
| 617 | conf, err := loadConfigFile(confPath) |
| 618 | if err != nil { |
| 619 | return nil, err |
| 620 | } |
| 621 | |
| 622 | return parseCreationRuleForFile(conf, confPath, filePath, kmsEncryptionContext) |
| 623 | } |
| 624 | |
| 625 | // LoadDestinationRuleForFile works the same as LoadCreationRuleForFile, but gets the "creation_rule" from the matching destination_rule's |
| 626 | // "recreation_rule". |
no test coverage detected