kernel

package
Version: v0.0.0-...-9e584df Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidAssetName = regexp.MustCompile("^[a-zA-Z0-9][a-zA-Z0-9-]*$")

ValidAssetName is a regular expression matching valid asset name.

Functions

func Validate

func Validate(kernelRoot string) error

Validate checks whether the given directory contains valid kernel snap metadata and a matching content.

Types

type Asset

type Asset struct {
	// TODO: we may make this an (optional) map at some point in
	//       the future to select what things should be updated.
	//
	// Update set to true indicates that assets shall be updated.
	Update  bool     `yaml:"update,omitempty"`
	Content []string `yaml:"content,omitempty"`
}

type Info

type Info struct {
	Assets map[string]*Asset `yaml:"assets,omitempty"`
}

func InfoFromKernelYaml

func InfoFromKernelYaml(kernelYaml []byte) (*Info, error)

InfoFromKernelYaml reads the provided kernel metadata.

func ReadInfo

func ReadInfo(kernelSnapRootDir string) (*Info, error)

ReadInfo reads the kernel specific metadata from meta/kernel.yaml in the snap root directory if the file exists.

Directories

Path Synopsis
package fde implements helper used by low level parts like secboot in snap-bootstrap and high level parts like DeviceManager in snapd.
package fde implements helper used by low level parts like secboot in snap-bootstrap and high level parts like DeviceManager in snapd.

Jump to

Keyboard shortcuts

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