pimValidate

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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 NewValidator

func NewValidator(pimBytes []byte, defaultNamespace string) (*Validator, error)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL