core

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: GPL-3.0 Imports: 13 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, cmds []ModuleCommand) error

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

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

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

func CompileRecipe

func CompileRecipe(recipePath string, runtime string) error

CompileRecipe compiles a recipe into a runnable image.

func GenModule

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

GenModule generate a Module struct from a module path

func LoadPlugin

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

Types

type AptModule

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

type CMakeModule

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 DpkgBuildModule

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

type DpkgModule

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

type GoModule

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

type IncludesModule

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

type MakeModule

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

type MesonModule

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

type Plugin struct {
	Name         string
	BuildFunc    func(interface{}, *api.Recipe) (string, error)
	LoadedPlugin *plugin.Plugin
}

type ShellModule

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