Documentation ¶
Overview ¶
Package helpers implements helper function for builder plugin
Index ¶
- Constants
- Variables
- func GetDigest(filePath string) (string, error)
- func GetID(i int) string
- func GetMaxParallelism() int
- func GetNumberOfIndividualPluginBinariesFromManifest(pluginManifest *cli.Manifest) int
- func GetPluginArchiveRelativePath(plugin cli.Plugin, osArch cli.Arch, version string) string
- func IsRequiredOSArch(osArch cli.Arch) bool
- func ReadPluginGroupManifest(pluginGroupManifestFile string) (*cli.PluginGroupManifest, error)
- func ReadPluginManifest(pluginManifestFile string) (*cli.Manifest, error)
- func ValidatePluginBinary(pluginBinaryFilePath, threadID string) (bool, error)
- type ErrInfo
Constants ¶
const (
PluginInventoryDBImageName = "plugin-inventory"
)
Variables ¶
var Identifiers = []string{ string('\U0001F435'), string('\U0001F43C'), string('\U0001F436'), string('\U0001F430'), string('\U0001F98A'), string('\U0001F431'), string('\U0001F981'), string('\U0001F42F'), string('\U0001F42E'), string('\U0001F437'), string('\U0001F42D'), string('\U0001F428'), }
Identifiers are the emoji symbols to specify progress happening on different threads
Functions ¶
func GetMaxParallelism ¶ added in v1.0.0
func GetMaxParallelism() int
GetMaxParallelism return the maximum concurrent threads to use. Limit the number of concurrent operations we perform so we don't overwhelm the system.
func GetNumberOfIndividualPluginBinariesFromManifest ¶ added in v1.0.0
GetNumberOfIndividualPluginBinariesFromManifest returns the number of plugin binaries into consideration based on the plugin manifest file This includes plugin binaries for all supported os architectures as well as all versions mentioned for the specific plugin.
func GetPluginArchiveRelativePath ¶
GetPluginArchiveRelativePath creates plugin archive relative path from metadata
func IsRequiredOSArch ¶ added in v1.0.0
IsRequiredOSArch returns true if 'osArch' is one of the require OSArch combinations that a plugin must support.
func ReadPluginGroupManifest ¶ added in v0.0.11
func ReadPluginGroupManifest(pluginGroupManifestFile string) (*cli.PluginGroupManifest, error)
ReadPluginGroupManifest reads the PluginGroupManifest file and returns PluginGroupManifest object
func ReadPluginManifest ¶
ReadPluginManifest reads the PluginManifest file and returns Manifest object
func ValidatePluginBinary ¶ added in v0.90.0
ValidatePluginBinary validates the plugin binary file Checks the binary file size if its empty returns true if file is not empty and false if file is empty