Versions in this module Expand all Collapse all v0 v0.0.2 Feb 14, 2022 Changes in this version + type CloneFn func(s storage.Storer, worktree billy.Filesystem, o *git.CloneOptions) (*git.Repository, error) + type GitClient interface + Clone func(s storage.Storer, worktree billy.Filesystem, o *git.CloneOptions) (*git.Repository, error) + type GitPolicyFile struct + Hash string + type GitPolicySource struct + func (src GitPolicySource) GetPolicyFiles() ([]*PolicyFile, error) + type GitTree interface + TreeEntryFile func(e *object.TreeEntry) (*object.File, error) + type GitTreeWalker interface + Close func() + Next func() (name string, entry object.TreeEntry, err error) + type LocalPolicySource struct + func (src LocalPolicySource) GetPolicyFiles() ([]*PolicyFile, error) + type PolicyFile struct + Content string + FullName string + Name string + type PolicySource interface + GetPolicyFiles func() ([]*PolicyFile, error) + func NewGitPolicySource(repoURL string, repoBrach string, policyDir string) PolicySource + func NewLocalPolicySource(rootDirectory string) PolicySource + type ReadFn func(name string) ([]byte, error) + type WalkFn func(root string, fn filepath.WalkFunc) error v0.0.1 Nov 5, 2021 Changes in this version + type Policy struct + Description string + FullName string + Group string + Name string + ProcessingErrors []error + Valid bool + Violations []string + type PolicyAgent struct + func NewPolicyAgent(ctx context.Context, dataDir string) *PolicyAgent + func (p *PolicyAgent) EvaluatePolicies(input interface{}) (*PolicyEvaluationResult, error) + type PolicyEvaluationResult struct + func (r *PolicyEvaluationResult) AppendErroredPolicy(policy *Policy) + func (r *PolicyEvaluationResult) AppendSuccessfulPolicy(policy *Policy) + func (r *PolicyEvaluationResult) Errored() []*Policy + func (r *PolicyEvaluationResult) ErroredCount() int + func (r *PolicyEvaluationResult) Groups() []string + func (r *PolicyEvaluationResult) Policies(group string) []*Policy + func (r *PolicyEvaluationResult) ValidCount() int + func (r *PolicyEvaluationResult) ViolatedCount() int