component

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetComponents added in v0.10.0

func GetComponents(oscalComponent *oscalTypes_1_1_2.ComponentDefinition) []component

Types

type Model

type Model struct {
	IsOpen bool
	// contains filtered or unexported fields
}

func NewComponentDefinitionModel

func NewComponentDefinitionModel(oscalComponent *oscalTypes_1_1_2.ComponentDefinition) Model

func (*Model) Close

func (m *Model) Close()

func (*Model) GetComponentDefinition added in v0.8.0

func (m *Model) GetComponentDefinition() *oscalTypes_1_1_2.ComponentDefinition

GetComponentDefinition returns the component definition model, used on save events

func (*Model) GetDimensions

func (m *Model) GetDimensions() (height, width int)

func (*Model) GetSelectedFramework added in v0.10.0

func (m *Model) GetSelectedFramework() framework

GetSelectedFramework returns the selected framework

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) Open

func (m *Model) Open(height, width int)

func (*Model) TestSetSelectedControl added in v0.8.0

func (m *Model) TestSetSelectedControl(title string)

TestSetSelectedControl is a test helper function to set the selected control

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Model) UpdateDescription added in v0.8.0

func (m *Model) UpdateDescription(description string)

func (*Model) UpdateRemarks added in v0.8.0

func (m *Model) UpdateRemarks(remarks string)

func (*Model) UpdateWithComponentDefinition added in v0.10.0

func (m *Model) UpdateWithComponentDefinition(oscalComponent *oscalTypes_1_1_2.ComponentDefinition)

UpdateWithComponentDefinition updates the model data given a component definition Useful when a new component definition is loaded (at init time or if component definition is generated)

func (Model) View

func (m Model) View() string

type ModelCloseMsg added in v0.10.0

type ModelCloseMsg struct{}

type ModelOpenMsg added in v0.10.0

type ModelOpenMsg struct {
	Height int
	Width  int
}

type ValidateCloseMsg added in v0.10.0

type ValidateCloseMsg struct{}

type ValidateModel added in v0.10.0

type ValidateModel struct {
	IsOpen bool
	// contains filtered or unexported fields
}

func NewValidateModel added in v0.10.0

func NewValidateModel(oscalComponent *oscalTypes_1_1_2.ComponentDefinition) ValidateModel

func (ValidateModel) Init added in v0.10.0

func (m ValidateModel) Init() tea.Cmd

func (*ValidateModel) RunValidations added in v0.10.0

func (m *ValidateModel) RunValidations(runExecutable bool, target string) (*oscalTypes_1_1_2.AssessmentResults, error)

func (ValidateModel) Update added in v0.10.0

func (m ValidateModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (ValidateModel) View added in v0.10.0

func (m ValidateModel) View() string

type ValidateOpenMsg added in v0.10.0

type ValidateOpenMsg struct {
	Height int
	Width  int
	Target string
}

type ValidateStartMsg added in v0.10.0

type ValidateStartMsg struct{}

type ValidationCompleteMsg added in v0.10.0

type ValidationCompleteMsg struct {
	Err error
}

type ValidationDataMsg added in v0.10.0

type ValidationDataMsg struct {
	AssessmentResults *oscalTypes_1_1_2.AssessmentResults
}

Jump to

Keyboard shortcuts

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