oscal

package
Version: v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2018 License: CC0-1.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodUseFirst Method = "use-first"
	MethodMerge    Method = "merge"
	MethodKeep     Method = "keep"

	OrderByKeep       OrderBy = "keep"
	OrderByAscending  OrderBy = "ascending"
	OrderByDescending OrderBy = "descending"

	PositionBefore   Position = "before"
	PositionAfter    Position = "after"
	PositionStarting Position = "starting"
	PositionEnding   Position = "ending"
)

...

Variables

This section is empty.

Functions

This section is empty.

Types

type All

type All struct {
	WithSubcontrols WithSubcontrols `xml:"with-subcontrols,attr,omitempty"`
}

All ...

func (*All) MarshalJSON

func (a *All) MarshalJSON() ([]byte, error)

MarshalJSON ...

func (*All) MarshalYAML

func (a *All) MarshalYAML() (interface{}, error)

MarshalYAML ...

func (*All) UnmarshalJSON

func (a *All) UnmarshalJSON(data []byte) error

UnmarshalJSON ...

type Alteration

type Alteration struct {
	ControlID    string    `xml:"control-id,attr,omitempty" json:"controlId,omitempty" yaml:"controlId,omitempty"`
	SubcontrolID string    `xml:"subcontrol-id,attr,omitempty" json:"subcontrolId,omitempty" yaml:"subcontrolId,omitempty"`
	Remove       []Remove  `xml:"remove,omitempty" json:"remove,omitempty" yaml:"remove,omitempty"`
	Augment      []Augment `xml:"add,omitempty" json:"add,omitempty" yaml:"add,omitempty"`
}

Alteration ...

type Assign

type Assign struct {
	ID      string `xml:"id,attr"`
	ParamID string `xml:"param-id"`
}

Assign ...

type Augment

type Augment struct {
	Position *Position `xml:"position,attr" json:"position" yaml:"position"`
	Title    *Raw      `xml:"title,omitempty" json:"title,omitempty" yaml:"title,omitempty"`
	Params   []Param   `xml:"param,omitempty" json:"params,omitempty" yaml:"params,omitempty"`
	Props    []Prop    `xml:"prop,omitempty" json:"props,omitempty" yaml:"props,omitempty"`
	Parts    []Part    `xml:"part,omitempty" json:"parts,omitempty" yaml:"parts,omitempty"`
}

Augment ...

type B

type B struct {
	OptionalClass string `xml:"class,attr"`
	Q             []Q    `xml:"q"`
	Code          []Code `xml:"code"`
	EM            []EM   `xml:"em"`
	I             []I    `xml:"i"`
	B             []B    `xml:"b"`
	Sub           []Sub  `xml:"sub"`
	Sup           []Sup  `xml:"sup"`
	Span          []Span `xml:"span"`
	Value         string `xml:",chardata"`
	Xref          []Xref `xml:"a"`
}

B ...

type Build

type Build struct{}

Build ...

type Calc

type Calc struct {
	Inherit []Inherit `xml:"inherit,omitempty" json:"inheritances,omitempty" yaml:"inheritances,omitempty"`
	Autonum []string  `xml:"autonum,omitempty" json:"autonum,omitempty" yaml:"autonum,omitempty"`
	Value   string    `xml:",chardata" json:"value,omitempty" yaml:"value,omitempty"`
}

Calc ...

type Call

type Call struct {
	WithSubcontrols *WithSubcontrols `xml:"with-subcontrols,attr,omitempty" json:"withSubcontrols,omitempty" yaml:"withSubcontrols,omitempty"`
	ControlID       string           `xml:"control-id,attr,omitempty" json:"controlId,omitempty" yaml:"controlId,omitempty"`
	SubcontrolID    string           `xml:"subcontrol-id,attr,omitempty" json:"subcontrolId,omitempty" yaml:"subcontrolId,omitempty"`
}

Call ...

type Catalog

type Catalog struct {
	XMLName       xml.Name       `xml:"http://csrc.nist.gov/ns/oscal/1.0 catalog" json:"-" yaml:"-"`
	Title         *Raw           `xml:"title" json:"title" yaml:"title"`
	Declarations  *Declarations  `xml:"declarations,omitempty" json:"declarations,omitempty" yaml:"declarations,omitempty"`
	Sections      []Section      `xml:"section" json:"sections,omitempty" yaml:"sections,omitempty"`
	ControlGroups []ControlGroup `xml:"group" json:"groups,omitempty" yaml:"groups,omitempty"`
	Controls      []Control      `xml:"control" json:"controls,omitempty" yaml:"controls,omitempty"`
	References    *References    `xml:"references,omitempty" json:"references,omitempty" yaml:"references,omitempty"`
}

Catalog ...

type Category

