Documentation ¶
Index ¶
- Constants
- func GetDescriptionFromXMLString(raw string) (string, error)
- func GetProfileNameFromID(id string) string
- func GetRationaleFromXMLString(raw string) (string, error)
- func GetRuleNameFromID(id string) string
- func GetVariableNameFromID(id string) string
- func GetWarningFromXMLString(raw string) (string, error)
- func GetXCCDFProfileID(tp *cmpv1alpha1.TailoredProfile) string
- func TailoredProfileToXML(tp *cmpv1alpha1.TailoredProfile, p *cmpv1alpha1.Profile, ...) (string, error)
- type BenchmarkElement
- type ProfileElement
- type SelectElement
- type SetValueElement
- type TailoringElement
- type TitleOrDescriptionElement
- type VersionElement
Constants ¶
View Source
const ( // XMLHeader is the header for the XML doc XMLHeader string = `<?xml version="1.0" encoding="UTF-8"?>` // XCCDFNamespace is the XCCDF namespace of this project. Per the XCCDF // specification, this assiciates the content with the author XCCDFNamespace string = "compliance.openshift.io" XCCDFURI string = "http://checklists.nist.gov/xccdf/1.2" )
Variables ¶
This section is empty.
Functions ¶
func GetDescriptionFromXMLString ¶
GetDescriptionFromXMLString gets a description from the given XML string
func GetProfileNameFromID ¶
GetProfileNameFromID gets a profile name from the xccdf ID
func GetRationaleFromXMLString ¶
GetRationaleFromXMLString gets the rationale from the given XML string
func GetRuleNameFromID ¶
GetRuleNameFromID gets a rule name from the xccdf ID
func GetVariableNameFromID ¶
func GetWarningFromXMLString ¶
GetWarningFromXMLString gets a warning from the given XML string
func GetXCCDFProfileID ¶
func GetXCCDFProfileID(tp *cmpv1alpha1.TailoredProfile) string
GetXCCDFProfileID gets a profile xccdf ID from the TailoredProfile object
func TailoredProfileToXML ¶
func TailoredProfileToXML(tp *cmpv1alpha1.TailoredProfile, p *cmpv1alpha1.Profile, pb *cmpv1alpha1.ProfileBundle, rules map[string]*cmpv1alpha1.Rule, variables []*cmpv1alpha1.Variable) (string, error)
TailoredProfileToXML gets an XML string from a TailoredProfile and the corresponding Profile
Types ¶
type BenchmarkElement ¶
type ProfileElement ¶
type ProfileElement struct { XMLName xml.Name `xml:"xccdf-1.2:Profile"` ID string `xml:"id,attr"` Extends string `xml:"extends,attr"` Title *TitleOrDescriptionElement `xml:"xccdf-1.2:title,omitempty"` Description *TitleOrDescriptionElement `xml:"xccdf-1.2:description,omitempty"` Selections []SelectElement Values []SetValueElement }
type SelectElement ¶
type SetValueElement ¶
type TailoringElement ¶
type TailoringElement struct { XMLName xml.Name `xml:"xccdf-1.2:Tailoring"` XMLNamespaceURI string `xml:"xmlns:xccdf-1.2,attr"` ID string `xml:"id,attr"` Benchmark BenchmarkElement Version VersionElement Profile ProfileElement }
type VersionElement ¶
Click to show internal directories.
Click to hide internal directories.