Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
author Kurt Roekle <kroekle@gmail.com> 1640292949 -0600 committer Kurt Roekle <kroekle@gmail.com> 1646422506 -0600 Adding partial eval to SDK Signed-off-by: Kurt Roekle <kroekle@gmail.com> Adding printhook to partial call Signed-off-by: Kurt Roekle <kroekle@gmail.com> refactoring to clean up boilerplate code renamed resolver to mapper Signed-off-by: Kurt Roekle <kroekle@gmail.com> Removing path from results returning new PartialResult type from Partial new ResultToJSON to ensure that mapped results can be logged as json added mapped_result so that both PartialQueries and mapped can be logged Signed-off-by: Kurt Roekle <kroekle@gmail.com> Removing path from results returning new PartialResult type from Partial new ResultToJSON to ensure that mapped results can be logged as json added mapped_result so that both PartialQueries and mapped can be logged Signed-off-by: Kurt Roekle <kroekle@gmail.com> Removing path from results returning new PartialResult type from Partial new ResultToJSON to ensure that mapped results can be logged as json added mapped_result so that both PartialQueries and mapped can be logged Signed-off-by: Kurt Roekle <kroekle@gmail.com>
- Loading branch information
Showing
5 changed files
with
323 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package sdk | ||
|
||
import ( | ||
"github.com/open-policy-agent/opa/rego" | ||
) | ||
|
||
type RawMapper struct { | ||
} | ||
|
||
func (e *RawMapper) MapResults(pq *rego.PartialQueries) (interface{}, error) { | ||
|
||
return pq, nil | ||
} | ||
|
||
func (e *RawMapper) ResultToJSON(results interface{}) (interface{}, error) { | ||
return results, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.