api

package module
v0.0.0-...-5a9017a Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: GPL-3.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FS int32 = 16

/ Get a read-only filesystem of the Image

View Source
var IMAGEID int32 = 2

/ Get the final tagged Image ID

View Source
var IMAGENAME int32 = 1

/ Get the final tagged Image name

View Source
var RECIPE int32 = 4

/ Get the build recipe

View Source
var RUNTIME int32 = 8

Get the used build runtime

Functions

func DownloadFileSource

func DownloadFileSource(downloadPath string, source Source, moduleName string) error

Download a file source from a URL and save it to the specified download path. Create necessary directories and handle file naming based on the URL extension.

func DownloadGitSource

func DownloadGitSource(downloadPath string, source Source, moduleName string) error

Download a Git source repository based on the specified tag, branch, or commit

func DownloadLocalSource

func DownloadLocalSource(sourcesPath string, source Source, moduleName string) error

Copies a local source for use during the build, skips the Download directory and copies directly into the source path

func DownloadSource

func DownloadSource(recipe *Recipe, source Source, moduleName string) error

Download the source based on its type and validate its checksum

func DownloadTarSource

func DownloadTarSource(downloadPath string, source Source, moduleName string) error

Download a tarball from the specified URL and save it to the destination path

func GetCleanupSuffix

func GetCleanupSuffix(cleanup []string) string

func GetSourcePath

func GetSourcePath(source Source, moduleName string) string

Generate the destination path for the source based on its type and module name

func MoveSource

func MoveSource(downloadPath string, sourcesPath string, source Source, moduleName string) error

Move or extract a source from the download path to the sources path depending on its type tarballs: extract git repositories: move

func MoveSources

func MoveSources(downloadPath string, sourcesPath string, sources []Source, moduleName string) error

Move downloaded sources from the download path to the sources path

func TestArch

func TestArch(onlyArches []string, targetArch string) bool

Types

type Add

type Add struct {
	SrcDst  map[string]string
	Workdir string
}

Configuration for adding files or directories in a stage

type Cmd

type Cmd struct {
	Exec    []string
	Workdir string
}

Configuration for a command to run in the container

type Copy

type Copy struct {
	From    string
	SrcDst  map[string]string
	Workdir string
}

Configuration for copying files or directories in a stage

type Entrypoint

type Entrypoint struct {
	Exec    []string
	Workdir string
}

Configuration for the entrypoint of a container

type PluginInfo

type PluginInfo struct {
	Name             string
	Type             PluginType
	UseContainerCmds bool
}

Information about a plugin

type PluginType

type PluginType int
const (
	BuildPlugin PluginType = iota
	FinalizePlugin
)

type Recipe

type Recipe struct {
	Name          string
	Id            string
	Vibversion    string
	Stages        []Stage
	Path          string
	ParentPath    string
	DownloadsPath string
	SourcesPath   string
	IncludesPath  string
	PluginPath    string
	Containerfile string
	Finalize      []interface{}
}

Configuration for a recipe

type Run

type Run struct {
	Commands []string
	Workdir  string
}

Configuration for commands to run in the container

type ScopeData

type ScopeData struct {
	ImageName string
	ImageID   string
	Recipe    Recipe
	Runtime   string
	FS        string
}

Information about the image, recipe, runtime, and file system mountpoint

type Source

type Source struct {
	URL        string   `json:"url"`
	Checksum   string   `json:"checksum"`
	Type       string   `json:"type"`
	Commit     string   `json:"commit"`
	Tag        string   `json:"tag"`
	Branch     string   `json:"branch"`
	Packages   []string `json:"packages"`
	Path       string   `json:"path"`
	OnlyArches []string `json:"only-arches" mapstructure:"only-arches"`
}

Configuration for a source

type Stage

type Stage struct {
	Id          string            `json:"id"`
	Base        string            `json:"base"`
	Copy        []Copy            `json:"copy"`
	Addincludes bool              `json:"addincludes"`
	Labels      map[string]string `json:"labels"`
	Env         map[string]string `json:"env"`
	Adds        []Add             `json:"adds"`
	Args        map[string]string `json:"args"`
	Runs        Run               `json:"runs"`
	Expose      map[string]string `json:"expose"`
	Cmd         Cmd               `json:"cmd"`
	Modules     []interface{}     `json:"modules"`
	Entrypoint  Entrypoint
	Cleanup     []string `json:"cleanup"`
}

Configuration for a stage in the recipe

Jump to

Keyboard shortcuts

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