type Category struct {
	OptionalClass string     `xml:"class,attr,omitempty" json:"class,omitempty" yaml:"class,omitempty"`
	ID            string     `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	Title         *Raw       `xml:"title,omitempty" json:"title,omitempty" yaml:"title,omitempty"`
	Props         []Prop     `xml:"prop,omitempty" json:"props,omitempty" yaml:"props,omitempty"`
	Links         []Link     `xml:"link,omitempty" json:"links,omitempty" yaml:"links,omitempty"`
	Prose         *Prose     `xml:",any" json:"prose,omitempty" yaml:"prose,omitempty"`
	Categories    []Category `xml:"group,omitempty" json:"groups,omitempty" yaml:"groups,omitempty"`
	Items         []Item     `xml:"component,omitempty" json:"components,omitempty" yaml:"components,omitempty"`
}

Category ...

type Citation

type Citation struct {
	Href  string `xml:"href,attr,omitempty" json:"href,omitempty" yaml:"href,omitempty"`
	Value string `xml:",chardata" json:"value,omitempty" yaml:"value,omitempty"`
}

Citation ...

type Code

type Code struct {
	OptionalClass string `xml:"class,attr"`
	Q             []Q    `xml:"q"`
	Code          []Code `xml:"code"`
	EM            []EM   `xml:"em"`
	I             []I    `xml:"i"`
	B             []B    `xml:"b"`
	Sub           []Sub  `xml:"sub"`
	Sup           []Sup  `xml:"sup"`
	Span          []Span `xml:"span"`
	Value         string `xml:",chardata"`
}

Code ...

type Combine

type Combine struct {
	Method Method `xml:"method,attr" json:"method" yaml:"method"`
}

Combine ...

type Component

type Component struct {
	ID            string      `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	OptionalClass string      `xml:"class,attr" json:"class,omitempty" yaml:"class,omitempty"`
	Title         *Raw        `xml:"title" json:"title" yaml:"title"`
	Params        []Param     `xml:"param,omitempty" json:"params,omitempty" yaml:"params,omitempty"`
	Props         []Prop      `xml:"prop,omitempty" json:"props,omitempty" yaml:"props,omitempty"`
	Links         []Link      `xml:"link,omitempty" json:"links,omitempty" yaml:"links,omitempty"`
	Prose         *Prose      `xml:",any" json:"prose,omitempty" yaml:"prose,omitempty"`
	Parts         []Part      `xml:"part,omitempty" json:"parts,omitempty" yaml:"parts,omitempty"`
	Components    []Component `xml:"component" json:"components" yaml:"components"`
}

Component ...

type ComponentGroup

type ComponentGroup struct {
	ID              string           `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	OptionalClass   string           `xml:"class,attr" json:"class,omitempty" yaml:"class,omitempty"`
	Title           *Raw             `xml:"title" json:"title" yaml:"title"`
	Props           []Prop           `xml:"prop,omitempty" json:"props,omitempty" yaml:"props,omitempty"`
	Links           []Link           `xml:"link,omitempty" json:"links,omitempty" yaml:"links,omitempty"`
	Prose           *Prose           `xml:",any" json:"prose,omitempty" yaml:"prose,omitempty"`
	ComponentGroups []ComponentGroup `xml:"group" json:"groups" yaml:"groups"`
	Components      []Component      `xml:"component" json:"components" yaml:"components"`
	References      *References      `xml:"references,omitempty" json:"references,omitempty" yaml:"references,omitempty"`
}

ComponentGroup ...

type Components

type Components struct {
	Items []Item `xml:"component,omitempty" json:"component,omitempty" yaml:"component,omitempty"`
}

Components ...

type Control

type Control struct {
	ID            string       `xml:"id,attr" json:"id" yaml:"id"`
	OptionalClass string       `xml:"class,attr" json:"class,omitempty" yaml:"class,omitempty"`
	Title         *Raw         `xml:"title" json:"title" yaml:"title"`
	Props         []Prop       `xml:"prop" json:"props,omitempty" yaml:"props,omitempty"`
	Parts         []Part       `xml:"part" json:"parts,omitempty" yaml:"parts,omitempty"`
	Links         []Link       `xml:"link" json:"links,omitempty" yaml:"links,omitempty"`
	Params        []Param      `xml:"param" json:"params,omitempty" yaml:"params,omitempty"`
	Subcontrols   []Subcontrol `xml:"subcontrol,omitempty" json:"subcontrols,omitempty" yaml:"subcontrols,omitempty"`
	References    *References  `xml:"references,omitempty" json:"references,omitempty" yaml:"references,omitempty"`
}

Control ...

type ControlGroup

type ControlGroup struct {
	ID            string         `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	OptionalClass string         `xml:"class,attr" json:"class,omitempty" yaml:"class,omitempty"`
	Title         *Raw           `xml:"title" json:"title" yaml:"title"`
	Props         []Prop         `xml:"prop,omitempty" json:"props,omitempty" yaml:"props,omitempty"`
	Parts         []Part         `xml:"part,omitempty" json:"parts,omitempty" yaml:"parts,omitempty"`
	Links         []Link         `xml:"link,omitempty" json:"links,omitempty" yaml:"links,omitempty"`
	Params        []Param        `xml:"param,omitempty" json:"params,omitempty" yaml:"params,omitempty"`
	Prose         *Prose         `xml:",any" json:"prose,omitempty" yaml:"prose,omitempty"`
	ControlGroups []ControlGroup `xml:"group" json:"groups,omitempty" yaml:"groups,omitempty"`
	Controls      []Control      `xml:"control" json:"controls,omitempty" yaml:"controls,omitempty"`
	References    *References    `xml:"references,omitempty" json:"references,omitempty" yaml:"references,omitempty"`
}

ControlGroup ...

type Declarations

