core

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAptModule

func BuildAptModule(moduleInterface interface{}, recipe *api.Recipe) (string, error)

BuildAptModule builds a module that installs packages using the apt package manager

func BuildCMakeModule

func BuildCMakeModule(moduleInterface interface{}, recipe *api.Recipe) (string, error)

BuildCMakeModule builds a module that builds a CMake project

func BuildContainerfile

func BuildContainerfile(recipe *api.Recipe) error

BuildContainerfile builds a Containerfile from a recipe and a list of modules commands

func BuildDnfModule added in v0.5.0

func BuildDnfModule(moduleInterface interface{}, recipe *api.Recipe) (string, error)

BuildDnfModule builds a module that installs packages using the dnf package manager

func BuildDpkgBuildPkgModule

func BuildDpkgBuildPkgModule(moduleInterface interface{}, recipe *api.Recipe) (string, error)

BuildDpkgModule builds a module that builds a dpkg project and installs the resulting .deb package

func BuildDpkgModule

func BuildDpkgModule(moduleInterface interface{}, recipe *api.Recipe) (string, error)

BuildDpkgModule builds a module that installs a .deb package

func BuildGoModule

func BuildGoModule(moduleInterface interface{}, recipe *api.Recipe) (string, error)

BuildGoModule builds a module that builds a Go project buildVars are used to customize the build command like setting the output binary name and location

func BuildMakeModule

func BuildMakeModule(moduleInterface interface{}, recipe *api.Recipe) (string, error)

BuildMakeModule builds a module that builds a Make project

func BuildMesonModule

func BuildMesonModule(moduleInterface interface{}, recipe *api.Recipe) (string, error)

BuildMesonModule builds a module that builds a Meson project

func BuildModule

func BuildModule(recipe *api.Recipe, moduleInterface interface{}) (string, error)

BuildModule builds a module command from a module this is done by calling the appropriate module builder function based on the module type

func BuildRecipe

func BuildRecipe(recipePath string) (api.Recipe, error)

BuildRecipe builds a Containerfile from a recipe path

func BuildShellModule added in v0.2.1

func BuildShellModule(moduleInterface interface{}, recipe *api.Recipe) (string, error)

func CompileRecipe added in v0.2.4

func CompileRecipe(recipePath string, runtime string) error

CompileRecipe compiles a recipe into a runnable image.

func GenModule added in v0.2.0

func GenModule(modulePath string) (map[string]interface{}, error)

GenModule generate a Module struct from a module path

func LoadPlugin added in v0.3.2

func LoadPlugin(name string, module interface{}, recipe *api.Recipe) (string, error)

func LoadRecipe

func LoadRecipe(path string) (*api.Recipe, error)

LoadRecipe loads a recipe from a file and returns a Recipe Does not validate the recipe but it will catch some errors a proper validation will be done in the future

func TestRecipe added in v0.5.0

func TestRecipe(path string) (*api.Recipe, error)

TestRecipe validates a recipe by loading it and checking for errors

Types

type AptModule added in v0.3.2

type AptModule struct {
	Name    string     `json:"name"`
	Type    string     `json:"type"`
	Options AptOptions `json:"options"`
	Source  api.Source `json:"source"`
}

type AptOptions added in v0.5.0

type AptOptions struct {
	NoRecommends    bool `json:"no_recommends"`
	InstallSuggests bool `json:"install_suggests"`
	FixMissing      bool `json:"fix_missing"`
	FixBroken       bool `json:"fix_broken"`
}

type CMakeModule added in v0.3.2

type CMakeModule struct {
	Name       string            `json:"name"`
	Type       string            `json:"type"`
	BuildVars  map[string]string `json:"buildvars"`
	BuildFlags string            `json:"buildflags"`
	Source     api.Source
}

type DnfModule added in v0.5.0

type DnfModule struct {
	Name   string     `json:"name"`
	Type   string     `json:"type"`
	Source api.Source `json:"source"`
}

type DpkgBuildModule added in v0.3.2

type DpkgBuildModule struct {
	Name   string `json:"name"`
	Type   string `json:"type"`
	Source api.Source
}

type DpkgModule added in v0.3.2

type DpkgModule struct {
	Name   string `json:"name"`
	Type   string `json:"string"`
	Source api.Source
}

type GoModule added in v0.3.2

type GoModule struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	Source     api.Source
	BuildVars  map[string]string
	BuildFlags string
}

type IncludesModule added in v0.3.2

type IncludesModule struct {
	Name     string   `json:"name"`
	Type     string   `json:"type"`
	Includes []string `json:"includes"`
}

type MakeModule added in v0.3.2

type MakeModule struct {
	Name   string `json:"name"`
	Type   string `json:"type"`
	Source api.Source
}

type MesonModule added in v0.3.2

type MesonModule struct {
	Name   string
	Type   string
	Source api.Source
}

type Module

type Module struct {
	Name    string `json:"name"`
	Type    string `json:"type"`
	Modules []map[string]interface{}
	Content []byte // The entire module unparsed as a []byte, used by plugins
}

type ModuleCommand

type ModuleCommand struct {
	Name    string
	Command string
}

func BuildModules

func BuildModules(recipe *api.Recipe, modules []interface{}) ([]ModuleCommand, error)

BuildModules builds a list of modules commands from a list of modules

type Plugin added in v0.3.2

type Plugin struct {
	Name         string
	BuildFunc    func(*C.char, *C.char) string
	LoadedPlugin uintptr
}

type ShellModule added in v0.3.2

type ShellModule struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Source   api.Source
	Commands []string
}

Jump to

Keyboard shortcuts

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