base

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2016 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	SchemaVersion semver.Version `yaml:"-" json:"-"`
}

Base is the bare minimum that every component YAML will have and is used to find the schema version. Complete implementations of component do not need to embed this struct or put it as a field in the component. When this struct is used in the ParseComponent function, it will transfer the version from this struct to the final component struct via SetVersion.

func (*Base) UnmarshalYAML

func (b *Base) UnmarshalYAML(unmarshal func(v interface{}) error) error

UnmarshalYAML is a overridden implementation of YAML parsing the component.yaml This method is similar to the one found here: http://choly.ca/post/go-json-marshalling/ This is necessary because we want to have backwards compatibility with parsing the old types of version 2.0 (type =float). To compensate for that, we have to hand roll our own UnmarshalYAML that can decide what to do for parsing the older version of type float and converting it into semver. In addition, we will use this logic to parse strings into semver.

type BaseComponentParseError

type BaseComponentParseError struct {
	// contains filtered or unexported fields
}

BaseComponentParseError is the type of error that will be returned if the parsing failed for ONLY the `Base` struct.

func NewBaseComponentParseError

func NewBaseComponentParseError(message string) BaseComponentParseError

func (BaseComponentParseError) Error

func (b BaseComponentParseError) Error() string

type Component

type Component interface {
	GetName() string
	GetKey() string
	SetKey(string)
	GetAllSatisfies() []Satisfies
	GetVerifications() *common.VerificationReferences
	GetReferences() *common.GeneralReferences
	GetVersion() semver.Version
	SetVersion(semver.Version)
	GetResponsibleRole() string
}

type Satisfies

type Satisfies interface {
	GetStandardKey() string
	GetControlKey() string
	GetNarratives() []Section
	GetParameters() []Section
	GetCoveredBy() common.CoveredByList
	GetControlOrigin() string
}

type Section

type Section interface {
	GetKey() string
	GetText() string
}

Jump to

Keyboard shortcuts

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