Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Factory ¶
type Factory interface {
Create(policy string) (PolicyQuery, error)
}
Factory is an interface for creating policy queries.
type PolicyQuery ¶
type PolicyQuery interface { // Evaluate evaluates the policy with the given input. // input is the verifier reports that query evaluates against. // result indicates whether the input satisfies the policy. // err indicates an error happened during the evaluation. Evaluate(ctx context.Context, input map[string]interface{}) (bool, error) }
PolicyQuery is an interface with methods that make policy decisions.
func CreateQueryFromConfig ¶
func CreateQueryFromConfig(queryConfig Config) (PolicyQuery, error)
CreateQueryFromConfig creates a policy query from the provided configuration.
Click to show internal directories.
Click to hide internal directories.