utils

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CompilePluginSubFolder = "plugins/compile"

CompilePluginSubFolder plugins complied folder

View Source
const PluginSourceSubFolder = "plugins/source"

PluginSourceSubFolder plugin source folder

Variables

This section is empty.

Functions

func CreateBenchmarkFolderIfNotExist

func CreateBenchmarkFolderIfNotExist(spec, version string, fm FolderMgr) error

CreateBenchmarkFolderIfNotExist create beacon benchmark folder if not exist

func CreateHomeFolderIfNotExist

func CreateHomeFolderIfNotExist(fm FolderMgr) error

CreateHomeFolderIfNotExist create beacon home folder if not exist

func CreatePluginsCompiledFolderIfNotExist

func CreatePluginsCompiledFolderIfNotExist(fm FolderMgr) error

CreatePluginsCompiledFolderIfNotExist create plugins compiled folder if not exist

func CreatePluginsSourceFolderIfNotExist

func CreatePluginsSourceFolderIfNotExist(fm FolderMgr) error

CreatePluginsSourceFolderIfNotExist plugins source folder if not exist

func GetAuditTestsList

func GetAuditTestsList(key, arg string) []string

GetAuditTestsList return processing function by specificTests

func GetBenchmarkFolder

func GetBenchmarkFolder(spec, version string, fm FolderMgr) (string, error)

GetBenchmarkFolder return benchmark folder

func GetCompilePluginSubFolder

func GetCompilePluginSubFolder(fm FolderMgr) (string, error)

GetCompilePluginSubFolder return plugin compiled folder path

func GetEnv

func GetEnv(key, fallback string) string

GetEnv Get Environment Variable value or return default

func GetHomeFolder

func GetHomeFolder() string

GetHomeFolder return beacon home folder

func GetPluginSourceSubFolder

func GetPluginSourceSubFolder(fm FolderMgr) (string, error)

GetPluginSourceSubFolder return plugins source folder path

Types

type FilesInfo

type FilesInfo struct {
	Name string
	Data string
}

FilesInfo file data

func GetK8sBenchAuditFiles

func GetK8sBenchAuditFiles(spec, version string, fm FolderMgr) ([]FilesInfo, error)

GetK8sBenchAuditFiles return k8s benchmark file

type FolderMgr

type FolderMgr interface {
	CreateFolder(folderName string) error
	GetHomeFolder() (string, error)
}

FolderMgr defines the interface for kube-knark folder fileutil.go

func NewKFolder

func NewKFolder() FolderMgr

NewKFolder return bFolder instance

Jump to

Keyboard shortcuts

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