type Declarations struct {
	XMLName    xml.Name    `xml:"http://csrc.nist.gov/ns/oscal/1.0 declarations" json:"-" yaml:"-"`
	Href       string      `xml:"href,attr,omitempty" json:"href,omitempty" yaml:"href,omitempty"`
	ParamDecls []ParamDecl `xml:"-" json:"-" yaml:"-"`
	PropDecls  []PropDecl  `xml:"declare-prop,omitempty" json:"propertyDeclarations,omitempty" yaml:"propertyDeclarations,omitempty"`
	PartDecls  []PartDecl  `xml:"declare-part,omitempty" json:"partDeclarations,omitempty" yaml:"partDeclarations,omitempty"`
	ParaDecls  []ParaDecl  `xml:"declare-p,omitempty" json:"paragraphDeclarations,omitempty" yaml:"paragraphDeclarations,omitempty"`
	LinkDecls  []LinkDecl  `xml:"declare-link,omitempty" json:"linkDeclarations,omitempty" yaml:"linkDeclarations,omitempty"`
}

Declarations ...

func (*Declarations) Component

func (d *Declarations) Component() string

Component ...

func (*Declarations) Raw

func (d *Declarations) Raw(format string, prettify bool) ([]byte, error)

Raw ...

func (*Declarations) Type

func (d *Declarations) Type() interface{}

Type ...

type Desc

type Desc struct {
	Raw string `xml:",innerxml"`
}

Desc ...

func (*Desc) MarshalJSON

func (d *Desc) MarshalJSON() ([]byte, error)

MarshalJSON ...

func (*Desc) MarshalYAML

func (d *Desc) MarshalYAML() (interface{}, error)

MarshalYAML ...

func (*Desc) UnmarshalJSON

func (d *Desc) UnmarshalJSON(data []byte) error

UnmarshalJSON ...

type EM

type EM struct {
	OptionalClass string `xml:"class,attr"`
	Q             []Q    `xml:"q"`
	Code          []Code `xml:"code"`
	EM            []EM   `xml:"em"`
	I             []I    `xml:"i"`
	B             []B    `xml:"b"`
	Sub           []Sub  `xml:"sub"`
	Sup           []Sup  `xml:"sup"`
	Span          []Span `xml:"span"`
	Value         string `xml:",chardata"`
	Xref          []Xref `xml:"a"`
}

EM ...

type Exclude

type Exclude struct {
	Matches []Match       `xml:"match,omitempty" json:"matches,omitempty" yaml:"matches,omitempty"`
	Calls   []ExcludeCall `xml:"call,omitempty" json:"calls,omitempty" yaml:"calls,omitempty"`
}

Exclude ...

type ExcludeCall

type ExcludeCall struct {
	ControlID    string `xml:"control-id,attr,omitempty" json:"controlId,omitempty" yaml:"controlId,omitempty"`
	SubcontrolID string `xml:"subcontrol-id,attr,omitempty" json:"subcontrolId,omitempty" yaml:"subcontrolId,omitempty"`
}

ExcludeCall ...

type Frame

type Frame struct {
	Title         *Raw           `xml:"title,omitempty" json:"title,omitempty" yaml:"title,omitempty"`
	ProfileGroups []ProfileGroup `xml:"group" json:"groups" yaml:"groups"`
	Calls         []Call         `xml:"call,omitempty" json:"calls,omitempty" yaml:"calls,omitempty"`
	Matches       []Match        `xml:"match,omitempty" json:"matches,omitempty" yaml:"matches,omitempty"`
}

Frame ...

type Framework

