Documentation
¶
Index ¶
- Constants
- func AddNewLineToNonEmptyStr(str string) string
- func CreateBenchmarkFolderIfNotExist(spec, version string, fm FolderMgr) error
- func CreateHomeFolderIfNotExist(fm FolderMgr) error
- func CreatePluginsCompiledFolderIfNotExist(fm FolderMgr) error
- func CreatePluginsSourceFolderIfNotExist(fm FolderMgr) error
- func ExcludeAuditTest(tests []string, name string) bool
- func GetAuditTestsList(key, arg string) []string
- func GetBenchmarkFolder(spec, version string, fm FolderMgr) (string, error)
- func GetCompilePluginSubFolder(fm FolderMgr) (string, error)
- func GetEnv(key, fallback string) string
- func GetHomeFolder() string
- func GetPluginSourceSubFolder(fm FolderMgr) (string, error)
- func RemoveNewLineSuffix(str string) string
- type CmdExprBuilder
- type EvaExprBuilderFunc
- type Expr
- type FilesInfo
- type FolderMgr
Constants ¶
const CompilePluginSubFolder = "plugins/compile"
CompilePluginSubFolder plugins complied folder
const PluginSourceSubFolder = "plugins/source"
PluginSourceSubFolder plugin source folder
Variables ¶
This section is empty.
Functions ¶
func AddNewLineToNonEmptyStr ¶
AddNewLineToNonEmptyStr add new line to non empty string
func CreateBenchmarkFolderIfNotExist ¶
CreateBenchmarkFolderIfNotExist create beacon benchmark folder if not exist
func CreateHomeFolderIfNotExist ¶
CreateHomeFolderIfNotExist create beacon home folder if not exist
func CreatePluginsCompiledFolderIfNotExist ¶
CreatePluginsCompiledFolderIfNotExist create plugins compiled folder if not exist
func CreatePluginsSourceFolderIfNotExist ¶
CreatePluginsSourceFolderIfNotExist plugins source folder if not exist
func ExcludeAuditTest ¶
ExcludeAuditTest return true if test is not included in specific tests to run
func GetAuditTestsList ¶
GetAuditTestsList return processing function by specificTests
func GetBenchmarkFolder ¶
GetBenchmarkFolder return benchmark folder
func GetCompilePluginSubFolder ¶
GetCompilePluginSubFolder return plugin compiled folder path
func GetPluginSourceSubFolder ¶
GetPluginSourceSubFolder return plugins source folder path
func RemoveNewLineSuffix ¶
RemoveNewLineSuffix remove new line from suffix
Types ¶
type CmdExprBuilder ¶
CmdExprBuilder sanitize expr
var UpdateCmdExprParam CmdExprBuilder = func(outputArr []string, expr string) string { var value string builder := strings.Builder{} sExpr := SeparateExpr(expr) for _, exp := range sExpr { for i, output := range outputArr { if !strings.Contains(exp.Expr, "$") { if i > 0 { break } else { value = exp.Expr break } } value = exp.EvaExprBuilderFunc(strings.TrimSpace(output), i, exp.Expr) exp.Expr = value } builder.WriteString(value) } return builder.String() }
UpdateCmdExprParam check type
type EvaExprBuilderFunc ¶
EvaExprBuilderFunc build evaluation expresion it replace expression params with audit command result
type Expr ¶
type Expr struct {
Type string
Expr string
EvaExprBuilderFunc EvaExprBuilderFunc
}
Expr data
func SeparateExpr ¶
SeparateExpr separate expression to single and multi blocks