Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func GetValidator ¶
func GetValidator(namespaces policyInfoModel.Namespaces, defNamespace string) *Validator
func (*Validator) ValidatePolicies ¶
func (v *Validator) ValidatePolicies(policies hexapolicy.Policies) map[string][]error
ValidatePolicies validates a set of policies and returns a map whose index is as string containing either the policyId of a policy with errors or an index number of the policies original index in Policies
func (*Validator) ValidatePolicy ¶
func (v *Validator) ValidatePolicy(policy hexapolicy.PolicyInfo) []error
ValidatePolicy checks `policy` (PolicyInfo) against the loaded Policy Information Model. When provided, appNamespace is used to default the main namespace for entities referenced in policy. For example if appNamespace is `PhotoApp`, an entity of `Photo:myphoto.jpg` will be located under `PhotoApp` If appNamespace is not provided, then each EntityPaths must contain the namespace as part of the type (e.g. PhotoApp:Photo:myphoto.jpg)