type Framework struct {
	XMLName         xml.Name               `xml:"http://csrc.nist.gov/ns/oscal/1.0 framework" json:"-" yaml:"-"`
	ID              string                 `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	OptionalClass   string                 `xml:"class,attr,omitempty" json:"class,omitempty" yaml:"class,omitempty"`
	Title           *Raw                   `xml:"title" json:"title" yaml:"title"`
	Declarations    *FrameworkDeclarations `xml:"declarations,omitempty" json:"declarations,omitempty" yaml:"declarations,omitempty"`
	Sections        []Section              `xml:"section,omitempty" json:"sections,omitempty" yaml:"sections,omitempty"`
	ComponentGroups []ComponentGroup       `xml:"group,omitempty" json:"groups,omitempty" yaml:"groups,omitempty"`
	Components      []Component            `xml:"component,omitempty" json:"components,omitempty" yaml:"components,omitempty"`
	References      *References            `xml:"references,omitempty" json:"references,omitempty" yaml:"references,omitempty"`
}

Framework ...

func (*Framework) Component

func (f *Framework) Component() string

Component ...

func (*Framework) RawJSON

func (f *Framework) RawJSON(prettify bool) ([]byte, error)

RawJSON ...

func (*Framework) RawXML

func (f *Framework) RawXML(prettify bool) ([]byte, error)

RawXML ...

func (*Framework) RawYAML

func (f *Framework) RawYAML() ([]byte, error)

RawYAML ...

type FrameworkDeclarations

type FrameworkDeclarations struct {
	Href         string
	Declarations *Declarations
}

FrameworkDeclarations ...

func (*FrameworkDeclarations) MarshalJSON

func (f *FrameworkDeclarations) MarshalJSON() ([]byte, error)

MarshalJSON ...

func (*FrameworkDeclarations) MarshalYAML

func (f *FrameworkDeclarations) MarshalYAML() (interface{}, error)

MarshalYAML ...

type Href

type Href string

Href ...

func (*Href) MarshalJSON

func (h *Href) MarshalJSON() ([]byte, error)

MarshalJSON ...

func (*Href) MarshalXMLAttr

func (h *Href) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

MarshalXMLAttr ...

func (*Href) MarshalYAML

func (h *Href) MarshalYAML() (interface{}, error)

MarshalYAML ...

type I

type I struct {
	OptionalClass string `xml:"class,attr"`
	Q             []Q    `xml:"q"`
	Code          []Code `xml:"code"`
	EM            []EM   `xml:"em"`
	I             []I    `xml:"i"`
	B             []B    `xml:"b"`
	Sub           []Sub  `xml:"sub"`
	Sup           []Sup  `xml:"sup"`
	Span          []Span `xml:"span"`
	Value         string `xml:",chardata"`
	Xref          []Xref `xml:"a"`
}

I ...

type Implementation

type Implementation struct {
	XMLName    xml.Name   `xml:"http://csrc.nist.gov/ns/oscal/1.0 implementation" json:"-" yaml:"-"`
	ID         string     `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	Title      string     `xml:"title" json:"title" yaml:"title"`
	Paragraphs []P        `xml:"p,omitempty" json:"paragraphs,omitempty" yaml:"paragraphs,omitempty"`
	Props      []Prop     `xml:"prop,omitempty" json:"prop,omitempty" yaml:"prop,omitempty"`
	Profiles   *Profiles  `xml:"profiles,omitempty" json:"profiles,omitempty" yaml:"profiles,omitempty"`
	Components Components `xml:"components,omitempty" json:"components" yaml:"components"`
	Policies   Policies   `xml:"policies,omitempty" json:"policies" yaml:"policies"`
	Procedures Procedures `xml:"procedures,omitempty" json:"procedures" yaml:"procedures"`
	Params     Params     `xml:"params,omitempty" json:"params" yaml:"params"`
}

Implementation ...

func (Implementation) Component

func (Implementation) Component() string

Component ...

func (*Implementation) RawJSON

func (i *Implementation) RawJSON(prettify bool) ([]byte, error)

RawJSON ...

func (*Implementation) RawXML

func (i *Implementation) RawXML(prettify bool) ([]byte, error)

RawXML ...

func (*Implementation) RawYAML

func (i *Implementation) RawYAML() ([]byte, error)

RawYAML ...

type ImplementationParam

type ImplementationParam struct {
	ID    string `xml:"param-id,omitempty" json:"paramId" yaml:"paramId"`
	Props []Prop `xml:"prop,omitempty" json:"prop,omitempty" yaml:"prop,omitempty"`
	Desc  Desc   `xml:"desc,omitempty" json:"desc,omitempty" yaml:"desc,omitempty"`
}

ImplementationParam ...

type Import

type Import struct {
	Href    *Href    `xml:"href,attr" json:"href" yaml:"href"`
	Include *Include `xml:"include,omitempty" json:"include,omitempty" yaml:"include,omitempty"`
	Exclude *Exclude `xml:"exclude,omitempty" json:"exclude,omitempty" yaml:"exclude,omitempty"`
}

Import ...

type Include

type Include struct {
	All     *All    `xml:"all,omitempty" json:"all,omitempty" yaml:"all,omitempty"`
	Calls   []Call  `xml:"call,omitempty" json:"calls,omitempty" yaml:"calls,omitempty"`
	Matches []Match `xml:"match,omitempty" json:"matches,omitempty" yaml:"matches,omitempty"`
}

Include ...

type Inherit

type Inherit struct {
	From string `xml:"from,attr,omitempty" json:"from,omitempty" yaml:"from,omitempty"`
}

Inherit ...

func (*Inherit) MarshalJSON

func (i *Inherit) MarshalJSON() ([]byte, error)

MarshalJSON ...

func (*Inherit) MarshalYAML

func (i *Inherit) MarshalYAML() (interface{}, error)

MarshalYAML ...

func (*Inherit) UnmarshalJSON

func (i *Inherit) UnmarshalJSON(data []byte) error

UnmarshalJSON ...

type Item

