INNER CODE UNIT · Go
registerParseConfigFile
open-policy-agent/conftest · builtins/parse_config.go:33
func registerParseConfigFile() {
decl := rego.Function{
Name: "parse_config_file",
Decl: types.NewFunction(
types.Args(types.S), // path to configuration file
types.NewObject(nil, types.NewDynamicProperty(types.S, types.NewAny())), // map[string]any aka JSON
),
}
rego.RegisterBuiltin1(&decl, parseConfigFile)
}
func registerParseCombinedConfigFiles() {
decl := rego.Function{
Name: "parse_combined_config_files",
Decl: types.NewFunction(
types.Args(types.NewArray(nil, types.S)), // paths to configuration files
types.NewObject(nil, types.NewDynamicProperty(types.S, types.NewAny())), // map[string]any aka JSON
),