Documentation ¶
Index ¶
- func ComposeComponentDefinitions(compDef *oscalTypes_1_1_2.ComponentDefinition) error
- func ComposeComponentValidations(compDef *oscalTypes_1_1_2.ComponentDefinition) error
- func ComposeFromPath(inputFile string) (model *oscalTypes_1_1_2.OscalCompleteSchema, err error)
- func CreateTempDir() (string, error)
- type ResourceStore
- func (s *ResourceStore) AddExisting(resource *oscalTypes_1_1_2.Resource)
- func (s *ResourceStore) AddFetched(resource *oscalTypes_1_1_2.Resource)
- func (s *ResourceStore) AddFromLink(link *oscalTypes_1_1_2.Link) (ids []string, err error)
- func (s *ResourceStore) AllFetched() []oscalTypes_1_1_2.Resource
- func (s *ResourceStore) Get(id string) (*oscalTypes_1_1_2.Resource, bool)
- func (s *ResourceStore) GetExisting(id string) (*oscalTypes_1_1_2.Resource, bool)
- func (s *ResourceStore) GetFetched(id string) (*oscalTypes_1_1_2.Resource, bool)
- func (s *ResourceStore) GetHrefIds(href string) (ids []string, err error)
- func (s *ResourceStore) Has(id string) bool
- func (s *ResourceStore) SetHrefIds(href string, ids []string)
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
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 (*ResourceStore) AddFromLink ¶
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 ¶
func (s *ResourceStore) Get(id string) (*oscalTypes_1_1_2.Resource, bool)
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