Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type M ¶
func (*M) DetectPolicy ¶
TODO update from policys to policies Finds and loads policies in a directory. The directory may be any directory in the policies tree. Only policies underneath the directory will be loaded. Policy directories have the following layout:
policies/ policies/<policy-tyoe> policies/<policy-type>/<policy> (must contain metadata.yaml) policies/<policy-type>/<policy>/<target>
<target> is optional depending on <policy-type>.
func (*M) RegisterDownload ¶ added in v0.5.43
func (*M) RegisterUpload ¶ added in v0.5.47
func (*M) TestPolicies ¶ added in v0.5.35
func (m *M) TestPolicies() (TestMetrics, error)
func (*M) ValidatePolicies ¶ added in v0.5.35
func (m *M) ValidatePolicies() ValidateResult
type PolicyTestMetrics ¶ added in v0.5.35
type PolicyType ¶ added in v0.5.35
type PolicyType interface { policy.PolicyType ValidatePolicies(runOpts tools.RunOpts, policies []*policy.Policy) ValidateResult GetTestRunner(runOpts tools.RunOpts, target policy.Target) tools.Single // Find a test result. This must be tool-specific because the // findings have not been normalized. FindPolicyResult(findings assessments.Findings, id string) []PassFail }
type TestMetrics ¶
type TestMetrics struct { Policies []PolicyTestMetrics `json:"policies,omitempty"` Passed int `json:"passed"` Failed int `json:"failed"` }
type ValidateResult ¶ added in v0.5.29
type ValidateResult struct { Errors error `json:"-"` Valid int `json:"valid"` Invalid int `json:"invalid"` }
func (*ValidateResult) AppendError ¶ added in v0.5.29
func (vr *ValidateResult) AppendError(err error)
Click to show internal directories.
Click to hide internal directories.