type Item struct {
	OptionalClass string  `xml:"class,attr,omitempty" json:"class,omitempty" yaml:"class,omitempty"`
	ID            string  `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	Title         *Raw    `xml:"title,omitempty" json:"title,omitempty" yaml:"title,omitempty"`
	Params        []Param `xml:"param,omitempty" json:"params,omitempty" yaml:"params,omitempty"`
	Props         []Prop  `xml:"prop,omitempty" json:"props,omitempty" yaml:"props,omitempty"`
	Links         []Link  `xml:"link,omitempty" json:"links,omitempty" yaml:"links,omitempty"`
	Prose         *Prose  `xml:",any" json:"prose,omitempty" yaml:"prose,omitempty"`
	Parts         []Part  `xml:"part,omitempty" json:"parts,omitempty" yaml:"parts,omitempty"`
	Items         []Item  `xml:"component,omitempty" json:"components,omitempty" yaml:"components,omitempty"`
}

Item ...

type LI

type LI struct {
	ID            string `xml:"id,attr"`
	OptionalClass string `xml:"class,attr"`

	// rnc:semantical
	Withdrawn []Withdrawn `xml:"withdrawn"`
	Assign    []Assign    `xml:"insert"`
	Select    []Select    `xml:"select"`

	// rnc:mix
	Q     []Q    `xml:"q"`
	Code  []Code `xml:"code"`
	EM    []EM   `xml:"em"`
	I     []I    `xml:"i"`
	B     []B    `xml:"b"`
	Sub   []Sub  `xml:"sub"`
	Sup   []Sup  `xml:"sup"`
	Span  []Span `xml:"span"`
	Value string `xml:",chardata"`

	Xref []Xref `xml:"a"`

	OL []OL `xml:"ol"`
	UL []UL `xml:"ul"`
}

LI ...

type Link struct {
	Rel   string `xml:"rel,attr" json:"rel,omitempty"  yaml:"rel,omitempty"`
	Href  string `xml:"href,attr" json:"href" yaml:"href"`
	Value string `xml:",chardata" json:"value,omitempty" yaml:"value,omitempty"`
}

Link ...

type LinkDecl

type LinkDecl struct {
	Rel       string       `xml:"rel,attr" json:"rel" yaml:"rel"`
	Context   string       `xml:"context,attr" json:"context" yaml:"context"`
	Singleton *SelfClosing `xml:"singleton,omitempty" json:"singleton,omitempty" yaml:"singleton,omitempty"`
	Required  *SelfClosing `xml:"required,omitempty" json:"required,omitempty" yaml:"required,omitempty"`
}

LinkDecl ...

type Match

type Match struct {
	WithSubcontrols WithSubcontrols `xml:"with-subcontrols,attr,omitempty"`
	WithControl     WithControl     `xml:"with-control,attr,omitempty"`
	Pattern         string          `xml:"pattern,attr,omitempty"`
	OrderBy         OrderBy         `xml:"order-by,attr,omitempty"`
}

Match ...

type Merge

type Merge struct {
	Combine *Combine `xml:"combine,omitempty" json:"combine,omitempty" yaml:"combine,omitempty"`
	Build   *Build   `xml:"as-is,omitempty" json:"asIs,omitempty" yaml:"asIs,omitempty"`
	Frame   *Frame   `xml:"custom,omitempty" json:"custom,omitempty" yaml:"custom,omitempty"`
}

Merge ...

type Method

type Method string

Method ...

func (*Method) UnmarshalXMLAttr

func (m *Method) UnmarshalXMLAttr(attr xml.Attr) error

UnmarshalXMLAttr ...

type Modify

type Modify struct {
	ParamSettings []ParamSetting `xml:"set-param,omitempty" json:"paramSettings,omitempty" yaml:"paramSettings,omitempty"`
	Alterations   []Alteration   `xml:"alter,omitempty" json:"alterations,omitempty" yaml:"alterations,omitempty"`
}

Modify ...

type OL

type OL struct {
	XMLName xml.Name `xml:"ol"`
	Raw     string   `xml:",innerxml"`
}

OL ...

type OSCAL

type OSCAL struct {
	XMLName        xml.Name        `json:"-" yaml:"-"`
	Catalog        *Catalog        `json:"catalog,omitempty" yaml:"catalog,omitempty"`
	Framework      *Framework      `json:"framework,omitempty" yaml:"framework,omitempty"`
	Worksheet      *Worksheet      `json:"worksheet,omitempty" yaml:"worksheet,omitempty"`
	Declarations   *Declarations   `json:"declarations,omitempty" yaml:"declarations,omitempty"`
	Profile        *Profile        `json:"profile,omitempty" yaml:"profile,omitempty"`
	Implementation *Implementation `json:"implementation,omitempty" yaml:"implementation,omitempty"`
}

OSCAL ...

func New

func New(r io.Reader) (*OSCAL, error)

New ...

func NewFromOC

func NewFromOC(options OpenControlOptions) (*OSCAL, error)

NewFromOC initializes an OSCAL type from raw OpenControl data

func (*OSCAL) MarshalXML

func (o *OSCAL) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML ...

func (*OSCAL) RawJSON

func (o *OSCAL) RawJSON(prettify bool) ([]byte, error)

RawJSON ...

func (*OSCAL) RawXML

func (o *OSCAL) RawXML(prettify bool) ([]byte, error)

RawXML ...

func (*OSCAL) RawYAML

func (o *OSCAL) RawYAML() ([]byte, error)

RawYAML ...

type OpenControlOptions

type OpenControlOptions struct {
	OpenControlYAMLFilepath string
	OpenControlsDir         string
}

OpenControlOptions ...

type Options

type Options struct {
	Reader io.Reader
}

Options ...

type OrderBy

type OrderBy string

OrderBy ...

func (*OrderBy) UnmarshalXMLAttr

func (o *OrderBy) UnmarshalXMLAttr(attr xml.Attr) error

UnmarshalXMLAttr ...

type P

type P struct {
	XMLName       xml.Name    `xml:"p" json:"-" yaml:"-"`
	ID            string      `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	OptionalClass string      `xml:"class,attr,omitempty" json:"class,omitempty" yaml:"class,omitempty"`
	Withdrawn     []Withdrawn `xml:"withdrawn,omitempty" json:"withdrawn,omitempty" yaml:"withdrawn,omitempty"`
	Assign        []Assign    `xml:"insert,omitempty" json:"insert,omitempty" yaml:"insert,omitempty"`
	Select        []Select    `xml:"select,omitempty" json:"select,omitempty" yaml:"select,omitempty"`
	Raw           string      `xml:",innerxml" json:"raw,omitempty" yaml:"raw,omitempty"`
}

