config

package
v0.2.1-2-g5dc37d7 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Filename  string                  `yaml:"-" json:"-"`
	Name      string                  `yaml:",omitempty" json:"name,omitempty"`
	OutDir    string                  `yaml:",omitempty" json:"outdir,omitempty"`
	Template  template.TemplateConfig `yaml:",omitempty" json:"template,omitempty"`
	Unikraft  core.UnikraftConfig     `yaml:",omitempty" json:"unikraft,omitempty"`
	Libraries lib.Libraries           `yaml:",omitempty" json:"libraries,omitempty"`
	Targets   target.Targets          `yaml:",omitempty" json:"targets,omitempty"`

	Extensions component.Extensions `yaml:",inline" json:"-"`
}

Config is a full kraft file configuration and model

type ConfigDetails

type ConfigDetails struct {
	Version       string
	WorkingDir    string
	ConfigFiles   []ConfigFile
	Configuration kconfig.KConfigValues
}

ConfigDetails are the details about a group of ConfigFiles

func (ConfigDetails) LookupConfig

func (cd ConfigDetails) LookupConfig(key string) (string, bool)

LookupConfig provides a lookup function for config variables

func (ConfigDetails) RelativePath

func (cd ConfigDetails) RelativePath(path string) string

RelativePath resolve a relative path based project's working directory

type ConfigFile

type ConfigFile struct {
	// Filename is the name of the yaml configuration file
	Filename string

	// Content is the raw yaml content. Will be loaded from Filename if not set
	Content []byte

	// Config if the yaml tree for this config file. Will be parsed from Content
	// if not set
	Config map[string]interface{}
}

ConfigFile is a filename and the contents of the file as a Dict

type MappingWithEquals

type MappingWithEquals map[string]*string

MappingWithEquals is a mapping type that can be converted from a list of key[=value] strings. For the key with an empty value (`key=`), the mapped value is set to a pointer to `""`. For the key without value (`key`), the mapped value is set to nil.

type ShellCommand

type ShellCommand []string

ShellCommand is a string or list of string args

type StringList

type StringList []string

StringList is a type for fields that can be a string or list of strings

type StringOrNumberList

type StringOrNumberList []string

StringOrNumberList is a type for fields that can be a list of strings or numbers

Jump to

Keyboard shortcuts

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