utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 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 CreateHomeFolderIfNotExist

func CreateHomeFolderIfNotExist(fm FolderMgr) error

CreateHomeFolderIfNotExist create mesh-kridik 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 CreateSecurityFolderIfNotExist

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

CreateSecurityFolderIfNotExist create mesh-kridik benchmark folder if not exist

func GetAuditTestsList

func GetAuditTestsList(key, arg string) []string

GetAuditTestsList return processing function by specificTests

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 mesh-kridik home folder

func GetPluginSourceSubFolder

func GetPluginSourceSubFolder(fm FolderMgr) (string, error)

GetPluginSourceSubFolder return plugins source folder path

func GetSecurityFolder

func GetSecurityFolder(spec, kind string, fm FolderMgr) (string, error)

GetSecurityFolder return benchmark folder

Types

type FilesInfo

type FilesInfo struct {
	Name string
	Data string
}

FilesInfo file data

func GetMeshSecurityChecksFiles

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

GetMeshSecurityChecksFiles return lxd 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