P ...

type ParaDecl

type ParaDecl struct {
	RequiredClass string       `xml:"class,attr" json:"class" yaml:"class"`
	Context       string       `xml:"context,attr" json:"context" yaml:"context"`
	Singleton     *SelfClosing `xml:"singleton,omitempty" json:"singleton,omitempty" yaml:"singleton,omitempty"`
	Required      *SelfClosing `xml:"required,omitempty" json:"required,omitempty" yaml:"required,omitempty"`
}

ParaDecl ...

type Param

type Param struct {
	ID            string `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	OptionalClass string `xml:"class,attr,omitempty" json:"class,omitempty" yaml:"class,omitempty"`
	Desc          Desc   `xml:"desc" json:"desc" yaml:"desc"`
	Label         string `xml:"label,omitempty" json:"label,omitempty" yaml:"label,omitempty"`
	Value         string `xml:"value,omitempty" json:"value,omitempty" yaml:"value,omitempty"`
}

Param ...

type ParamDecl

type ParamDecl struct{}

ParamDecl ...

type ParamSetting

type ParamSetting struct {
	ParamID       string `xml:"param-id,attr,omitempty" json:"paramId,omitempty" yaml:"paramId,omitempty"`
	OptionalClass string `xml:"class,attr,omitempty" json:"class,omitempty" yaml:"class,omitempty"`
	Desc          *Raw   `xml:"desc,omitempty" json:"desc,omitempty" yaml:"desc,omitempty"`
	Label         string `xml:"label,omitempty" json:"label,omitempty" yaml:"label,omitempty"`
	ParamValue    string `xml:"value,omitempty" json:"value,omitempty" yaml:"value,omitempty"`
}

ParamSetting ...

type Params

type Params struct {
	SetParams []ImplementationParam `xml:"set-param,omitempty" json:"setParam,omitempty" yaml:"setParam,omitempty"`
}

Params ...

type Part

type Part struct {
	ID            string  `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	OptionalClass string  `xml:"class,attr,omitempty" json:"class,omitempty" yaml:"class,omitempty"`
	Title         *Raw    `xml:"title,omitempty" json:"title,omitempty" yaml:"title,omitempty"`
	Prose         *Prose  `xml:",any" json:"prose,omitempty" yaml:"prose,omitempty"`
	Props         []Prop  `xml:"prop" json:"props,omitempty" yaml:"props,omitempty"`
	Parts         []Part  `xml:"part" json:"parts,omitempty" yaml:"parts,omitempty"`
	Links         []Link  `xml:"link" json:"links,omitempty" yaml:"links,omitempty"`
	Params        []Param `xml:"param" json:"params,omitempty" yaml:"params,omitempty"`
}

Part ...

type PartDecl

type PartDecl struct {
	RequiredClass string       `xml:"class,attr" json:"class" yaml:"class"`
	Context       string       `xml:"context,attr" json:"context" yaml:"context"`
	Singleton     *SelfClosing `xml:"singleton,omitempty" json:"singleton,omitempty" yaml:"singleton,omitempty"`
	Required      *SelfClosing `xml:"required,omitempty" json:"required,omitempty" yaml:"required,omitempty"`
}

PartDecl ...

type Policies

type Policies struct {
	Items []Item `xml:"component,omitempty" json:"component,omitempty" yaml:"component,omitempty"`
}

Policies ...

type Position

type Position string

Position ...

func (*Position) UnmarshalXMLAttr

func (p *Position) UnmarshalXMLAttr(attr xml.Attr) error

UnmarshalXMLAttr ...

type Pre

type Pre struct {
	XMLName xml.Name `xml:"pre"`
	ID      string   `xml:"id,attr,omitempty"`
	Raw     string   `xml:",innerxml"`
}

Pre ...

type Procedures

type Procedures struct {
	Items []Item `xml:"component,omitempty" json:"component,omitempty" yaml:"component,omitempty"`
}

Procedures ...

type Profile

