component

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: CC0-1.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	Name            string                        `yaml:"name" json:"name"`
	Key             string                        `yaml:"key" json:"key"`
	References      common.GeneralReferences      `yaml:"references" json:"references"`
	Verifications   common.VerificationReferences `yaml:"verifications" json:"verifications"`
	Satisfies       []Satisfies                   `yaml:"satisfies" json:"satisfies"`
	ResponsibleRole string                        `yaml:"responsible_role" json:"responsible_role"`
	SchemaVersion   semver.Version                `yaml:"-" json:"-"`
}

Component struct is an individual component requiring documentation Schema info: https://github.com/opencontrol/schemas#component-yaml

func (Component) GetAllSatisfies

func (c Component) GetAllSatisfies() []common.Satisfies

GetAllSatisfies gets all the Satisfies objects for the component.

func (Component) GetKey

func (c Component) GetKey() string

GetKey returns the key for the component (may not be unique). Useful for creating directories.

func (Component) GetName

func (c Component) GetName() string

GetName returns the name of the component

func (Component) GetReferences

func (c Component) GetReferences() *common.GeneralReferences

GetReferences get all the references.

func (Component) GetResponsibleRole

func (c Component) GetResponsibleRole() string

GetResponsibleRole gets the responsible party / role for the component.

func (Component) GetVerifications

func (c Component) GetVerifications() *common.VerificationReferences

GetVerifications get all the verifications.

func (Component) GetVersion

func (c Component) GetVersion() semver.Version

GetVersion returns the version

func (*Component) SetKey

func (c *Component) SetKey(key string)

SetKey sets the key for the component. Useful for overriding.

func (*Component) SetVersion

func (c *Component) SetVersion(version semver.Version)

SetVersion sets the version for the component.

type NarrativeSection

type NarrativeSection struct {
	Key  string `yaml:"key,omitempty" json:"key,omitempty"`
	Text string `yaml:"text" json:"text"`
}

NarrativeSection contains the key and text for a particular section. NarrativeSection can omit the key.

func (NarrativeSection) GetKey

func (ns NarrativeSection) GetKey() string

GetKey returns a unique key

func (NarrativeSection) GetText

func (ns NarrativeSection) GetText() string

GetText returns the text for the section

type Satisfies

type Satisfies struct {
	ControlKey           string               `yaml:"control_key" json:"control_key"`
	StandardKey          string               `yaml:"standard_key" json:"standard_key"`
	Narrative            []NarrativeSection   `yaml:"narrative" json:"narrative"`
	CoveredBy            common.CoveredByList `yaml:"covered_by" json:"covered_by"`
	Parameters           []Section            `yaml:"parameters" json:"parameters"`
	ControlOrigin        string               `yaml:"control_origin" json:"control_origin"`
	ImplementationStatus string               `yaml:"implementation_status" json:"implementation_status"`
}

Satisfies struct contains data demonstrating why a specific component meets a control This struct is a one-to-one mapping of a `satisfies` item in the component.yaml schema https://github.com/opencontrol/schemas#component-yaml

func (Satisfies) GetControlKey

func (s Satisfies) GetControlKey() string

GetControlKey returns the control

func (Satisfies) GetControlOrigin

func (s Satisfies) GetControlOrigin() string

GetControlOrigin returns the control origin (only the first one if multiple)

func (Satisfies) GetControlOrigins

func (s Satisfies) GetControlOrigins() []string

GetControlOrigins returns all the control origins

func (Satisfies) GetCoveredBy

func (s Satisfies) GetCoveredBy() common.CoveredByList

GetCoveredBy gets the list of all the CoveredBy

func (Satisfies) GetImplementationStatus

func (s Satisfies) GetImplementationStatus() string

GetImplementationStatus returns the implementation status (only the first one if multiple)

func (Satisfies) GetImplementationStatuses

func (s Satisfies) GetImplementationStatuses() []string

GetImplementationStatuses returns all implementation statuses

func (Satisfies) GetNarratives

func (s Satisfies) GetNarratives() []common.Section

GetNarratives gets all the general documentation for this particular standard and control

func (Satisfies) GetParameters

func (s Satisfies) GetParameters() []common.Section

GetParameters gets all the parameters for this particular standard and control

func (Satisfies) GetStandardKey

func (s Satisfies) GetStandardKey() string

GetStandardKey returns the standard

type Section

type Section struct {
	Key  string `yaml:"key" json:"key"`
	Text string `yaml:"text" json:"text"`
}

Section contains the key and text for a particular section. Both are required.

func (Section) GetKey

func (s Section) GetKey() string

GetKey returns a unique key

func (Section) GetText

func (s Section) GetText() string

GetText returns the text for the section

Jump to

Keyboard shortcuts

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