commands

package
v1.2.27 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// BadCommandMsg is an error message that is returned when a command line cannot be parsed
	BadCommandMsg = `could not parse command "%s"`
)

Variables

View Source
var BuilderTypeConfig = []byte{} /* 2707 elements not displayed */

BuilderTypeConfig - do not edit

View Source
var ModuleTypeConfig = []byte{} /* 2782 elements not displayed */

ModuleTypeConfig - do not edit

Functions

func CmdConverter

func CmdConverter(mPath string, cmdList []string) ([][]string, error)

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

func GetBuilder(module *mta.Module) (string, bool, map[string]string, []string, error)

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

func GetModuleAndCommands(loc dir.IMtaParser, module string) (*mta.Module, []string, string, error)

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, 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

type CommandList struct {
	Info    string
	Command []string
}

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

Jump to

Keyboard shortcuts

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