type Profile struct {
	XMLName xml.Name `xml:"http://csrc.nist.gov/ns/oscal/1.0 profile" json:"-" yaml:"-"`
	ID      string   `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	Title   *Raw     `xml:"title,omitempty" json:"title,omitempty" yaml:"title,omitempty"`
	Imports []Import `xml:"import" json:"imports" yaml:"imports"`
	Merge   *Merge   `xml:"merge,omitempty" json:"merge,omitempty" yaml:"merge,omitempty"`
	Modify  *Modify  `xml:"modify,omitempty" json:"modify,omitempty" yaml:"modify,omitempty"`
}

Profile ...

func (*Profile) Component

func (p *Profile) Component() string

Component ...

func (*Profile) RawJSON

func (p *Profile) RawJSON(prettify bool) ([]byte, error)

RawJSON ...

func (*Profile) RawXML

func (p *Profile) RawXML(prettify bool) ([]byte, error)

RawXML ...

func (*Profile) RawYAML

func (p *Profile) RawYAML() ([]byte, error)

RawYAML ...

func (*Profile) ScaffoldImplementation

func (p *Profile) ScaffoldImplementation() *Implementation

ScaffoldImplementation ...

type ProfileGroup

type ProfileGroup struct {
	Title         *Raw           `xml:"title,omitempty" json:"title,omitempty" yaml:"title,omitempty"`
	ProfileGroups []ProfileGroup `xml:"group" json:"groups" yaml:"groups"`
	Calls         []Call         `xml:"call,omitempty" json:"calls,omitempty" yaml:"calls,omitempty"`
	Matches       []Match        `xml:"match,omitempty" json:"matches,omitempty" yaml:"matches,omitempty"`
}

ProfileGroup ...

type Profiles

type Profiles struct {
	Links []Link `xml:"link,omitempty" json:"link,omitempty" yaml:"link,omitempty"`
}

Profiles ...

type Prop

type Prop struct {
	OptionalClass string `xml:"class,attr,omitempty" json:"class,omitempty" yaml:"class,omitempty"`
	Value         string `xml:",chardata" json:"value,omitempty" yaml:"value,omitempty"`
}

Prop ...

type PropDecl

type PropDecl struct {
	RequiredClass string       `xml:"class,attr" json:"class" yaml:"class"`
	Context       string       `xml:"context,attr" json:"context" yaml:"context"`
	Singleton     *SelfClosing `xml:"singleton,omitempty" json:"singleton,omitempty" yaml:"singleton,omitempty"`
	Required      *SelfClosing `xml:"required,omitempty" json:"required,omitempty" yaml:"required,omitempty"`
	Identifier    *SelfClosing `xml:"identifier,omitempty" json:"identifier,omitempty" yaml:"identifier,omitempty"`
	Regex         string       `xml:"regex,omitempty" json:"regex,omitempty" yaml:"regex,omitempty"`
	Calc          []Calc       `xml:"calc,omitempty" json:"calc,omitempty" yaml:"calc,omitempty"`
	Values        []string     `xml:"value,omitempty" json:"values,omitempty" yaml:"values,omitempty"`
}

PropDecl ...

type Prose

type Prose struct {
	XMLName xml.Name

	P   []P
	UL  []UL
	OL  []OL
	Pre []Pre
	// contains filtered or unexported fields
}

Prose ...

func (*Prose) MarshalJSON

func (p *Prose) MarshalJSON() ([]byte, error)

MarshalJSON ...

func (*Prose) MarshalXML

func (p *Prose) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML ...

func (*Prose) MarshalYAML

func (p *Prose) MarshalYAML() (interface{}, error)

MarshalYAML ...

func (*Prose) UnmarshalJSON

func (p *Prose) UnmarshalJSON(data []byte) error

UnmarshalJSON ...

func (*Prose) UnmarshalXML

func (p *Prose) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML ...

type Q

type Q struct {
	I     []I    `xml:"i"`
	B     []B    `xml:"b"`
	Sub   []Sub  `xml:"sub"`
	Sup   []Sup  `xml:"sup"`
	Value string `xml:",chardata"`
}

Q ...

type Raw

type Raw struct {
	Value string `xml:",innerxml"`
}

Raw ...

func (*Raw) MarshalJSON

func (r *Raw) MarshalJSON() ([]byte, error)

MarshalJSON ...

func (*Raw) MarshalYAML

func (r *Raw) MarshalYAML() (interface{}, error)

MarshalYAML ...

func (*Raw) UnmarshalJSON

func (r *Raw) UnmarshalJSON(data []byte) error

UnmarshalJSON ...

type Ref

type Ref struct {
	ID        string     `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	Standards []Standard `xml:"std,omitempty" json:"standards,omitempty" yaml:"standards,omitempty"`
	Citations []Citation `xml:"citation,omitempty" json:"citations,omitempty" yaml:"citations,omitempty"`
	Prose     *Prose     `xml:",any" json:"prose,omitempty" yaml:"prose,omitempty"`
}

Ref ...

type References

type References struct {
	Refs []Ref `xml:"ref" json:"refs" yaml:"refs"`
}

References ...

type Remove

type Remove struct {
	ClassRef string `xml:"class-ref,attr,omitempty" json:"classRef,omitempty" yaml:"classRef,omitempty"`
	IDRef    string `xml:"id-ref,attr,omitempty" json:"idRef,omitempty" yaml:"idRef,omitempty"`
	ItemName string `xml:"item-name,attr,omitempty" json:"itemName,omitempty" yaml:"itemName,omitempty"`
}

Remove ...

type Section

