Documentation
¶
Index ¶
- Constants
- Variables
- func CmdConverter(mPath string, cmdList []string) ([][]string, error)
- func ConvertMap(m map[interface{}]interface{}) map[string]interface{}
- func GetBuilder(module *mta.Module) (string, bool, map[string]string, []string, error)
- func GetModuleAndCommands(loc dir.IMtaParser, module string) (*mta.Module, []string, string, error)
- func GetModuleSBomGenCommands(loc *dir.Loc, module *mta.Module, sbomFileName string, sbomFileType string, ...) ([][]string, error)
- func GetSBomsMergeCommand(loc *dir.Loc, cyclonedx_cli string, mtaObj *mta.MTA, sbomTmpDir string, ...) ([][]string, error)
- type Builders
- type Command
- type CommandList
- type ModuleTypes
Constants ¶
const (
// BadCommandMsg is an error message that is returned when a command line cannot be parsed
BadCommandMsg = `could not parse command "%s"`
)
Variables ¶
var BuilderTypeConfig = []byte{} /* 2707 elements not displayed */
BuilderTypeConfig - do not edit
var ModuleTypeConfig = []byte{} /* 2782 elements not displayed */
ModuleTypeConfig - do not edit
Functions ¶
func CmdConverter ¶
CmdConverter - path and commands to execute
func ConvertMap ¶ added in v0.3.0
func ConvertMap(m map[interface{}]interface{}) map[string]interface{}
ConvertMap converts type map[interface{}]interface{} to map[string]interface{}
func GetBuilder ¶ added in v0.2.3
GetBuilder - gets builder type of the module and indicator of custom builder if build-parameter == null or build-parameter.builder == null, return builder=module.type and custom=false else if build-paramete.builder != custom, return builder=build-paramete.builder and custom=true else if build-paramete.builder == custom, return builder=custom and custom=true
func GetModuleAndCommands ¶
GetModuleAndCommands - Get module from mta.yaml and commands (with resolved paths) configured for the module type
func GetModuleSBomGenCommands ¶ added in v1.2.26
func GetModuleSBomGenCommands(loc *dir.Loc, module *mta.Module, sbomFileName string, sbomFileType string, sbomFileSuffix string) ([][]string, error)
GetModuleSBomGenCommands - get sbom generate command for module if unknow sbom gen builder or custom builder, empty [][]string and nil error will be return
func GetSBomsMergeCommand ¶ added in v1.2.26
func GetSBomsMergeCommand(loc *dir.Loc, cyclonedx_cli string, mtaObj *mta.MTA, sbomTmpDir string, sbomFileNames []string, sbomName, sbomType, sbomSuffix string) ([][]string, error)
GetSBomsMergeCommand - generate merge sbom file command under sbom tmp dir if empty sbomFileNames, return empty commandList, nil error
Types ¶
type Builders ¶
type Builders struct { Version string `yaml:"version"` Builders []builder `yaml:"builders"` }
Builders list of commands to execute
type Command ¶ added in v0.2.3
type Command struct {
Command string `yaml:"command"`
}
Command - specific command
type CommandList ¶
CommandList - list of command to execute
func CommandProvider ¶
func CommandProvider(module mta.Module) (CommandList, string, error)
CommandProvider - Get build command's to execute noinspection GoExportedFuncWithUnexportedType
type ModuleTypes ¶
type ModuleTypes struct { Version string `yaml:"version"` ModuleTypes []moduleType `yaml:"module-types"` }
ModuleTypes - list of commands or builders related to specific module type