composition

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeComponentDefinitions

func ComposeComponentDefinitions(compDef *oscalTypes_1_1_2.ComponentDefinition) error

ComposeComponentDefinitions composes an OSCAL component definition by adding the remote resources to the back matter and updating with back matter links.

func ComposeComponentValidations

func ComposeComponentValidations(compDef *oscalTypes_1_1_2.ComponentDefinition) error

ComposeComponentValidations compiles the component validations by adding the remote resources to the back matter and updating with back matter links.

func ComposeFromPath added in v0.4.3

func ComposeFromPath(inputFile string) (model *oscalTypes_1_1_2.OscalCompleteSchema, err error)

ComposeFromPath composes an OSCAL model from a file path

func CreateTempDir added in v0.4.3

func CreateTempDir() (string, error)

CreateTempDir creates a temporary directory to store the composed OSCAL models

Types

type ResourceStore

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

ResourceStore is a store of resources.

func NewResourceStoreFromBackMatter

func NewResourceStoreFromBackMatter(backMatter *oscalTypes_1_1_2.BackMatter) *ResourceStore

NewResourceStoreFromBackMatter creates a new resource store from the back matter of a component definition.

func (*ResourceStore) AddExisting

func (s *ResourceStore) AddExisting(resource *oscalTypes_1_1_2.Resource)

AddExisting adds a resource to the store that is already in the back matter.

func (*ResourceStore) AddFetched

func (s *ResourceStore) AddFetched(resource *oscalTypes_1_1_2.Resource)

AddFetched adds a resource to the store that was fetched from a remote source.

func (s *ResourceStore) AddFromLink(link *oscalTypes_1_1_2.Link) (ids []string, err error)

AddFromLink adds resources from a link to the store.

func (*ResourceStore) AllFetched

func (s *ResourceStore) AllFetched() []oscalTypes_1_1_2.Resource

AllFetched returns all the resources that were fetched from a remote source.

func (*ResourceStore) Get

Get returns the resource with the given ID, if it exists.

func (*ResourceStore) GetExisting

func (s *ResourceStore) GetExisting(id string) (*oscalTypes_1_1_2.Resource, bool)

GetExisting returns the resource with the given ID, if it exists.

func (*ResourceStore) GetFetched

func (s *ResourceStore) GetFetched(id string) (*oscalTypes_1_1_2.Resource, bool)

GetFetched returns the resource that was fetched from a remote source with the given ID, if it exists.

func (*ResourceStore) GetHrefIds

func (s *ResourceStore) GetHrefIds(href string) (ids []string, err error)

GetHrefIds gets the resource ids for a given href

func (*ResourceStore) Has

func (s *ResourceStore) Has(id string) bool

Has returns true if the resource store has a resource with the given ID.

func (*ResourceStore) SetHrefIds

func (s *ResourceStore) SetHrefIds(href string, ids []string)

SetHrefIds sets the resource ids for a given href

Jump to

Keyboard shortcuts

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