type Section struct {
	ID            string      `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	OptionalClass string      `xml:"class,attr,omitempty" json:"class,omitempty" yaml:"class,omitempty"`
	Title         *Raw        `xml:"title" json:"title" yaml:"title"`
	Prose         *Prose      `xml:",any" json:"prose,omitempty" yaml:"prose,omitempty"`
	Sections      []Section   `xml:"section,omitempty" json:"sections,omitempty" yaml:"sections,omitempty"`
	References    *References `xml:"references,omitempty" json:"references,omitempty" yaml:"references,omitempty"`
}

Section ...

type Select

type Select struct{}

Select ...

type SelfClosing

type SelfClosing bool

SelfClosing ...

func (*SelfClosing) UnmarshalXML

func (s *SelfClosing) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML ...

type Span

type Span struct {
	OptionalClass string `xml:"class,attr"`
	Q             []Q    `xml:"q"`
	Code          []Code `xml:"code"`
	EM            []EM   `xml:"em"`
	I             []I    `xml:"i"`
	B             []B    `xml:"b"`
	Sub           []Sub  `xml:"sub"`
	Sup           []Sup  `xml:"sup"`
	Span          []Span `xml:"span"`
	Value         string `xml:",chardata"`
	Xref          []Xref `xml:"a"`
}

Span ...

type Standard

type Standard struct {
	Href  string `xml:"href,attr,omitempty" json:"href,omitempty" yaml:"href,omitempty"`
	Value string `xml:",chardata" json:"value,omitempty" yaml:"value,omitempty"`
}

Standard ...

type Sub

type Sub struct {
	OptionalClass string `xml:"class,attr"`
	Value         string `xml:",chardata"`
}

Sub ...

type Subcontrol

type Subcontrol struct {
	ID            string      `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	OptionalClass string      `xml:"class,attr,omitempty" json:"class,omitempty" yaml:"class,omitempty"`
	Title         *Raw        `xml:"title,omitempty" json:"title,omitempty" yaml:"title,omitempty"`
	Props         []Prop      `xml:"prop,omitempty" json:"props,omitempty" yaml:"props,omitempty"`
	Parts         []Part      `xml:"part,omitempty" json:"parts,omitempty" yaml:"parts,omitempty"`
	Links         []Link      `xml:"link,omitempty" json:"links,omitempty" yaml:"links,omitempty"`
	Params        []Param     `xml:"param,omitempty" json:"params,omitempty" yaml:"params,omitempty"`
	References    *References `xml:"references,omitempty" json:"references,omitempty" yaml:"references,omitempty"`
}

Subcontrol ...

type Sup

type Sup struct {
	OptionalClass string `xml:"class,attr"`
	Value         string `xml:",chardata"`
}

Sup ...

type UL

type UL struct {
	XMLName xml.Name `xml:"ul"`
	Raw     string   `xml:",innerxml"`
}

UL ...

type WithControl

type WithControl bool

WithControl ...

func (*WithControl) UnmarshalXMLAttr

func (w *WithControl) UnmarshalXMLAttr(attr xml.Attr) error

UnmarshalXMLAttr ...

type WithSubcontrols

type WithSubcontrols bool

WithSubcontrols ...

func (*WithSubcontrols) MarshalXMLAttr

func (w *WithSubcontrols) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

MarshalXMLAttr ...

func (*WithSubcontrols) UnmarshalXMLAttr

func (w *WithSubcontrols) UnmarshalXMLAttr(attr xml.Attr) error

UnmarshalXMLAttr ...

type Withdrawn

type Withdrawn struct {
	Q     []Q    `xml:"q"`
	Code  []Code `xml:"code"`
	EM    []EM   `xml:"em"`
	I     []I    `xml:"i"`
	B     []B    `xml:"b"`
	Sub   []Sub  `xml:"sub"`
	Sup   []Sup  `xml:"sup"`
	Span  []Span `xml:"span"`
	Value string `xml:",chardata"`
}

Withdrawn ...

type Worksheet

type Worksheet struct {
	XMLName         xml.Name               `xml:"http://csrc.nist.gov/ns/oscal/1.0 worksheet" json:"-" yaml:"-"`
	OptionalClass   string                 `xml:"class,attr,omitempty" json:"class,omitempty" yaml:"class,omitempty"`
	ID              string                 `xml:"id,attr,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	Title           *Raw                   `xml:"title" json:"title" yaml:"title"`
	Declarations    *FrameworkDeclarations `xml:"declarations,omitempty" json:"declarations,omitempty" yaml:"declarations,omitempty"`
	Sections        []Section              `xml:"section,omitempty" json:"sections,omitempty" yaml:"sections,omitempty"`
	ComponentGroups []ComponentGroup       `xml:"group,omitempty" json:"groups,omitempty" yaml:"groups,omitempty"`
	Components      []Components           `xml:"component,omitempty" json:"components,omitempty" yaml:"components,omitempty"`
	References      *References            `xml:"references,omitempty" json:"references,omitempty" yaml:"references,omitempty"`
}

Worksheet ... Create type alias and override component method

func (Worksheet) Component

func (Worksheet) Component() string

Component ...

func (*Worksheet) RawJSON

func (w *Worksheet) RawJSON(prettify bool) ([]byte, error)

RawJSON ...

func (*Worksheet) RawXML

func (w *Worksheet) RawXML(prettify bool) ([]byte, error)

RawXML ...

func (*Worksheet) RawYAML

func (w *Worksheet) RawYAML() ([]byte, error)

RawYAML ...

type Xref

type Xref struct {
	Href string `xml:"href,attr"`
	Q    []Q    `xml:"q"`
	Code []Code `xml:"code"`
	EM   []struct {
		OptionalClass string `xml:"class,attr"`
		Value         string `xml:",chardata"`
	} `xml:"em"`
	Value string `xml:",chardata"`
}

Xref ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL