api

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadGitSource

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

DownloadGitSource downloads a git source to the downloads directory and checks out the commit or tag

func DownloadSource

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

DownloadSource downloads a source to the downloads directory according to its type (git, tar, ...)

func DownloadTarSource

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

DownloadTarSource downloads a tar archive to the downloads directory

func MoveSource

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

MoveSource moves a source from the downloads directory to the sources directory, by extracting if a tar archive or moving if a git repository

func MoveSources

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

MoveSources moves all sources from the downloads directory to the sources directory

Types

type Recipe

type Recipe struct {
	Base          string `json:"base"`
	Name          string
	Id            string
	SingleLayer   bool              `json:"singlelayer"`
	Labels        map[string]string `json:"labels"`
	Adds          map[string]string `json:"adds"`
	Args          map[string]string `json:"args"`
	Runs          []string          `json:"runs"`
	Expose        int               `json:"expose"`
	Cmd           string            `json:"cmd"`
	Modules       []interface{}     `json:"modules"`
	Path          string
	ParentPath    string
	DownloadsPath string
	SourcesPath   string
	PluginPath    string
	Containerfile string
	Entrypoint    []string
}

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"`
	Paths    []string `json:"paths"`
}

Jump to

Keyboard shortcuts

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