Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy struct { ID string `json:"id"` // Method http method to be matched Method string `json:"method"` // Path http path to be matched Path string `json:"path"` // Policy contains the actual Rego policy as a string. Policy string `json:"policy"` // Query holds a set of Queries to be evaluated against the policy. Query Queries `json:"Query"` // Result stores the results of the policy evaluation. Result rego.Vars `json:"-"` }
Policy represents a policy object for OPA (Open Policy Agent) evaluation. It's designed to work with Rego, the language for writing policies and queries for OPA. For more information about OPA and Rego, visit: https://www.openpolicyagent.org/docs/latest/
func (*Policy) BoolResult ¶
BoolResult extracts a string result for a given Query.
func (*Policy) StringResult ¶
StringResult extracts a string result for a given Query.
Click to show internal directories.
Click to hide internal directories.