Documentation
¶
Index ¶
- func ConvertToPolicyReport(policy typepolicy.Policy) typepolr.PolicyReport
- type GenerationType
- type Markdown
- type PolicyResult
- type Reason
- type Reporter
- func (r *Reporter) Generate() (typereport.ComplianceReport, error)
- func (r *Reporter) GenerateReasonsFromPolicyReports(policy typepolicy.Policy) []Reason
- func (r *Reporter) GenerateReasonsFromRawPolicies(policy typepolicy.Policy) []Reason
- func (r *Reporter) GetPolicyReports() []*typepolr.PolicyReport
- func (r *Reporter) SetGenerationType(generationType GenerationType)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToPolicyReport ¶
func ConvertToPolicyReport(policy typepolicy.Policy) typepolr.PolicyReport
Types ¶
type GenerationType ¶
type GenerationType string
const ( GenerationTypeRaw GenerationType = "raw" GenerationTypePolicyReport GenerationType = "policy-report" )
type Markdown ¶
type Markdown struct{}
func NewMarkdown ¶
func NewMarkdown() Markdown
func (*Markdown) Generate ¶
func (m *Markdown) Generate(templateFile string, report typereport.ComplianceReport) ([]byte, error)
type PolicyResult ¶
type PolicyResult string
- pass: the policy requirements are met - fail: the policy requirements are not met - warn: the policy requirements are not met and the policy is not scored - error: the policy could not be evaluated - skip: the policy was not selected based on user inputs or applicability
const ( // the policy requirements are met PolicyResultPass PolicyResult = "pass" // the policy requirements are not met PolicyResultFail PolicyResult = "fail" // the policy requirements are not met and the policy is not scored PolicyResultWarn PolicyResult = "warn" // the policy could not be evaluated PolicyResultError PolicyResult = "error" // the policy was not selected based on user inputs or applicability PolicyResultSkip PolicyResult = "skip" )
type Reason ¶
type Reason struct { ClusterName string `json:"clusterName,omitempty" yaml:"clusterName,omitempty"` ComplianceState typepolicy.ComplianceState `json:"complianceState,omitempty" yaml:"complianceState,omitempty"` Messages []typepolicy.ComplianceHistory `json:"messages,omitempty" yaml:"messages,omitempty"` }
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
func NewReporter ¶
func NewReporter(c2pParsed typec2pcr.C2PCRParsed) *Reporter
func (*Reporter) Generate ¶
func (r *Reporter) Generate() (typereport.ComplianceReport, error)
func (*Reporter) GenerateReasonsFromPolicyReports ¶
func (r *Reporter) GenerateReasonsFromPolicyReports(policy typepolicy.Policy) []Reason
func (*Reporter) GenerateReasonsFromRawPolicies ¶
func (r *Reporter) GenerateReasonsFromRawPolicies(policy typepolicy.Policy) []Reason
func (*Reporter) GetPolicyReports ¶
func (r *Reporter) GetPolicyReports() []*typepolr.PolicyReport
func (*Reporter) SetGenerationType ¶
func (r *Reporter) SetGenerationType(generationType GenerationType)
Click to show internal directories.
Click to hide internal directories.