kernel

package
v0.0.0-...-53c5c15 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExtractorName        = "kernel"
	ExtractorDescription = "generic kernel extractor"
	KernelBootSection    = "boot"
	KernelConfigSection  = "config"
	KernelModulesSection = "modules"
)

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(sections []string) (plugin.PluginInterface, error)

NewPlugin validates and returns a new kernel plugins

Types

type KernelExtractor

type KernelExtractor struct {
	// contains filtered or unexported fields
}

func (KernelExtractor) Create

func (KernelExtractor) Description

func (e KernelExtractor) Description() string

func (KernelExtractor) Extract

func (c KernelExtractor) Extract(allowFail bool) (plugin.PluginData, error)

Extract returns kernel metadata, for a set of named sections TODO eventually the user could select which sections they want

func (KernelExtractor) IsCreator

func (e KernelExtractor) IsCreator() bool

func (KernelExtractor) IsExtractor

func (e KernelExtractor) IsExtractor() bool

func (KernelExtractor) Name

func (c KernelExtractor) Name() string

func (KernelExtractor) Sections

func (e KernelExtractor) Sections() []string

func (KernelExtractor) Validate

func (c KernelExtractor) Validate() bool

Validate ensures that the sections provided are in the list we know This is implemented on the level of the plugin, assuming each plugin might have custom logic to do this.

type Module

type Module struct {
	Name       string
	Path       string
	Version    string
	Parameters map[string]string
}

A module holds a version and parameters, and helper functions to derive them.

func NewModule

func NewModule(name, defaultVersion string) *Module

NewModule prepares a module for a path

func (*Module) Key

func (m *Module) Key() string

Key is the prefix key for the higher level modules metadata

func (*Module) SetParameters

func (m *Module) SetParameters() error

setParameters parses the module root / parameters directory

Jump to

Keyboard shortcuts

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