Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvalPackage ¶
func EvalPackage(ctx context.Context, pkg Package, input interface{}) (*results.ResultCollection, error)
EvalPackage evaluated the rules in a package given an input
Types ¶
type Package ¶
type Package interface {
// PolicyManifest returns the manifest data about the policy
// in struct format.
PolicyManifest() *PolicyManifest
// Return any rego files, with their names as the keys and
// their content as strings.
RegoText() map[string]string
}
A Package is an interface that Package Sources should implement to provide details about a package in an agnostic way.
type PolicyManifest ¶
type PolicyManifest struct {
Namespace string `yaml:"namespace"`
ID string `yaml:"id"`
DataGatherers []string `yaml:"data-gatherers,omitempty"`
RootQuery string `yaml:"root-query"`
Name string `yaml:"name"`
Description string `yaml:"description,omitempty"`
Sections []Section `yaml:"sections,omitempty"`
}
PolicyManifest contains all the information about the policy manifest of the package.
func (*PolicyManifest) GlobalID ¶
func (m *PolicyManifest) GlobalID() string
GlobalID returns a global unique ID that contains the namespace and the ID.
Click to show internal directories.
Click to hide internal directories.